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.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

api_to_dataframe-1.0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: api_to_dataframe-1.0.2.tar.gz
  • Upload date:
  • Size: 3.9 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.2.tar.gz
Algorithm Hash digest
SHA256 57542caeaa41e5664d7c84adc0c877357c6ef1d7e9d5d42a9068eedca8e17972
MD5 6fdf87b18fd6081eff26217553b0c00b
BLAKE2b-256 3145c2ba44e7e532de7268666425d5e5faeec4d63ccf3d6738b261b7693dc449

See more details on using hashes here.

File details

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

File metadata

  • Download URL: api_to_dataframe-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d9664865793f085bc8e6d0ff9dffa7ff6d94e9cf65b6e4cbc2b681537c5fb104
MD5 d94def46d10392427c9fabb711e76cc8
BLAKE2b-256 43e66fcb7b181d9d2672003bc2b9b956a9bdb7a3f1d5b5632c35bb29147cad0a

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