BK Request Library
Install the library into your active Python environment from the project root:
python -m pip install -e .
Editable installation means changes to the source are immediately available.
Import the client and helpers from bkrequest:
from bkrequest import BkRequest, read_json_file, write_json_file
client = BkRequest("Bearer YOUR_TOKEN")
response = client.get(
"https://example.com/api/items",
params={"page": 1},
)
response.raise_for_status()
print(response.json())
data = read_json_file("my.json")
write_json_file("output.json", data)
Use the authorization value required by your API when creating BkRequest.
JSON file paths are resolved relative to the process's current working
directory; use an absolute path if the file is elsewhere.
Metadata
Release files for bk-request-library 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bk_request_library-0.1.1.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bk_request_library-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.1 kB
Release files / bk_request_library-0.1.1.tar.gz
| Download URL | bk_request_library-0.1.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d708001fe24b7d02a99c5a2deac4cdf3a4366373b8a174918b1b93e942276e7
|
|
BLAKE2b-256 checksum How to use checksums |
44b928199909a022fc538fbaf4bb18ef391570acf60838673bf143b9cebcd60c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / bk_request_library-0.1.1-py3-none-any.whl
| Download URL | bk_request_library-0.1.1-py3-none-any.whl |
|---|---|
| Size | 2.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f63cd2d0e82416fab2b16f91bf964a79668156a92f56da8af5f6e726e00a5853
|
|
BLAKE2b-256 checksum How to use checksums |
a00614e980975b62e910b4b6a81c48a09b91c632b43c0a3fc4acd585b6e552cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|