Skip to main content

InoCloudreve - Cloudreve Python Client

An async Python client for the Cloudreve API.
Supports authentication, file operations, token management, and utilities—built on httpx with HTTP/2 support and aiofiles.

Version: 0.2.5
Python: >= 3.9


Important Note

Active Development
This client library is under active development and is not yet feature-complete. It was built to satisfy specific use-cases and may change without warning.

Not Production-Ready
Use at your own risk. Do not deploy this in production environments unless you fully understand its internals and have thoroughly tested it for your needs.

Contributions, feedback, and issue reports are welcome—but please be cautious if you plan to rely on this library for critical workloads.


Features

  • Health check (ping())

  • Authentication

    • password_sign_in(email, password, captcha=None, ticket=None)
    • refresh_token(refresh_token)
    • generate_token(...)
    • decode_token(...)
    • is_token_valid()
    • validate_token()
  • File operations

    • list_files(uri, page=0, page_size=50, order_by="created_at", order_direction="asc", next_page_token=None)
    • get_file_info(file_uri, file_id, extended=False, folder_summary=False)
    • create_download_url(uris, download=False, redirect=False, entity=None, use_primary_site_url=False, skip_error=False, archive=False, no_cache=False)
    • get_download_url(uris, download=False, redirect=False, entity=None, use_primary_site_url=False, skip_error=False, archive=False, no_cache=False)
    • update_file_content(file_uri, content, previous=None)
    • create_upload_session(uri, filename, size, chunk_size, expire_in, ...)
    • delete_upload_session(id, uri)
    • delete_file(uris, unlink=False, skip_soft_delete=False)
    • force_unlock(tokens)
    • get_last_folder_or_file(uri)
  • Upload operations

    • upload_file(...)
    • upload_parts_via_presigned_urls(...)
    • complete_upload_via_complete_url(...)
    • complete_s3_upload(...)
  • Download operations

    • download_file(...)
    • save_url_as_file(url, save_dir, filename, extension, overwrite=True)
  • Workflow operations

    • extract_archive(...)
  • Utilities

    • read_file_as_bytes(path)
    • get_headers(include_auth=True, include_content_type=True)

Installation

# Install from PyPI
pip install inocloudreve

# Install locally:
git clone https://github.com/nobandegani/InoCloudreve.git
cd InoCloudreve
pip install -e .

Usage

import asyncio
from inocloudreve import CloudreveClient

async def main():
    # Initialize the client
    client = CloudreveClient()
    client.init("https://your-cloudreve-instance.com")
    
    try:
        # Check if the server is reachable
        await client.ping()
        
        # Sign in
        await client.password_sign_in("your-email@example.com", "your-password")
        
        # List files in root directory
        files = await client.list_files("/")
        print(f"Found {len(files.get('objects', []))} files")
        
        # Your other operations here...
        
    finally:
        # Always close the client
        await client.close()

# Run the async function
asyncio.run(main())

License

Mozilla Public License Version 2.0

Metadata

Release files for inocloudreve 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inocloudreve 0.2.6
File Size Uploaded Provenance Actions
inocloudreve-0.2.6.tar.gz 22.2 kB Without provenance Details for inocloudreve-0.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inocloudreve 0.2.6
File Interpreter ABI Platform Actions
inocloudreve-0.2.6-py3-none-any.whl Python 3 none any Details for inocloudreve-0.2.6-py3-none-any.whl

Total release size: 54.2 kB

Release files / inocloudreve-0.2.6.tar.gz

Download URL inocloudreve-0.2.6.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
56afb129815ea987eca5db6596bb479046dbf12c7be466cf8bae9633f745a6eb
BLAKE2b-256 checksum
How to use checksums
928c6c360de0730ac6ac0388f612cbf28e8d9d20592ee5a25f98a3da7114cbd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / inocloudreve-0.2.6-py3-none-any.whl

Download URL inocloudreve-0.2.6-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66e93e7bcb2dac95d150bf9f9a7b46fcb007c8311a495cdce048449548a3a4c7
BLAKE2b-256 checksum
How to use checksums
3947834a261ef8e30150fe4e7949e0964e72b96d78f24972252e708d3b30671e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for inocloudreve 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page