Skip to main content

Dratio Python client

PyPI version ReadTheDocs Python version GitHub

The Dratio Python client allows you to effortlessly access and download data from the Dratio API using Python. Integrate a wide range of datasets from Dratio into your data science projects related to marketing, consumption, demographics, or income, and make data-driven decisions to drive innovation within your organization.

Get started by installing the client and authenticating with your Dratio API key. The client provides methods to access and download the data you need, returning the data as a Pandas DataFrame for easy manipulation and analysis.

Installation

The stable version of the Dratio Python client is available on PyPI for Python 3.7 to 3.11, regardless of the platform. Install it using pip:

pip install dratio

For datasets with geographic information, ensure geopandas is installed in your Python environment. Alternatively, install the package with all necessary dependencies using pip:

pip install dratio[geo]

API Keys

To use the API, create an API key. If you haven't registered, create an account on dratio.io.

| Remember to securely store your API keys and avoid sharing them publicly. API keys grant access to all services on your behalf. If a key is compromised, delete and create new keys.

Getting Started

The Client class enables access to all API resources using your API key.

from dratio import Client

client = Client('Your API key')

Basic functionality allows you to search and filter available datasets for download.

client.list_datasets()

After selecting a Dataset, access its information and download its content as a Pandas DataFrame or, for datasets with geographic information, as a GeoDataFrame.

dataset = client.get_dataset('municipalities')

df = dataset.to_pandas() # Download as DataFrame
gdf = dataset.to_geopandas() # GeoDataFrame with geographic information

To gain a comprehensive understanding of the Dratio Python client and explore all its features, visit the official documentation on Read the Docs.

License & Terms and Conditions

This source code is licensed under the Apache License, Version 2.0. Obtain a copy of the License at apache.org.

The use of the data offered by this client must comply with Dratio's terms and conditions. Obtain a copy of the terms at dratio.io/legal/.

Support

If you encounter a bug or have a feature suggestion, please log an issue or contact us through our page or via email at info@dratio.io

Metadata

Release files for dratio 0.0.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dratio 0.0.16
File Size Uploaded
dratio-0.0.16.tar.gz 32.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dratio 0.0.16
File Interpreter ABI Platform
dratio-0.0.16-py3-none-any.whl Python 3 none any Details

Total release size: 78.4 kB

Release files / dratio-0.0.16.tar.gz

Download URL dratio-0.0.16.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6324fa1d1adaabea047d5bc00ab79478814be17ea6d6f5e87330d953b9783a5d
BLAKE2b-256 checksum
How to use checksums
95ebcbbdec1a22aef86a0e18f80f0753baaed77522475127cd1e117ba82d285a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / dratio-0.0.16-py3-none-any.whl

Download URL dratio-0.0.16-py3-none-any.whl
Size 45.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c72db4c769eeb1286298604c19aa01a447c28597b96401e0742009d95777dde
BLAKE2b-256 checksum
How to use checksums
a615c8e1f08c726da519ce2b38cdd3a01a602151853647cf41aa81d073aa512c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

0.0.16 This release

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page