Mountable SDK for Python
Read, write, delete, list and follow the files of a Mountable filesystem over HTTPS from a backend, without mounting it, and create one-time mount tickets for sandboxes.
Not on PyPI yet. Until the first sdk-vX.Y.Z release, install from a
checkout of this repository:
pip install ./sdk/python # run from the repository root
Python 3.10+, synchronous, one dependency (httpx).
Example
from mountable_sdk import Mountable, MountableError
client = Mountable() # MOUNTABLE_API_KEY; MOUNTABLE_API_URL or https://mountable.io
fs = client.filesystem("fs_…", mode="rw") # sends nothing until first used
info = fs.write("tickets/AB-42.md", "# AB-42\n")
fs.write("tickets/AB-42.md", "# AB-42, edited\n", if_match=info.etag)
try:
fs.write("tickets/AB-42.md", "lost update", if_match=info.etag)
except MountableError as e:
if e.code == "precondition_failed":
print("changed meanwhile; now", e.current_etag)
file = fs.read("tickets/AB-42.md") # file.data (bytes), file.info (FileInfo)
fs.delete("tickets/AB-42.md", if_match=file.info.etag)
ticket = client.create_mount_ticket(
"fs_…", mode="ro", max_duration_seconds=12 * 3600, idempotency_key="job-42"
)
# hand ticket.ticket to the sandbox: mountable mount --ticket-stdin DIR
# Stay in sync: take a cursor first, then list, then follow changes from it.
def resync() -> str:
cursor = fs.changes().cursor # 1. a cursor first
page = fs.list("tickets") # 2. then list (page.next pages on)
for entry in page.entries:
print(entry.path, entry.etag)
return cursor
cursor = resync()
while True: # 3. then follow changes from the cursor
try:
batch = fs.changes(cursor=cursor, wait=25)
except MountableError as e:
if e.code != "cursor_expired":
raise
cursor = resync() # history is gone: start over
continue
for event in batch.events: # invalidations: reconcile each path to event.file
print(event.type, event.path, event.file and event.file.etag)
cursor = batch.cursor
Behaviour
- The handle creates a one-hour token session on its first call and keeps
the token in memory only. A
401, or a session within 60 seconds of its expiry, makes it create a new one and send the call once more. - Every failure raises
MountableErrorwithstatus, the API's stablecode,message,current_etag(forprecondition_failed) andretry_after. Network failures havecode == "network_error". API keys and tokens never appear in errors. - Only a
2xxanswer is a success; redirects are not followed. - Only reads (
read,list,changes) are retried, once, after a network failure.writeanddeleteare never retried: after a timeout the outcome is unknown, and a conditional write makes your own retry safe. - A request fails with
network_errorafter 60 seconds without an answer;changeswaits 60 seconds pluswait. create_mount_ticketreturns the ticket once, in.ticket; it is left out of the result'srepr. Reuse youridempotency_keyto retry after an unknown outcome; a replay returns the session withticketNone.
Documentation: https://mountable.io/docs. The behaviour shared with the
TypeScript SDK is listed in
sdk/contract.md.
License
Metadata
Release files for mountable-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mountable_sdk-0.1.0.tar.gz | 32.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mountable_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.5 kB
Release files / mountable_sdk-0.1.0.tar.gz
| Download URL | mountable_sdk-0.1.0.tar.gz |
|---|---|
| Size | 32.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c05b105ab51f7f4d793b86a60d13b6fd1551125c45a6a75901b06254e80b7ecd
|
|
BLAKE2b-256 checksum How to use checksums |
2095343822da48fd2eeb22c10fe0a3e451394da859bb7478de91145dbe29fc3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logRelease files / mountable_sdk-0.1.0-py3-none-any.whl
| Download URL | mountable_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1096da93e489062524b9d45cc68d253b39f0c5795070f25565f05e8cfb01a2f2
|
|
BLAKE2b-256 checksum How to use checksums |
0cfc8f75c72b96ca11ae086c8e3e6b1a905e3053f83dbd04734e525fe86a386b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logSecurity for mountable-sdk 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mountable_sdk-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.
Transparency logA 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.