Skip to main content

A Python client for OpenList API

Project description

OpenList API

OpenList API 的 Python 异步客户端,提供完整的文件管理、用户管理和认证功能。

特性

  • 基于httpx的异步设计
  • 完整的文件系统操作方法
  • 用户管理和认证
  • 支持流式及分片上传

要求

  • Python 3.10 或以上版本
  • 无操作系统及架构限制

安装

使用 pip 安装:

pip install openlist

快速开始

基础用法

import asyncio
from openlist import Client

async def main():
    # 创建客户端实例
    client = Client("https://your-openlist-server.com")
    # 登录
    await client.login("username", "password")
    # 获取当前用户信息
    user_info = await client.user.me()
    print(f"当前用户: {user_info.username}")
    # 关闭连接
    await client.close()

asyncio.run(main())

使用上下文管理器

async def main():
    async with Client("https://your-openlist-server.com") as client:
        await client.login("username", "password")
        user_info = await client.user.me()
        print(user_info)

OTP 双因素认证

async def main():
    client = Client("https://your-openlist-server.com")
    await client.login("username", "password", otp_key="your-otp-secret")

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

openlist-0.1.1b2.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openlist-0.1.1b2-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file openlist-0.1.1b2.tar.gz.

File metadata

  • Download URL: openlist-0.1.1b2.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for openlist-0.1.1b2.tar.gz
Algorithm Hash digest
SHA256 4ba098e6ec51cc8799906d9681b0cfad48025e015132f5321530157741ff0e95
MD5 4739fca15d14677fbcf2189868deff61
BLAKE2b-256 de8d4f4e0e096e53314f74b0c280c59ad5bd93d6922c4111b6d286a325e7fad2

See more details on using hashes here.

File details

Details for the file openlist-0.1.1b2-py3-none-any.whl.

File metadata

  • Download URL: openlist-0.1.1b2-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.10

File hashes

Hashes for openlist-0.1.1b2-py3-none-any.whl
Algorithm Hash digest
SHA256 3bee71c91f293a3a8ab380ecf6a215b3f78f60220be73dc5ba5a63f034214b0c
MD5 2954885e37212facbf09e0efd2afdfda
BLAKE2b-256 570ddfe912bd4203267e2c25ad0cdcc1478a940ee3628b6e4834bb5ca759ab69

See more details on using hashes here.

Supported by

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