Skip to main content

atmovault-client

Read and write files in an Atmovault vault from your own program.

Atmovault is end-to-end encrypted file storage: files are encrypted before they leave the machine, so the server stores ciphertext and never sees a file's contents or its name. That means a program cannot simply call a REST API on the server and get a document back. Something on your side has to hold the key and do the encryption. This package is that something, in three forms:

  • A gateway. A small HTTP server you run next to your program. Your code makes plain HTTP requests to 127.0.0.1, in any language, and the gateway encrypts and decrypts.
  • A Python library, if your program is written in Python.
  • A command line, atmovault-service, for scripts and for trying things out.

All three use the same code and the same API key.

your program  --plain HTTP-->  gateway (your machine)  --ciphertext-->  Atmovault

Contents

Getting a key

The owner of the vault makes one in Settings -> Services -> New API key. They pick a folder, choose View (read only) or Edit (add, rename, move, trash), and set an end date. The key is shown once:

atmv1_...   (156 characters)

A key reaches only the folder it was made for. Nothing a key does is permanent: what it deletes goes to the owner's trash, what it replaces keeps its old version, and the owner sees everything it did, with Undo.

Install

Python 3.11 or newer.

pip install "atmovault-client[gateway] @ git+https://github.com/hb1dys/atmovault-client"

Leave out [gateway] if you only want the library and the command line. That drops FastAPI and uvicorn and leaves two dependencies, cryptography and httpx.

Or build the gateway as a container:

docker build -t atmovault-gateway https://github.com/hb1dys/atmovault-client.git
docker run -d --name atmovault-gateway \
  -p 127.0.0.1:8200:8200 \
  -v atmovault-state:/state \
  atmovault-gateway

Quickstart

Put the key in the environment, never in your code or your repository:

export ATMOVAULT_API_KEY=atmv1_...

Start the gateway:

atmovault-service serve

Upload a file into the folder the key was made for, here called Finance:

curl -T invoice.pdf -H "Authorization: Bearer $ATMOVAULT_API_KEY" \
  http://127.0.0.1:8200/v1/files/Finance/invoice.pdf

List the folder:

curl -H "Authorization: Bearer $ATMOVAULT_API_KEY" http://127.0.0.1:8200/v1/list/Finance

Download the file:

curl -o invoice.pdf -H "Authorization: Bearer $ATMOVAULT_API_KEY" \
  http://127.0.0.1:8200/v1/files/Finance/invoice.pdf

The same three calls from PHP, Node, Go or anything else are ordinary HTTP requests with one header.

HTTP API

Base URL http://127.0.0.1:8200. Every request except /healthz carries Authorization: Bearer <key>. A path starts at the name of the key's folder.

Method and path Needs What it does
GET /healthz nothing {"ok": true} when the gateway is up
GET /v1 any key Checks the key and lists the folders it reaches
GET /v1/list/<path> View What is in a folder. ?limit=, ?offset=
GET /v1/meta/<path> View One file or folder, without its bytes
GET /v1/files/<path> View A file's bytes. ?download=1, Range
PUT /v1/files/<path> Edit Upload the request body. ?replace=true adds a version
POST /v1/folders/<path> Edit Make a folder
POST /v1/move Edit Rename or move: {"from": "<path>", "to": "<path>"}
DELETE /v1/files/<path> Edit Move a file or folder to the owner's trash
GET /v1/versions/<path> Edit Every version a file has had, newest first

Errors always look the same, with a code to match on:

{"error": {"code": "not_found", "message": "nothing called 'a.pdf' here"}}

The full reference, with the item format, every error code and the limits, is in docs/api.md. A running gateway serves the same pages at /docs and an OpenAPI description at /openapi.json.

Command line

atmovault-service ls                             the folders this key reaches
atmovault-service ls Finance                     what is in a folder
atmovault-service get Finance/invoice.pdf        download and decrypt
atmovault-service put scan.pdf Finance           encrypt and upload
atmovault-service put scan.pdf Finance --replace a new version of Finance/scan.pdf
atmovault-service mkdir Finance/2026
atmovault-service rename Finance/scan.pdf invoice.pdf
atmovault-service mv Finance/invoice.pdf Finance/2026
atmovault-service rm Finance/old.txt             to the owner's trash
atmovault-service serve                          run the gateway

Any part of a path can be an item's id instead of its name. Two items in one folder can share a name, because the server never sees names, and the id is how you tell them apart.

Python library

import os
from atmovault_client import connect

key = os.environ["ATMOVAULT_API_KEY"]

with connect("https://atmovault.app/api", key, "atmovault-state") as vault:
    finance = vault.find("Finance")

    for item in vault.children(finance):
        print(item.path, item.size)

    with open("invoice.pdf", "rb") as f:
        vault.upload(finance, "invoice.pdf", f, "application/pdf")

    data = vault.read(vault.find("Finance/invoice.pdf"))
Method
grants() the folders the key reaches
find(path) an item by path
children(folder), walk(folder) what is in a folder, or everything beneath it
read(file), read_into(file, out), read_chunks(file) a file's bytes, whole or a chunk at a time
upload(folder, name, data, mime) add a file; data is bytes or an open binary file
new_version(file, data) replace a file's bytes, keeping the old ones in its history
mkdir(folder, name), rename(item, name), move(item, folder), trash(item)
versions(file) a file's history

Large files are read and written 4 MiB at a time, so memory use stays flat. An upload resumes by itself if the connection drops.

Exceptions: ApiError (the server refused; it has status and detail), Untrusted (a folder the owner did not sign over to this key), KeyOutOfDate (the owner changed their password; ask for a new key), Ambiguous (two items share that name) and DecryptError.

Configuration

Option Environment Default
ATMOVAULT_API_KEY the key, for the command line. The gateway takes it per request
--url ATMOVAULT_URL https://atmovault.app/api the vault's API root
--state ATMOVAULT_STATE atmovault-state the state folder, see below
serve --host 127.0.0.1 where the gateway listens
serve --port 8200

The state folder holds one small file per key: the newest key version seen of each folder and the newest version written of each file. That is what lets the client notice a server replaying something old. It contains no key and nothing readable. Keep it on storage that survives a restart (a Docker volume, not the container's own filesystem) and writable only by the user the program runs as.

More on running it in production: docs/running.md.

Security

The short version. The long one is in docs/security.md.

  • The API key is a private key. It carries the token the server knows your program by and the private key that opens the folder. Only the token is ever sent to the server. Whoever has the string can read the folder, so keep it in the environment of the one process that needs it.
  • The server is not trusted to say what the key may open. A folder is used only if the vault's owner signed it over to this key, and the client checks that signature before reading or writing anything.
  • After the owner changes their password, the key stops working and the client says so. The owner issues a replacement with one click.
  • The gateway listens on 127.0.0.1 and speaks plain HTTP. Do not expose it. It keeps no key on disk and writes no request log, because a path is a decrypted name.
  • Treat what you read as untrusted input. File names, types and contents are whatever the writer put there. Do not build a path, a shell command or an HTML page from them without checking.
  • https:// only. A plain http:// vault address is refused unless it is this machine or you pass --allow-http, and redirects are never followed.

Found a vulnerability? Please report it privately, as described at https://atmovault.app/security.html, rather than in a public issue.

Development

git clone https://github.com/hb1dys/atmovault-client
cd atmovault-client
uv sync
uv run pytest -q
uv run ruff check . && uv run ruff format --check . && uv run mypy

The tests need no network and no vault. tests/conftest.py is a fake server, including one that forges grants and signatures the way a hostile server could. tests/fixtures holds known-answer vectors shared with the Atmovault web app, so the two implementations are held to the same bytes.

Issues and pull requests are welcome. The encrypted format is fixed by those vectors and by files people have already stored, so a change to it is not something a pull request can make on its own.

License

Apache License 2.0. It covers this client and gateway. The Atmovault server and web app are not open source.

Metadata

Release files for atmovault-client 0.1.0

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

Source distribution (sdist)

Source distribution for atmovault-client 0.1.0
File Size Uploaded Provenance Actions
atmovault_client-0.1.0.tar.gz 136.6 kB With provenance Details for atmovault_client-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for atmovault-client 0.1.0
File Interpreter ABI Platform Actions
atmovault_client-0.1.0-py3-none-any.whl Python 3 none any Details for atmovault_client-0.1.0-py3-none-any.whl

Total release size: 186.0 kB

Release files / atmovault_client-0.1.0.tar.gz

Download URL atmovault_client-0.1.0.tar.gz
Size 136.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cb6ee61fcf9377d5a7f4c0718fd699f52d8d3fde9d41411dfe0359615fbe4bd6
BLAKE2b-256 checksum
How to use checksums
aed4874f14108261507f07998ba83bd6f3ca1a5a713074eb825b21806856ac67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

Release files / atmovault_client-0.1.0-py3-none-any.whl

Download URL atmovault_client-0.1.0-py3-none-any.whl
Size 49.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f87d54d978a90e1072b53f23d3137ee3fb6213ca07a12a6ef7e16bd6d6c980b
BLAKE2b-256 checksum
How to use checksums
aae08ee112a0ef0214080a81b2f14d44fe23ca02c34d3f80a7626c132c1fc2f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

Security for atmovault-client 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for atmovault_client-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 Nov 16, 2026.

Transparency log

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