Skip to main content

A lightweight Python wrapper for the Datawrapper API

Project description

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

Installation

# With `uv` ...
uv add datawrapper

# or, if you prefer...
pip install datawrapper

Quick Start

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

import pandas as pd
import datawrapper as dw

# Configure a bar chart
chart = dw.BarChart(
    title="Top Programming Languages 2024",
    data=pd.DataFrame({"Language": ["Python", "JavaScript", "Java"], "Users": [45.3, 38.2, 30.5]}),
    axis_label_format=dw.NumberFormat.ONE_DECIMAL
)

# Create and publish (uses DATAWRAPPER_ACCESS_TOKEN environment variable)
chart.create()
chart.publish()

See the full documentation for comprehensive guides on all chart types.

Contributing

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

Install dependencies for development.

uv install --all-extras

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

uv run pre-commit install

Run tests with

uv run pytest

📈 Releases

You can see the list of available releases on the GitHub Releases page.

We follow Semantic Versions 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

This project is licensed under the terms of the MIT license. See 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}}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datawrapper-2.0.17.tar.gz (548.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datawrapper-2.0.17-py3-none-any.whl (102.8 kB view details)

Uploaded Python 3

File details

Details for the file datawrapper-2.0.17.tar.gz.

File metadata

  • Download URL: datawrapper-2.0.17.tar.gz
  • Upload date:
  • Size: 548.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datawrapper-2.0.17.tar.gz
Algorithm Hash digest
SHA256 6de719078d8665f8edf7382c4432bc6fbf72453b0f8ecb51c5bd106144ba3f24
MD5 2af758e48def590b940c4bc6461f7217
BLAKE2b-256 1ab23e0e2d9e2c08263b02bb871255fa66f234d0fde966ad4efc85eec1fd6d6d

See more details on using hashes here.

File details

Details for the file datawrapper-2.0.17-py3-none-any.whl.

File metadata

  • Download URL: datawrapper-2.0.17-py3-none-any.whl
  • Upload date:
  • Size: 102.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for datawrapper-2.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 6e477e0b5faaad0fb1ae3b1bd02baa75f4833133fa6a64fc86093d5760c8a607
MD5 3a663b9cc8d2008e7a2a2aa2565e06a5
BLAKE2b-256 a3d9d5adcd16a7d8fcddb52c9eab5490470f054f772bdaeb6f1249049854de03

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page