Registry / auth-security / pyrage

pyrage

JSON →
library1.3.0pypypi✓ verified 86d ago

Python bindings for rage (age in Rust). Provides encryption/decryption using age keys. Version 1.3.0, active development, monthly/bimonthly releases.

pip install pyrage
INSTALL
IMPORT
SIG · PYRAGE
P
pyrage
auth-securitypythonv1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

generate
from pyrage import x25519

Key generation, encryption, and decryption with pyrage.

from pyrage import x25519 from pyrage import encrypt, decrypt # Generate a key keys = x25519.Identity.generate() print("Identity (secret):", str(keys)) print("Recipient (public):", str(keys.to_public())) # Encrypt a message plaintext = b"Hello, age!" recipients = [keys.to_public()] encrypted = encrypt(plaintext, recipients) print("Encrypted:", encrypted) # Decrypt identities = [keys] decrypted = decrypt(encrypted, identities) print("Decrypted:", decrypted)
Debug
Known issues
gotchaThe `encrypt` and `decrypt` functions expect bytes, not strings. Provide bytes-like objects.
fix
Encode strings with `.encode()` before encrypting; decode with `.decode()` after decrypting.
affects: all
deprecatedPython 3.8 support dropped in v1.2.2. Requires Python >=3.9.
fix
Upgrade to Python 3.9+.
affects: >=1.2.2
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyrage'
pyrage not installed or installed in wrong environment.
fix
Run `pip install pyrage`. Ensure you're in the correct virtual environment.
AttributeError: module 'pyrage' has no attribute 'encrypt'
Wrong import path. `encrypt` is a top-level function, not under a submodule.
fix
Use `from pyrage import encrypt` or `import pyrage; pyrage.encrypt(...)`
Upgrade
Version history
1.3.0latest on PyPI · released Jun 14, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
pyrage — pip install pyrage · libregistry