No summary available
Project Links
Meta
Requires Python: >=3.10
Classifiers
Operating System
- POSIX :: Linux
Programming Language
- Rust
pyrage
Python bindings for the Rust implementation of age.
Index
Installation
You can install pyrage with pip:
$ python -m pip install pyrage
PEP 561-style type stubs are also available:
$ python -m pip install pyrage-stubs
See the development instructions below for manual installations.
Usage
Identity generation (x25519 only)
from pyrage import x25519
ident = x25519.Identity.generate()
# returns the public key
ident.to_public()
# returns the private key
str(ident)
Identity-based encryption and decryption
from pyrage import encrypt, decrypt, ssh, x25519
# load some identities
alice = x25519.Identity.from_str("AGE-SECRET-KEY-...")
bob = ssh.Identity.from_buffer(b"---BEGIN OPENSSH PRIVATE KEY----...")
# load some recipients
carol = x25519.Recipient.from_str("age1z...")
dave = ssh.Recipient.from_str("ssh-ed25519 ...")
# encryption
encrypted = encrypt(b"bob can't be trusted", [carol, dave, alice.to_public()])
# decryption
decrypted = decrypt(encrypted, [alice, bob])
Passphrase encryption and decryption
from pyrage import passphrase
encrypted = passphrase.encrypt(b"something secret", "my extremely secure password")
decrypted = passphrase.decrypt(encrypted, "my extremely secure password")
Development
$ source env/bin/activate
$ make develop
Licensing
pyrage is released and distributed under the terms of the MIT License.
1.4.0
Aug 23, 2026
1.3.0
Jun 14, 2025
1.2.5
Apr 02, 2025
1.2.4
Feb 18, 2025
1.2.3
Dec 19, 2024
1.2.2
Nov 24, 2024
1.2.1
Sep 26, 2024
1.1.3rc1
Jan 18, 2024
1.1.2
Dec 09, 2023
1.1.1
Jul 11, 2023
1.0.3
Mar 21, 2023
1.0.3rc2
Mar 21, 2023
1.0.2
Jan 11, 2023
1.0.2rc2
Jan 11, 2023
1.0.1
Sep 10, 2022
1.0.1rc7
Sep 10, 2022
1.0.1rc6
Sep 07, 2022
1.0.1rc1
Sep 07, 2022
1.0.0
Aug 04, 2022
0.1.1rc2
Jul 20, 2022
0.1.1rc1
Jul 20, 2022
Wheel compatibility matrix
| Platform | CPython >=3.10 (abi3) |
|---|---|
| macosx_10_12_universal2 | |
| macosx_10_12_x86_64 | |
| macosx_11_0_arm64 | |
| manylinux2014_aarch64 | |
| manylinux2014_x86_64 | |
| manylinux_2_17_aarch64 | |
| manylinux_2_17_x86_64 | |
| win_amd64 |
Files in release
pyrage-1.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (1.6MiB)
pyrage-1.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (862.3KiB)
pyrage-1.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (903.0KiB)
pyrage-1.4.0-cp310-abi3-win_amd64.whl (828.3KiB)
pyrage-1.4.0.tar.gz (31.4KiB)
No dependencies