Skip to main content

Python client library for dratio.io API Web services

Project description

Python Client for dratio.io API web services

PyPI version ReadTheDocs Python version GitHub

Data as-a-service to make better decisions based on technology

What is dratio?

Dratio is the result of our experience creating solutions for data-driven decision making in a wide variety of industries. We provide tools and data as-a-service that enable to create robust data solutions in an agile way.

Python client

This client allows you to interact with the services offered by the dratio.io platform from Python. You will be able to download ready-to-use datasets for all types of industries. All data is reviewed, documented and linked together by common variables, allowing you to reference directly with your data without spending time on integration.

Installation

Currently, dratio’s client is available in Python 3.7 to 3.10, regardless of the platform. The stable version can be installed via PyPI.

pip install dratio

In case of using datasets with geographic information, you must have geopandas installed in your Python environment. You can also install the package with all the necessary dependencies directly using pip.

pip install dratio[geo]

Create API Keys

Before you can start using the services offered and access all the datasets, you will need to create an API key. If you are not registered you can create an account on dratio.io.

| Please, store your API Keys in a safe place and never share them publicly, as they give access to all services offered on your behalf. In case of a leak, you can delete and create new keys.

Get started

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

from dratio import Client

client = Client('<your_api_key>')

Basic functionalities allow you to search and filter datasets available for download.

client.get_datasets()

Once a Dataset is selected, you can access its information and download its content as a Pandas DataFrame or, in case of datasets with geographic information, as a GeoDataFrame.

dataset = client.get('municipalities')

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

License & Terms and conditions

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

The use of the services offered by this client must be in accordance with dratio's terms and conditions. You may obtain a copy of the terms at dratio.io

Support

This library is supported by dratio's team. If you find a bug, or have a feature suggestion, please log an issue or contact us through our page or via mail to info@dratio.io.

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

dratio-0.0.8.tar.gz (12.8 kB view hashes)

Uploaded Source

Built Distribution

dratio-0.0.8-py3-none-any.whl (14.1 kB view hashes)

Uploaded Python 3

Supported by

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