Skip to main content

AnyAPI

AnyAPI is a small library to get rid of boilerplate code reused in many projects where interaction with APIs is needed.

AnyAPI:

  • uses requests.Session
  • has default timeout
  • has configurable pool size
  • has retry policy in case of 429 error
  • has get and post methods defined

How to use

pip install anyapi2
from anyapi import API


class SomeServiceAPI(API):
    BASE_URL = 'https://some-api-service.com'


some_service = SomeServiceAPI()
response = some_service.get('/v1/items')
response.raise_for_status()
result = response.json()

Metadata

Release files for anyapi2 0.0.6

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

Source distribution (sdist)

Source distribution for anyapi2 0.0.6
File Size Uploaded Provenance
anyapi2-0.0.6.tar.gz 3.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.7 kB

Release files / anyapi2-0.0.6.tar.gz

Download URL anyapi2-0.0.6.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8385c3426d494519e42a0bd5163760b38bdcb17989e9ceee4202be0501586c59
BLAKE2b-256 checksum
How to use checksums
54c1d2b6a84b0daee1dc970d31f6ed589b946542502f05d68548ab75836cd747
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / anyapi2-0.0.6-py3-none-any.whl

Download URL anyapi2-0.0.6-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7474ba3bd8e087ef5476a2fad360fce2bc10360d4dd42e6fe64024e1975c41cc
BLAKE2b-256 checksum
How to use checksums
c016a9c7ad7ce3ba1cf3218c4d5e88a8ce54d9c96b4ebc0364359932bde7ec01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for anyapi2 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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