{"id":13725754,"url":"https://github.com/woodruffw/pyrage","last_synced_at":"2025-04-04T18:05:47.274Z","repository":{"id":36984776,"uuid":"504715417","full_name":"woodruffw/pyrage","owner":"woodruffw","description":"Python bindings for rage (age in Rust)","archived":false,"fork":false,"pushed_at":"2025-03-26T00:21:04.000Z","size":227,"stargazers_count":63,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:07:42.903Z","etag":null,"topics":["age","encryption-decryption","python","rust","ssh","x25519"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyrage/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/woodruffw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"woodruffw","thanks_dev":"u/gh/woodruffw"}},"created_at":"2022-06-18T01:31:47.000Z","updated_at":"2025-03-26T00:21:04.000Z","dependencies_parsed_at":"2023-12-18T18:42:42.217Z","dependency_job_id":"321b43cc-909d-49f8-aac2-7e728d074e14","html_url":"https://github.com/woodruffw/pyrage","commit_stats":{"total_commits":142,"total_committers":9,"mean_commits":"15.777777777777779","dds":"0.38732394366197187","last_synced_commit":"54d4dd95e6f62627372bb4400fcf66a907a8ab6a"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fpyrage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fpyrage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fpyrage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodruffw%2Fpyrage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woodruffw","download_url":"https://codeload.github.com/woodruffw/pyrage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["age","encryption-decryption","python","rust","ssh","x25519"],"created_at":"2024-08-03T01:02:33.878Z","updated_at":"2025-04-04T18:05:47.268Z","avatar_url":"https://github.com/woodruffw.png","language":"Rust","funding_links":["https://github.com/sponsors/woodruffw","https://thanks.dev/u/gh/woodruffw"],"categories":["Rust","Implementations"],"sub_categories":[],"readme":"pyrage\n======\n\n[![CI](https://github.com/woodruffw/pyrage/actions/workflows/ci.yml/badge.svg)](https://github.com/woodruffw/pyrage/actions/workflows/ci.yml)\n[![PyPI version](https://badge.fury.io/py/pyrage.svg)](https://badge.fury.io/py/pyrage)\n[![PyPI Downloads](https://static.pepy.tech/badge/pyrage)](https://pepy.tech/projects/pyrage)\n\nPython bindings for the [Rust implementation of `age`](https://github.com/str4d/rage).\n\n## Index\n\n* [Installation](#installation)\n* [Usage](#usage)\n* [Development](#development)\n* [Licensing](#licensing)\n\n## Installation\n\nYou can install `pyrage` with `pip`:\n\n```console\n$ python -m pip install pyrage\n```\n\n[PEP 561](https://peps.python.org/pep-0561/)-style type stubs are also available:\n\n```console\n$ python -m pip install pyrage-stubs\n```\n\nSee the [development instructions](#development) below for manual installations.\n\n## Usage\n\n### Identity generation (x25519 only)\n\n```python\nfrom pyrage import x25519\n\nident = x25519.Identity.generate()\n\n# returns the public key\nident.to_public()\n\n# returns the private key\nstr(ident)\n```\n\n### Identity-based encryption and decryption\n\n```python\nfrom pyrage import encrypt, decrypt, ssh, x25519\n\n# load some identities\nalice = x25519.Identity.from_str(\"AGE-SECRET-KEY-...\")\nbob = ssh.Identity.from_buffer(b\"---BEGIN OPENSSH PRIVATE KEY----...\")\n\n# load some recipients\ncarol = x25519.Recipient.from_str(\"age1z...\")\ndave = ssh.Recipient.from_str(\"ssh-ed25519 ...\")\n\n# encryption\nencrypted = encrypt(b\"bob can't be trusted\", [carol, dave, alice.to_public()])\n\n# decryption\ndecrypted = decrypt(encrypted, [alice, bob])\n```\n\n### Passphrase encryption and decryption\n\n```python\nfrom pyrage import passphrase\n\nencrypted = passphrase.encrypt(b\"something secret\", \"my extremely secure password\")\ndecrypted = passphrase.decrypt(encrypted, \"my extremely secure password\")\n```\n\n## Development\n\n```console\n$ source env/bin/activate\n$ make develop\n```\n\n## Licensing\n\n`pyrage` is released and distributed under the terms of the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodruffw%2Fpyrage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoodruffw%2Fpyrage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodruffw%2Fpyrage/lists"}