{"id":28097,"library":"pyrage","title":"pyrage","description":"Python bindings for rage (age in Rust). Provides encryption/decryption using age keys. Version 1.3.0, active development, monthly/bimonthly releases.","status":"active","version":"1.3.0","language":"python","source_language":"en","source_url":"https://github.com/woodruffw/pyrage","tags":["encryption","age","rust","cryptography"],"install":[{"cmd":"pip install pyrage","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":null,"wrong":null,"symbol":"generate","correct":"from pyrage import x25519"}],"quickstart":{"code":"from pyrage import x25519\nfrom pyrage import encrypt, decrypt\n\n# Generate a key\nkeys = x25519.Identity.generate()\nprint(\"Identity (secret):\", str(keys))\nprint(\"Recipient (public):\", str(keys.to_public()))\n\n# Encrypt a message\nplaintext = b\"Hello, age!\"\nrecipients = [keys.to_public()]\nencrypted = encrypt(plaintext, recipients)\nprint(\"Encrypted:\", encrypted)\n\n# Decrypt\nidentities = [keys]\ndecrypted = decrypt(encrypted, identities)\nprint(\"Decrypted:\", decrypted)","lang":"python","description":"Key generation, encryption, and decryption with pyrage."},"warnings":[{"fix":"Encode strings with `.encode()` before encrypting; decode with `.decode()` after decrypting.","message":"The `encrypt` and `decrypt` functions expect bytes, not strings. Provide bytes-like objects.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.9+.","message":"Python 3.8 support dropped in v1.2.2. Requires Python >=3.9.","severity":"deprecated","affected_versions":">=1.2.2"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install pyrage`. Ensure you're in the correct virtual environment.","cause":"pyrage not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'pyrage'"},{"fix":"Use `from pyrage import encrypt` or `import pyrage; pyrage.encrypt(...)`","cause":"Wrong import path. `encrypt` is a top-level function, not under a submodule.","error":"AttributeError: module 'pyrage' has no attribute 'encrypt'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}