ossx
ossx is an Aliyun OSS SDK for Python Asyncio.
You are free to extend this project, but it's recommended to always run the unit tests to ensure the existing functionality works as expected.
Implementation Details
ossx uses httpx as the asynchronous http client, and makes the greatest effort to reuse oss2 code. Therefore, the code of ossx itself is very small, and in addition, ossx also adds type annotations for public methods.
From the user's perspective, the use of ossx and oss2 should be very similar, in most cases you only need to add an await. Only when streaming reading Object, you need to call await obj.read() or asynchronous iteration async for chunk in obj.
Please note, this library will monkey patch a small number of functions in the oss2 library, usually we believe this will not affect the independent use of the oss2 library, for details please see ossx/patch.py.
Compatibility
Starting from version 2.18.4, ossx will synchronize with the version numbers of the official Aliyun SDK in subsequent releases. When releasing new versions, OSSX will strive to achieve forward compatibility as much as possible. Currently, we guarantee that a minor version of OSSX can be compatible with lower versions of oss2.
It is recommended to keep the version numbers of ossx and oss2 consistent to reduce compatibility issues.
Getting Started
Installation
pip install ossx
Usage
import asyncio
from oss2 import Auth, models
from ossx import AsyncBucket
async def main():
bucket = AsyncBucket(
auth=Auth('your-access-key-id', 'your-access-key-secret'),
endpoint='oss-cn-beijing.aliyuncs.com',
bucket_name='your-bucket-name'
)
content = b'Hello, ossx!'
await bucket.put_object('your-object-key', content)
obj = await bucket.get_object('your-object-key')
assert isinstance(obj, models.GetObjectResult)
assert await obj.read() == content
assert await obj.read() == b''
if __name__ == '__main__':
asyncio.run(main())
You can find the API use cases currently supported in the tests directory.
Metadata
Release files for ossx 2.19.1.post1
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 |
|---|---|---|---|---|
| ossx-2.19.1.post1.tar.gz | 20.7 kB | Without provenance | Details for ossx-2.19.1.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ossx-2.19.1.post1-py3-none-any.whl | Python 3 | none | any | Details for ossx-2.19.1.post1-py3-none-any.whl |
Total release size: 43.0 kB
Release files / ossx-2.19.1.post1.tar.gz
| Download URL | ossx-2.19.1.post1.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90cb477ee0d5ef20b932d17f8324eacf5a90ac6e2121ef01cdd6f1766d561757
|
|
BLAKE2b-256 checksum How to use checksums |
3abeaf3f445647245d1244b95ccfa20dd79560a3370e3097e13da07df84b54b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.4 Darwin/24.3.0
|
Release files / ossx-2.19.1.post1-py3-none-any.whl
| Download URL | ossx-2.19.1.post1-py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c46cbf5ffb413df360fbe88b1c45bfa6ff5fd2f0276260d02ba59c44b6bb90fa
|
|
BLAKE2b-256 checksum How to use checksums |
eb69676e025aedf272e47c70eb3dcaf98438ef42543009c51c7f732a74125825
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.12.4 Darwin/24.3.0
|
Security for ossx 2.19.1.post1
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.