Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

aiodoc

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aiodoc

This library allows you to retrieve BytesIO objects from various sources asynchronously. Whether you're dealing with cloud storage, HTTP endpoints, FTP servers, or local files.

  • 0.1.2
  • PyPI
  • Socket score

Maintainers
1

๐Ÿš€ aiodoc: Async ByteIO Retrieval from Any Source ๐Ÿชฃ

Welcome to aiodoc! ๐ŸŽ‰ This library allows you to retrieve BytesIO objects from various sources asynchronously. Whether you're dealing with cloud storage, HTTP endpoints, FTP servers, or local files, aiodoc has got you covered! ๐ŸŒ

๐ŸŽฏ Key Features

  • Async all the way ๐ŸŒŸ: Perform all file operations asynchronously to keep your application responsive.
  • Retrieve from any source ๐Ÿ”Œ: Supports AWS S3, MinIO, Google Cloud Storage, HTTP, FTP, Redis, Memcached, and even local file systems.
  • Unified API ๐Ÿคน: A simple, easy-to-use interface for interacting with any storage system.

๐Ÿ’ผ Supported Providers

  • ๐Ÿ˜ AWS S3 via aiobotocore ๐Ÿš€
  • ๐Ÿฆ’ MinIO using minio-py ๐Ÿ› ๏ธ
  • โ˜๏ธ Google Cloud Storage with google-cloud-storage ๐ŸŽฉ
  • ๐ŸŒ HTTP with httpx ๐ŸŒ
  • ๐Ÿ“‚ Local file system with aiofile ๐Ÿ—‚๏ธ
  • ๐Ÿง  Memcached using aiomemcached ๐Ÿงณ
  • ๐Ÿ”ฅ Redis via aioredis ๐Ÿ”ฅ
  • ๐Ÿ”— FTP with aioftp ๐Ÿ“ก

๐ŸŽ’ How to Install

  1. Clone the repo:

    git clone https://github.com/your-repo/aiodoc.git
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Done! ๐ŸŽ‰ Now you're ready to use aiodoc for all your asynchronous file needs.

๐Ÿ› ๏ธ Usage

๐ŸŽฉ Create Your Provider

You can set up and use different providers based on your needs.

๐Ÿ˜ AWS S3 Example
from aiobotocore.session import AioSession
from aiodoc import S3Provider

# Initialize S3 provider
session = AioSession()
s3_provider = S3Provider(session)

# Retrieve a file as a BytesIO object
file_bytes = await s3_provider.download("my-bucket", "my-file.txt")
โ˜๏ธ Google Cloud Storage Example
from google.cloud import storage
from aiodoc import GCPProvider

# Initialize GCP provider
client = storage.Client()
gcp_provider = GCPProvider(client)

# Retrieve a file as a BytesIO object
file_bytes = await gcp_provider.download("my-bucket", "my-file.txt")
๐Ÿ“‚ Local File System Example
from aiodoc import FileProvider

# Initialize File provider
file_provider = FileProvider()

# Retrieve a file as a BytesIO object
file_bytes = await file_provider.download("bucket", "/path/to/file.txt")
๐Ÿ”ฅ Redis Example
from aioredis import Redis
from aiodoc import RedisProvider

# Initialize Redis provider
redis_client = await Redis.create()
redis_provider = RedisProvider(redis_client)

# Retrieve a file as a BytesIO object
file_bytes = await redis_provider.download("bucket", "file-key")

๐Ÿ› ๏ธ Available Operations

  • Upload ๐Ÿ†™: Upload a BytesIO object to any provider.
  • Download โฌ‡๏ธ: Retrieve a BytesIO object from any provider.
  • List Files ๐Ÿ“œ: List files (where supported).
  • Delete File โŒ: Delete a file (where supported).

๐Ÿค Contributing

Feel free to submit issues or pull requests if you'd like to contribute!

๐Ÿ“ License

This project is licensed under the MIT License.

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc