No project description provided
Project description
api-lib

A lightweight Python library for building and consuming APIs with ease.
Features
- Simple API client utilities
- Built-in request/response handling
- Extensible and easy to integrate
Installation
It's recommended to use uv to install the package:
uv add api-lib
Usage
Example: Consuming an API
from api_lib import ApiLib
from api_lib.headers.accept import AcceptGithub
from api_lib.headers.authorization import Bearer
from api_lib.method import Method
from .response import Repository, User
class GithubAPI(ApiLib):
headers = [AcceptGithub()]
async def user(self) -> User:
return await self.req(Method.GET, "/user", User)
api = GithubAPI("https://api.github.com", Bearer(env_var="GITHUB_TOKEN"))
user = await gh_api.user()
Documentation
See the full documentation for more details and advanced usage.
Contributing
Contributions are welcome! Please open issues or submit pull requests.
License
This project is licensed under the MIT License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file api_lib-0.0.3.tar.gz.
File metadata
- Download URL: api_lib-0.0.3.tar.gz
- Upload date:
- Size: 55.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9db9e26bd762793bde4b5ee7073264483871b60cc9f54e05bf265df460e7fd0b
|
|
| MD5 |
942ba5b5a4b46f710dd4ffebea80414b
|
|
| BLAKE2b-256 |
04ae0e87a80ed134b8b288d695c13e23d4f149e6e777d8591f7c6f2b247b9783
|
Provenance
The following attestation bundles were made for api_lib-0.0.3.tar.gz:
Publisher:
publish.yaml on jeandemeusy/api-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
api_lib-0.0.3.tar.gz -
Subject digest:
9db9e26bd762793bde4b5ee7073264483871b60cc9f54e05bf265df460e7fd0b - Sigstore transparency entry: 252091081
- Sigstore integration time:
-
Permalink:
jeandemeusy/api-lib@9c65ed65221adadb84e7f7b327d675444d876f9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/jeandemeusy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@9c65ed65221adadb84e7f7b327d675444d876f9e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file api_lib-0.0.3-py3-none-any.whl.
File metadata
- Download URL: api_lib-0.0.3-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f1d0107938fa83caca9f41c2320c3a417575e485f5147553b7805b9415f2ee7
|
|
| MD5 |
6c826f169866ed3a93663d15a2d96963
|
|
| BLAKE2b-256 |
6af990b8029ae16b58f70394c1b34f0cfc823a3cd8422a3b6e32af285d5acedc
|
Provenance
The following attestation bundles were made for api_lib-0.0.3-py3-none-any.whl:
Publisher:
publish.yaml on jeandemeusy/api-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
api_lib-0.0.3-py3-none-any.whl -
Subject digest:
9f1d0107938fa83caca9f41c2320c3a417575e485f5147553b7805b9415f2ee7 - Sigstore transparency entry: 252091083
- Sigstore integration time:
-
Permalink:
jeandemeusy/api-lib@9c65ed65221adadb84e7f7b327d675444d876f9e -
Branch / Tag:
refs/heads/master - Owner: https://github.com/jeandemeusy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@9c65ed65221adadb84e7f7b327d675444d876f9e -
Trigger Event:
workflow_dispatch
-
Statement type: