mneme-storage (Python)
Official Python SDK for Mneme: encrypted file storage on Filecoin.
Files are encrypted on your computer and sent straight to Filecoin storage providers (2 copies). They never pass through Mneme or any other server.
Install
pip install mneme-storage
Needs Python 3.9 or newer.
Use
Create an API key in the Mneme web app (API Keys), then:
from mneme_storage import Mneme
mneme = Mneme(api_key="mnm_live_...")
file = mneme.upload("video.mp4") # returns when stored on Filecoin
print(file["id"], file["status"]) # file-42 stored_on_filecoin
mneme.download(file["id"], "copy.mp4") # verified and decrypted
print(mneme.list()["files"]) # your files, 100 per page
mneme.delete(file["id"])
| Method | What it does |
|---|---|
upload(path, wait=True, on_progress=None) |
Uploads one file. wait=False returns as soon as the bytes reached Filecoin; Mneme finishes on its own. |
upload_many(paths) |
Uploads many files in as few uploads as possible (cheaper). |
download(file_id, path) |
Downloads, checks every chunk, decrypts. |
list(offset=0, limit=100) |
One page of your files. |
get(file_id) |
One file's details. |
wait_until_stored(file_id) |
Waits until a file is stored on Filecoin. |
delete(file_id) |
Deletes a file. |
find_by_name(name) · find_by_hash(sha256_hex) |
Find your file by its name or by the SHA-256 of its content. |
filecoin_info(file_id) |
Where the file lives on Filecoin: providers, data sets, piece CIDs. |
account() · storage_stats() · list_keys() |
Quota and usage, vault totals, your API keys (names only). |
upload_status(upload_id) · cancel_upload(upload_id) |
State of an upload; cancel one that was started but not finished. Files returned by upload carry their "uploadId". |
Errors raise MnemeError (with .status, the HTTP status code).
Mainnet or testnet
The SDK uses mainnet (the live Mneme backend, real Filecoin) by default.
network="testnet" uses a Mneme test backend running on your computer
(npm run local in the Mneme project), which stores on the Filecoin
Calibration testnet with free test coins. The same code runs on both:
mneme = Mneme(api_key="mnm_live_...", network="testnet") # or "mainnet"
or, without touching the code: export MNEME_NETWORK=testnet. Use an API key
from the backend you talk to (the local site's API Keys page for testnet).
base_url= (or MNEME_BASE_URL) points the SDK at any other backend address.
Uploads count towards your plan exactly like uploads in the web app. Files you upload here open in the web app, and the other way round.
Metadata
Release files for mneme-storage 1.0.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 | Actions |
|---|---|---|---|---|
| mneme_storage-1.0.0.tar.gz | 11.4 kB | Without provenance | Details for mneme_storage-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mneme_storage-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mneme_storage-1.0.0-py3-none-any.whl |
Total release size: 23.1 kB
Release files / mneme_storage-1.0.0.tar.gz
| Download URL | mneme_storage-1.0.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b986b6e8010d4d188216177424c99c37cee4fb0974fd6a3f7112c5fb2081404c
|
|
BLAKE2b-256 checksum How to use checksums |
fe450682b68fdccef45c056244223c3a5e77ce8b743b297065b3bbb3159115bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Release files / mneme_storage-1.0.0-py3-none-any.whl
| Download URL | mneme_storage-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cce1e26dd07c7c60883068a2d6ae61b101003547ef696ecb703e9687f1a2074d
|
|
BLAKE2b-256 checksum How to use checksums |
e46118c067f8f17fc9b57ec626f96d05cece4d343e42cf0ca7b8517d53f265fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.9
|
Security for mneme-storage 1.0.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.
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.