Metadata-Version: 2.4
Name: datawrapper
Version: 2.0.1
Summary: A lightweight Python wrapper for the Datawrapper API
Author-email: checkos <chekos@tacosdedatos.com>, Ben Welsh <b@palewi.re>
License: MIT
Project-URL: Documentation, https://github.com/chekos/datawrapper
Project-URL: Maintainer, https://github.com/chekos/
Project-URL: Source, https://github.com/chekos/datawrapper
Project-URL: Issues, https://github.com/chekos/datawrapper/issues/
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: exceptiongroup; python_version < "3.11"
Requires-Dist: importlib_metadata
Requires-Dist: rich
Requires-Dist: requests
Requires-Dist: pandas
Requires-Dist: pydantic
Requires-Dist: ipython
Provides-Extra: dev
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: setuptools-scm; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Requires-Dist: pytest-timeout; extra == "test"
Requires-Dist: pytest-xdist; extra == "test"
Requires-Dist: pytest-env; extra == "test"
Requires-Dist: factory-boy; extra == "test"
Requires-Dist: faker; extra == "test"
Requires-Dist: responses; extra == "test"
Requires-Dist: freezegun; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-autobuild; extra == "docs"
Requires-Dist: myst-parser; extra == "docs"
Requires-Dist: sphinx_rtd_theme; extra == "docs"
Provides-Extra: mypy
Requires-Dist: mypy; extra == "mypy"
Requires-Dist: types-requests; extra == "mypy"
Requires-Dist: types-docutils; extra == "mypy"
Requires-Dist: pydantic-settings; extra == "mypy"
Dynamic: license-file

# datawrapper

A lightweight Python wrapper for the Datawrapper API

## Features

* Create, get, update, export and delete charts, tables and maps
* Add data from a `pandas.DataFrame` or a GeoJSON file with one simple call
* Get, update and delete folders, users and teams.
* Retrieve lists of recently edited and updated charts
* Access metadata about your account
* Get a list of all available themes

## Installation

```bash
uv install datawrapper
```

## Quick Start

Create beautiful charts with type-safe, object-oriented Python:

```python
import pandas as pd
from datawrapper import BarChart, NumberFormat

# Create a bar chart with type-safe configuration
chart = BarChart(
    title="Top Programming Languages 2024",
    data=pd.DataFrame({"Language": ["Python", "JavaScript", "Java"], "Users": [45.3, 38.2, 30.5]}),
    axis_label_format=NumberFormat.ONE_DECIMAL,  # Type-safe enum
    value_label_format=NumberFormat.ABBREVIATED,  # IDE autocomplete support
)

# Create and publish (uses DATAWRAPPER_ACCESS_TOKEN environment variable)
chart_id = chart.create()
chart.publish()
```
See the [full documentation](https://datawrapper.readthedocs.io/) for comprehensive guides on all chart types.

### Contributing

Clone the repository. Move into the directory on your terminal.

Install dependencies for development.

```bash
uv install --all-extras
```

Install pre-commit to run a battery of automatic quick fixes against your work.

```bash
uv run pre-commit install
uv run pre-commit install
```

Run tests with

```bash
uv run pytest
```

## 📈 Releases

You can see the list of available releases on the [GitHub Releases](https://github.com/chekos/datawrapper/releases) page.

We follow [Semantic Versions](https://semver.org/) specification. When you're ready to make a new release, visit the releases page and create a new entry. Set the tags and press publish. That will trigger a GitHub Action that automatically deploys the code to the Python Package Index.

## License

[![License](https://img.shields.io/github/license/chekos/datawrapper)](https://github.com/chekos/datawrapper/blob/master/LICENSE)

This project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/chekos/datawrapper/blob/master/LICENSE) for more details.

## Citation

```
@misc{datawrapper,
  author = {chekos},
  title = {A light-weight python wrapper for the Datawrapper API (v3). While it is not developed by Datawrapper officially, you can use it with your API credentials from datawrapper.de},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/chekos/datawrapper}}
}
```
