跳转到主要内容

异步tus (tus.io) 客户端库

项目描述

aiotus - 异步tus客户端库

aiotus实现了tus协议的客户端。

功能

  • 实现了核心协议,以及创建拼接扩展。
  • 内置错误通信时的重试支持。
  • 广泛的测试平台,包括对参考tusd服务器的测试。

用法

import aiotus

creation_url = "http://example.com/files"

metadata = {
    "Filename": "image.jpeg".encode(),
    "Content-Type": "image/jpeg".encode()
}

# Upload a file to a tus server.
with open("image.jpeg", "rb") as f:
    location = await aiotus.upload(creation_url, f, metadata)
    # 'location' is the URL where the file was uploaded to.

# Read back the metadata from the server.
metadata = await aiotus.metadata(location)

需求

安装

PyPi安装aiotus

pip install aiotus

可以从TestPyPi安装开发版本

pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.ac.cn/simple aiotus

文档

文档可以在aiotus.readthedocs.io找到。

许可证

aiotus采用Apache 2.0许可证。

项目详情


下载文件

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

源代码分发

aiotus-0.1.15.tar.gz (30.0 kB 查看哈希值)

上传时间 源代码

构建分发

aiotus-0.1.15-py3-none-any.whl (16.4 kB 查看哈希值)

上传时间 Python 3

支持者

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