Skip to main content

reVault for Python

reVault is a fast, local toolkit for creating secure portable archives called Lockboxes. Each Lockbox is encrypted, compressed, and signed. It can store files and directory trees, variables such as API keys, and forms such as login details.

Lockboxes are easy to copy, share, and back up, and they do not require a hosted service. The engine is designed for speed and effective compression. Applications can read, write, and seek within stored files without extracting the archive, and recover data from partial corruption. reVault provides a command line tool for everyday work and APIs for application code.

Read the reVault manual for the quick start, core concepts, and security model.

Your Vault holds your profile and contacts. The CLI protects a new Lockbox for your profile by default, and you can grant access to contacts using their public keys. Use password access when you do not have a recipient's contact (public key) details.

Platform wheels include the reVault engine and expose Python classes for Lockboxes, Vaults, keys, and the session agent.

Installation and native runtime

python -m pip install revault-api

PyPI publishes a wheel for each supported operating system and architecture. The wheel stores the matching library inside revault_api/_native, and the package loads it through ctypes. Installing from a source archive does not supply a library unless the package is assembled with the matching native files.

The complete method example index is maintained in the source repository.

from revault_api import Revault, SecretString, Vault

runtime = Revault.load()                 # loading does not open a Vault
signing = runtime.generate_profile_signing_key_pair()
public_signing_key = signing.public_key()
with runtime.lockbox_create(bytes(32)) as box:  # Lockbox held by this process
    box.set_owner_signing_key(signing)  # Profile becomes this Lockbox's owner
    box.add_file("/hello.txt", b"hello\n", False)
    box.set_variable("owner", "alice")
    box.set_secret_variable("token", bytearray(b"secret"))
    size = box.with_secret_variable("token", lambda token: len(token))
    box.commit()
public_signing_key.close()
signing.close()

with SecretString("Vault passphrase") as vault_passphrase:
    persistent = Vault.open_or_create("/tmp/revault-vault", vault_passphrase)
    persistent.close()

Revault.load(native_library_path=...) can load a native library supplied by the application. Otherwise, reVault checks REVAULT_LIBRARY and then the library inside the installed wheel. A bare name uses the operating system search path.

The value passed to a secret callback is a temporary bytearray; it is cleared after the callback. Do not convert it to a retained str or bytes. SecretString and SecretBytes own mutable buffers and wipe them on close(). Ordinary Lockbox operations never contact the agent.

Core API concepts

  • Revault loads the runtime.
  • Vault owns persistent local state.
  • Lockbox owns an open archive.
  • AgentSession caches selected content keys.

Prefer context managers and close each object independently.

API documentation and support

The wheel ships typed public classes and method docstrings. Use help(revault_api) or an API documentation generator for the installed version. The method examples and Python conformance program cover the common operation inventory.

Create, open, and replace

Open methods require existing Vaults and Lockboxes; they never create missing state. Use open or create only when creation is acceptable and replacement methods only after an explicit destructive choice. commit() persists pending Lockbox changes. close() releases the handle and content key held by the current process but does not commit or delete the archive.

Open that archive using its Lockbox password, a profile key, or a credential resolved from the Vault. A profile signing key becomes a Lockbox owner key only after explicit assignment.

Secrets, exceptions, and ownership

A vault passphrase, Lockbox password, and 32-byte content key are different secrets. Use SecretString, SecretBytes, and mutable bytearray values; close or clear them promptly. Python str and bytes objects cannot be reliably wiped.

Use context managers for every Vault, Lockbox, key, secret, and agent value. Secret callbacks receive a temporary bytearray that is cleared after return and must not escape. Native failures raise typed exceptions with structured details and recovery guidance.

Optional session agent

Ordinary Lockbox opens never start or consult the agent. Use AgentSession when Lockbox keys need to be shared across processes or remain available after the process that opened the Lockbox exits. Closing an entry forgets the agent's cached key; it does not delete the Lockbox or a credential stored in the Vault.

Platform credential store

The operating system credential store can hold the Vault passphrase. The user's operating system login normally unlocks that store. After login, another process running as that user may be able to retrieve the passphrase if the access policy applied to the saved Vault passphrase does not require approval for each retrieval. Exact access depends on the operating system, the credential store configuration, and that access policy.

A process that retrieves the Vault passphrase can open the Vault. The Vault can then provide access to Lockboxes through profile keys or remembered Lockbox passwords. Both remain encrypted inside the Vault; they are not copied to the operating system credential store.

Agent expiry improves memory hygiene. It is not an authentication boundary after login if the saved Vault passphrase can be retrieved without approval.

Missing or placeholder package docstrings are binding defects; the executable conformance program is the worked reference for each operation.

Storage compatibility and maintenance

The 0.6.x CLI and bindings use archive format 5 and Vault structure 3. Use native and WASM carriers from the same package release. The 0.5.x line uses format 4 and cannot open format-5 archives; upgrade every consuming application before migration. Migrate the Vault first with lockbox doctor migrate vault --replace, then each archive with lockbox doctor migrate lockbox <path> --replace; retain the migration backups. These changes do not add facade methods. Writable file opens inherit native transaction recovery; explicit read-only opens can report recovery required. A commit error may occur after publication, so reopen and inspect persisted state before retrying. With library handles closed, use the CLI's lockbox <path> doctor compact for explicit compaction; it discards old commit history. See the repository's v4 binding contract and release checks.

Reciprocal contact exchange

Use the shared Rust-backed ContactExchange workflow to exchange one Profile's encryption and signing public keys in both directions. Sessions retain protected Vault credentials but release every Vault lock before network calls or user interaction. Compare both identities and the entire fingerprint through an independently authenticated channel before saving a Contact.

The exchange guide documents each language's entry point, credential ownership, retries, verification, archive author checks, cancellation, and cleanup. The language's executable conformance runner covers session creation, offline status decoding and cleanup; the shared native/CLI tests cover reciprocal exchange and persisted archives.

Metadata

Release files for revault-api 0.6.2

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

Built distributions (wheels)

Table of built distributions (wheels) for revault-api 0.6.2
File Actions
revault_api-0.6.2-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for revault_api-0.6.2-py3-none-win_arm64.whl
revault_api-0.6.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for revault_api-0.6.2-py3-none-win_amd64.whl
revault_api-0.6.2-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details for revault_api-0.6.2-py3-none-manylinux_2_34_x86_64.whl
revault_api-0.6.2-py3-none-manylinux_2_34_aarch64.whl Python 3 none Linux glibc 2.34+ ARM64 Details for revault_api-0.6.2-py3-none-manylinux_2_34_aarch64.whl
revault_api-0.6.2-py3-none-macosx_11_0_universal2.whl Python 3 none macOS 11.0+ universal2 (ARM64, x86-64) Details for revault_api-0.6.2-py3-none-macosx_11_0_universal2.whl
revault_api-0.6.2-py3-none-macosx_10_13_universal2.whl Python 3 none macOS 10.13+ universal2 (ARM64, x86-64) Details for revault_api-0.6.2-py3-none-macosx_10_13_universal2.whl

Total release size: 32.7 MB

Release files / revault_api-0.6.2-py3-none-win_arm64.whl

Download URL revault_api-0.6.2-py3-none-win_arm64.whl
Size 4.9 MB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
dad3d70fcf6bdbb04d5e598d8b3e345b87f382e4ba788d0c9ca7de4fde3b25d2
BLAKE2b-256 checksum
How to use checksums
a54470e6a7e0c4e097b473ce3b7daec2dd84a8658696f4aab00d3eb332c348a8
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 2, 2026.

Transparency log

Release files / revault_api-0.6.2-py3-none-win_amd64.whl

Download URL revault_api-0.6.2-py3-none-win_amd64.whl
Size 5.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
bd237ba707b9c53612b9431f8f5c39aad8064e0cdb132fae61102f9dc33ce2e2
BLAKE2b-256 checksum
How to use checksums
1eb740bec6bd176fe85455490c808f70bc5e8956272a91f9ca8082fc9131f412
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 2, 2026.

Transparency log

Release files / revault_api-0.6.2-py3-none-manylinux_2_34_x86_64.whl

Download URL revault_api-0.6.2-py3-none-manylinux_2_34_x86_64.whl
Size 6.7 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6ae0d0ce0fa1be7bbaa229b4017abbc48f0373af8968c44318151e2e198eab33
BLAKE2b-256 checksum
How to use checksums
a7a78f3769017f54f4a6dc99b5b76ac117f4cf2317410cd340d33298e8a8d030
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 2, 2026.

Transparency log

Release files / revault_api-0.6.2-py3-none-manylinux_2_34_aarch64.whl

Download URL revault_api-0.6.2-py3-none-manylinux_2_34_aarch64.whl
Size 6.4 MB
Tags Linux glibc 2.34+ ARM64 Python 3
SHA-256 checksum
How to use checksums
5e3d09f15fdc8aa905426e1419b2170afab9f58ff9515309627ac7dee549d180
BLAKE2b-256 checksum
How to use checksums
7dba6f5c4fec2d8b0576fe611d1170d8d9d2dfd82229d690017c5964947dfca2
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 2, 2026.

Transparency log

Release files / revault_api-0.6.2-py3-none-macosx_11_0_universal2.whl

Download URL revault_api-0.6.2-py3-none-macosx_11_0_universal2.whl
Size 4.5 MB
Tags Python 3 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
74f56434dc8c7352441d4da7de33ddb3a538f7d2dc9562630817f6b3ae2f4ca3
BLAKE2b-256 checksum
How to use checksums
4ad169f2fdfc4fa4c835d7e9eef62dbfdc4907208c260d171dd37ef9dbf55df5
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 2, 2026.

Transparency log

Release files / revault_api-0.6.2-py3-none-macosx_10_13_universal2.whl

Download URL revault_api-0.6.2-py3-none-macosx_10_13_universal2.whl
Size 5.0 MB
Tags Python 3 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
ed4641a54cccbc4b474d658e6670f74b4f79504bbf22d4b8bef80624a2844134
BLAKE2b-256 checksum
How to use checksums
259cef8c9e779e8bcc93353bdb6d666e0079ae8dd179ddd5909ed46e30264bb2
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 2, 2026.

Transparency log

Security for revault-api 0.6.2

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for revault_api-0.6.2-py3-none-win_arm64.whl

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 2, 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