Skip to main content

A package to convert API responses to pandas dataframe

Project description

API to DataFrame

Your solution to convert API responses to Pandas DataFrames with retry strategies and detailed reports.

Github

PyPI - Status PyPI - Downloads PyPI - Version

PyPI - Python Version

CI CD

Codecov

Project Stack

Python  Docker  Poetry  GitHub Actions  CodeCov  pypi  pandas  pytest 

Library Description

Python library that simplifies obtaining data from API endpoints by converting them directly into Pandas DataFrames. This library offers robust features, including retry strategies for failed requests and automatic generation of detailed reports on the received data.

Installation

To install the package using pip, use the following command:

pip install api-to-dataframe

To install the package using poetry, use the following command:

poetry add api-to-dataframe

How to use it

## Importing library
from api_to_dataframe import ClientBuilder, RetryStrategies

# Create a client for the API without retry strategy
client = ClientBuilder(endpoint="https://api.example.com", retry_strategy=RetryStrategies.NoRetryStrategy)
# or with LinearStrategy (In development, actually don't nothing)
client = ClientBuilder(endpoint="https://api.example.com", retry_strategy=RetryStrategies.LinearStrategy)

# Get data from the API
data = client.get_api_data()

# Convert the data to a DataFrame
df = client.api_to_dataframe(data)

# Display the DataFrame
print(df)

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

api_to_dataframe-1.0.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

api_to_dataframe-1.0.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file api_to_dataframe-1.0.3.tar.gz.

File metadata

  • Download URL: api_to_dataframe-1.0.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.19 Linux/6.5.0-1021-azure

File hashes

Hashes for api_to_dataframe-1.0.3.tar.gz
Algorithm Hash digest
SHA256 2f3c17153d92ba844d1ee0d8a4506f11d1aa7477d8e9a81c9f271f450e5b79a6
MD5 e6925a3573e281bdf6e7fb66f15222cf
BLAKE2b-256 0b812a3f6f7eb2487081d4dc2679d3ef579485ffb65f05b9fd2ec12d24c02b37

See more details on using hashes here.

File details

Details for the file api_to_dataframe-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: api_to_dataframe-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.19 Linux/6.5.0-1021-azure

File hashes

Hashes for api_to_dataframe-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b56d9b07f907690602f2a4ed2f6a1fa7095a3b5e0a137a985ee972b638297fa
MD5 d74421c39b9bbb3a30c50ab32b7f7851
BLAKE2b-256 d14001e2c8a5adfaf10a92782af49d431f72e57b95d0b96d543d551e45f3b1ef

See more details on using hashes here.

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