--- id: pyrage version: "1.3.0" license: MIT license_treatment: permissive maintenance: active --- # pyrage — Python bindings for rage (age in Rust) License: permissive · Maintenance: active · Downloads: 176.7K/mo ## What it is and what it does pyrage wraps the Rust implementation of age, a modern file encryption tool, exposing its cryptographic primitives to Python. It supports three encryption modes: identity-based encryption using x25519 keys (with key generation), SSH key-based encryption (reading OpenSSH private keys), and passphrase-based encryption. The package has no runtime dependencies and is distributed as compiled wheels for major platforms. The library is designed for developers who need age's encryption capabilities in Python applications without reimplementing the cryptography. It handles the complexity of key management, recipient lists, and encryption/decryption workflows through a straightforward API. The package is actively maintained, has no known vulnerabilities, and supports current Python versions. Use it for: - Encrypt sensitive files or data using x25519 identities generated within Python applications. - Decrypt age-encrypted files using SSH keys already present on the system. - Implement passphrase-protected encryption for user-supplied secrets in CLI tools or scripts. - Build multi-recipient encryption workflows where different identities can decrypt the same ciphertext. - Integrate age encryption into Python backend services without calling external binaries. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyrage provides Python bindings to the Rust implementation of age, enabling encryption and decryption using x25519 identities, SSH keys, or passphrases. Yes. pyrage is actively maintained, has no known vulnerabilities, and offers a clean Python interface to a well-regarded Rust cryptographic library. Install friction is moderate due to compiled bindings, but wheels cover common platforms. Use it if you need age encryption in Python and prefer native bindings over subprocess calls to external tools. ## Install pip install pyrage uv add pyrage poetry add pyrage ## Installing pyrage Before you install: Medium install friction due to compiled Rust bindings; wheels are available for Linux x86_64/aarch64, macOS (Intel and Apple Silicon), and Windows x86_64. Requires Python 3.9+. Maintenance is active with recent commits and no known vulnerabilities. License in practice: MIT license is permissive; you can use, modify, and distribute pyrage freely in commercial and private projects with minimal restrictions. Quickstart: pip install pyrage from pyrage import x25519, encrypt, decrypt ident = x25519.Identity.generate() recipient = ident.to_public() encrypted = encrypt(b"secret", [recipient]) decrypted = decrypt(encrypted, [ident]) Requires Python 3.9 or later; compiled wheels are available for common platforms but may require a Rust toolchain if building from source. Verify before relying: - Whether type stubs (pyrage-stubs) are necessary for your workflow or optional. - Performance characteristics compared to pure-Python age implementations, if any exist. - Whether SSH key support covers all OpenSSH formats or has limitations. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 176.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags age encryption python, rust age bindings, x25519 encryption, passphrase encryption decryption, ssh key encryption, identity-based encryption, age cryptography, cryptography, rust-bindings, encryption [View on SkillFed](https://skillfed.io/packages/pyrage) · [View on PyPI](https://pypi.org/project/pyrage/)