Skip to main content

Python SDK for AgentDisk API (gateway mode)

Project description

AgentDisk Python SDK

Python SDK for AgentDisk — an enterprise-grade cloud disk middleware designed for multi-agent systems.

Installation

pip install agentdisk

Requires Python 3.9+.

Quick Start

Synchronous Client

from agentdisk import AgentDiskClient

client = AgentDiskClient(
    base_url="http://localhost:9100",
    token="<jwt-from-gateway>",
)

# Folder operations
client.create_folder("docs/reports")
folders = client.list_folders("docs")

# File operations
client.upload_file("docs/reports/summary.md", "/local/summary.md")
client.upload_bytes("docs/notes.txt", b"hello world", auto_mkdir=True)
files = client.list_files("docs/reports")

# Share & preview
share = client.create_share("docs/reports", expire_hours=24)
result = client.preview("docs/reports/summary.md")

client.close()

Asynchronous Client

from agentdisk import AsyncAgentDiskClient

async with AsyncAgentDiskClient(
    base_url="http://localhost:9100",
    token="<jwt-from-gateway>",
) as client:
    await client.create_folder("docs/reports")
    await client.upload_file("docs/reports/summary.md", "/local/summary.md")
    files = await client.list_files("docs/reports")

API Overview

All operations use path-based API — no need to manage folder/file IDs manually.

Category Methods
Folders create_folder, list_folders, get_folder, rename_folder, delete_folder
Files upload_file, upload_bytes, list_files, get_file, update_file, update_file_bytes, delete_file
Shares create_share, list_shares, revoke_share, get_share_by_code, access_share
Permissions grant_permission, list_permissions, check_permission, revoke_permission
Tags bind_tag, unbind_tag, search_files
Versions list_versions, rollback_version
Recycle Bin list_recycle, restore, delete_permanent
Preview preview
Space get_space
Cache invalidate_cache, clear_cache

License

Apache-2.0

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

agentdisk-0.1.0.tar.gz (41.6 kB view details)

Uploaded Source

Built Distribution

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

agentdisk-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file agentdisk-0.1.0.tar.gz.

File metadata

  • Download URL: agentdisk-0.1.0.tar.gz
  • Upload date:
  • Size: 41.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for agentdisk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 de7f6a42e93f0c924bcf78894074ab86b8691acdfb05c1fa4c425729e72af95a
MD5 d65ee60613fdab617b93b902e6147b62
BLAKE2b-256 11f533328d121e6ee98a1e16dc0003e147769caf7ef76af4dd8e6d4f09eefbdc

See more details on using hashes here.

File details

Details for the file agentdisk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentdisk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for agentdisk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbd711843b4526a7dbdf6dfcb78e43cbf23f6300c45470817121e41b8524c79a
MD5 de2e45ce4a3b9b54fd72edb619afe0ab
BLAKE2b-256 1ec8a83f1b4375810c916bba35a0451168bfab44acc08c7c90765a170dbabf9a

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