Socket
Socket
Sign inDemoInstall

asyncoss

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncoss

A async aliyun OSS library.


Maintainers
1

Async Alibaba Cloud OSS SDK

Based on aiohttp and oss2, Require python3.6+

Installing

.. code-block:: shell

pip install asyncoss

Getting started

.. code-block:: python

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())

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc