跳转到主要内容

CrushFS的Python 3客户端(同步和异步)

项目描述

crushfs

CrushFS的Python 3客户端(同步和异步)

异步使用(依赖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())

同步使用(依赖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()

项目详情


下载文件

下载适合您平台的文件。如果您不确定要选择哪个,请了解更多关于安装软件包的信息。

源代码发行版

crushfs-0.4.3.tar.gz (3.3 kB 查看哈希值)

上传时间: 源代码

构建发行版

crushfs-0.4.3-py3-none-any.whl (9.2 kB 查看哈希值)

上传时间: Python 3

由以下提供支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面