Skip to main content

Python 3 client for CrushFS (sync and async)

Project description

crushfs

Python 3 client for CrushFS (sync and async)

Async usage (depends on aiohttp)

import asyncio
import crushfs

WAREHOUSE='mywarehouse'
SIGNER='me'
SECRET='letmein'
PATH='/apath/afile'

async def async_test():
    client = crushfs.AsyncClient(
            warehouse=WAREHOUSE, signer=SIGNER, secret=SECRET)
    response = await client.download_object(path=PATH)
    print(len(response.data))

asyncio.run(async_test())

Sync usage (depends on requests)

import crushfs

WAREHOUSE='mywarehouse'
SIGNER='me'
SECRET='letmein'
PATH='/apath/afile'

def sync_test():
    client = crushfs.SyncClient(
            warehouse=WAREHOUSE, signer=SIGNER, secret=SECRET)
    response = client.download_object(path=PATH)
    print(len(response.data))

sync_test()

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

crushfs-0.3.4.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

crushfs-0.3.4-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page