Skip to main content

Official Python SDK for FluidCloud — private file storage, shareable raw links, and stable public (hotlinkable) URLs.

Project description

fluidcloud — Python SDK for FluidCloud

Official Python client for FluidCloud — file storage with shareable raw links and stable public (hotlinkable) URLs. The SDK hides the upload plumbing (presign → direct-to-storage PUT → complete, including multipart for large files) behind a single upload() call.

📚 Full documentation: https://cloud.fluidvip.com/docs

Install

pip install fluidcloud

Requires Python 3.8+. The only runtime dependency is httpx.

Quick start

from fluidcloud import FluidCloud

fc = FluidCloud(api_key="fck_live_...")        # base_url defaults to production

# A Space is a top-level bucket; folders and files live inside it.
space = fc.spaces.create("Brand Assets")

# Upload — one call hides presign -> PUT -> complete (+ multipart for big files).
asset = fc.files.upload("logo.png", space_id=space.id, public=True)
print(asset.public_url)        # stable, inline, cacheable hotlink (use as <img src>)

# Or mint links explicitly:
public = fc.files.public_url(asset.id)                 # permanent (never expires)
signed = fc.files.signed_url(asset.id, expires_in_days=7, permission="view")

Authentication

Create an API key in the dashboard (Settings → Developer; an active subscription is required) and pass it to the client. The key (fck_live_… / fck_test_…) is sent as X-API-Key. Keys are scoped; a call outside a key's scopes raises PermissionError_ (HTTP 403 insufficient_scope).

API surface

fc.spaces.list() / create(name)
fc.folders.list(space_id, parent_id=None) / create(name, space_id, parent_id=None)
          / rename(id, name) / move(id, parent_id) / delete(id) / restore(id)
fc.files.upload(path_or_bytes_or_fileobj, space_id, folder_id=None,
                name=None, content_type=None, public=False)
         .list(space_id, folder_id=None) / get(id)
         .rename(id, name) / move(id, folder_id) / delete(id) / restore(id)
         .download_url(id)                # short-lived download URL
         .public_url(id)                  # permanent public hotlink (Link)
         .signed_url(id, expires_in_days=7, permission="view")   # expiring (Link)
fc.shares.list(file_id=None, include_inactive=False) / revoke(share_id)
fc.quota.usage()                          # bytes_used / bytes_limit / links_*

public_url vs signed_url: a public link never expires and is served inline + edge-cached (ideal for embedding an image in a page, a bot message, or a vision model's image_url). A signed link expires (1–365 days). Use fc.shares.revoke(link.id) to revoke either.

Errors

All errors derive from FluidCloudError: AuthError (401), QuotaExceededError (402), PermissionError_ (403), NotFoundError (404), ConflictError (409, e.g. sharing a file still being scanned), or ApiError.

Notes

  • The client is synchronous (httpx) and works as a context manager: with FluidCloud(api_key=...) as fc: ....
  • The SDK targets the versioned API (/api/v1).
  • Override the API origin with base_url=... if you have been given a different endpoint.

MIT licensed.

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

fluidcloud-0.1.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

fluidcloud-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fluidcloud-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e88f8a3e94cd64a3c236d5a758c561d633ecef553b670de028782a30f0415aa
MD5 41183e83510677168acd085d17a983c7
BLAKE2b-256 04065589dec968eba7ecd1dee95e12149db7fbe0a89eb7168ff075eb6c67e87a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fluidcloud-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c64c615da5975ea8af209a0d534ed91efbe350f58fdb57a287f0d69c5b9d137
MD5 b83a15c6755b7308ca4dae11ef251b9b
BLAKE2b-256 a0971f27babd95bb3c50bea2a07971426c955d20977589ddf785e018ba8e4d03

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