aiob2
aiob2 is an asynchronous API wrapper for the Backblaze B2 Native API.
It will allow you to interact with your B2 bucket and its files in a modern, object-oriented fashion.
NOTE: There are API endpoints left to implement, eventually they will be added. To speed up this process you can submit a pull request or suggest it.
Installation
aiob2 is compatible with Python 3.8+. To install aiob2, run the following command in your (virtual) environment.
pip install aiob2
Alternatively, for the latest though least stable version, you can download it from the GitHub repo:
pip install git+https://github.com/Void-ux/aiob2.git
Usage
Uploading
import aiohttp
import asyncio
from aiob2 import Client
# Our image to upload to our bucket
with open(r'C:\Users\MS1\Pictures\Camera Roll\IMG_5316.jpeg', 'rb') as file:
data = file.read()
async def main():
async with Client('key_id', 'key') as client:
file = await client.upload_file(
content_bytes=data,
file_name='test.jpg',
bucket_id='bucket_id',
)
if __name__ == '__main__':
asyncio.run(main())
And that's it! upload_file() returns a File object that neatly wraps everything Backblaze's API has provided us with.
The File object's documentation can be found here
License
This project is released under the MIT License.
Metadata
Release files for aiob2 0.9.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 | Provenance | Actions |
|---|---|---|---|---|
| aiob2-0.9.1.tar.gz | 21.2 kB | Without provenance | Details for aiob2-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiob2-0.9.1-py3-none-any.whl | Python 3 | none | any | Details for aiob2-0.9.1-py3-none-any.whl |
Total release size: 46.1 kB
Release files / aiob2-0.9.1.tar.gz
| Download URL | aiob2-0.9.1.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fb18a5bb7cf073267acc09fe6bebbc10f21289eb5579593e07f365777bbf3f1d
|
|
BLAKE2b-256 checksum How to use checksums |
b11eced52d2a7203f1f7c28bc6bd122ddc21f50f0444c82fbc58e02ee934c577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.9 Windows/11
|
Release files / aiob2-0.9.1-py3-none-any.whl
| Download URL | aiob2-0.9.1-py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
809e84645da0e8988da3aaf24b8308fb34951c5bb5e24e2a48845be2127643e5
|
|
BLAKE2b-256 checksum How to use checksums |
22fc6416af732d0a74ede69851979f48e72665dc91b4340e5089afa263a86e71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.9 Windows/11
|
Security for aiob2 0.9.1
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.