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
getandpostmethods 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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| anyapi2-0.0.6.tar.gz | 3.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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.