A async aliyun OSS library.
Project description
Based on aiohttp and oss2, Require python3.6+
Installing
pip install asyncoss
Getting started
import asyncoss
import asyncio
endpoint = 'http://oss-cn-beijing.aliyuncs.com'
auth = asyncoss.Auth('<Your AccessKeyID>', '<Your AccessKeySecret>')
async def main():
# The object key in the bucket is story.txt
async with asyncoss.Bucket(auth, endpoint, '<your bucket name>') as bucket:
key = 'story.txt'
# Upload
await bucket.put_object(key, 'Ali Baba is a happy youth.')
# Download
result = await bucket.get_object(key)
await result.resp.read()
# Delete
await bucket.delete_object(key)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
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
asyncoss-0.0.4.tar.gz
(23.0 kB
view details)
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
asyncoss-0.0.4-py3-none-any.whl
(25.5 kB
view details)
File details
Details for the file asyncoss-0.0.4.tar.gz.
File metadata
- Download URL: asyncoss-0.0.4.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d45e9d19c456e0f42c56359967918b3890f6f6ac9a7fde071cb0b80c949135a5
|
|
| MD5 |
e9734fe20f27e7117419166717f7ea6b
|
|
| BLAKE2b-256 |
e5c1684106aecd4d6d3258dae9b57e10d459c53826d931201664af01a31e7575
|
File details
Details for the file asyncoss-0.0.4-py3-none-any.whl.
File metadata
- Download URL: asyncoss-0.0.4-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c26f0ba0f04d6544ad8ccd616967d5a7cf2279a435416accbbf6ab5a8709e702
|
|
| MD5 |
ded4a399c81e7474a832428bfd45b762
|
|
| BLAKE2b-256 |
d013d1947140a690dd73060e314f2fee80695b984250dff72f1297594b7a08c4
|