Introduction
If you've ever tried to make an API wrapper you probably know that the code written can only be used as sync or async, well, not anymore.
Features
- Lightweight: Extremely lightweight and minimal
- Easy to use: Implement features in no time with the
- Async and blocking: Provides both async and blocking calls
- Test without a server: Since the library internally uses httpx, it can be used to test itself using an
ASGIorWSGIapplication. - DRY: Don't repeat yourself, helps avoid code duplication and write reusable code
- Routing: An
APIRouterclass with simliar API toAPIClient - Modular: Create reusable routers that can be added to any client, independant of each other
Example Usage
from apiclient import APIClient, endpoint, Post
class CodeExecClient(APIClient):
base_url = "https://pathtomysite.com/api/1.0" # Note the missing / suffix
@endpoint
def run(self, language:str, code:str):
# Do any processing with the data here!
# Also note the / prefix in the url
return Post("/execute", params={'lang':language, 'code':code})
# Using the API client
from httpx import Client
client = CodeExecClient(session=Client())
response = client.run("py", "print('hello world!')")
Documentation is under works
Metadata
Release files for instant-api-client 0.1.2
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 | Actions |
|---|---|---|---|---|
| instant-api-client-0.1.2.tar.gz | 3.8 kB | Without provenance | Details for instant-api-client-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| instant_api_client-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for instant_api_client-0.1.2-py3-none-any.whl |
Total release size: 9.1 kB
Release files / instant-api-client-0.1.2.tar.gz
| Download URL | instant-api-client-0.1.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a9efa7262f4f011060d036ad0c2df1c482f7181222858dabb8236048bce389a
|
|
BLAKE2b-256 checksum How to use checksums |
d95d96ab75eaac6885a70e242fc6c84d0981be7d309082519dc626017ee9113b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
|
Release files / instant_api_client-0.1.2-py3-none-any.whl
| Download URL | instant_api_client-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb4a045cad36ab25c403434ce84a1eabdd044bba2dd8f42353169edc2080eedc
|
|
BLAKE2b-256 checksum How to use checksums |
19490d3f4e3b6923653254e529f48248d5d458c3a09e9ed3e12bbe2b9eac393b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
|
Security for instant-api-client 0.1.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.