Skip to main content

pyrage

CI PyPI version PyPI Downloads

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrage-1.4.0.tar.gz (32.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyrage-1.4.0-cp310-abi3-win_amd64.whl (848.2 kB view details)

Uploaded CPython 3.10+Windows x86-64

pyrage-1.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (924.7 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

pyrage-1.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (883.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

pyrage-1.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (1.7 MB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file pyrage-1.4.0.tar.gz.

File metadata

  • Download URL: pyrage-1.4.0.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyrage-1.4.0.tar.gz
Algorithm Hash digest
SHA256 545bf188e8d217ec88c32bc8e8bf56026c8c0b1b1f96d2688cedf1427ab0e827
MD5 08b3252ae757a126d07e2e65002fc283
BLAKE2b-256 15a4612910dbedf7d9fb24ec58474849438b6f88e078e1a100f73a54a605d228

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrage-1.4.0.tar.gz:

Publisher: release.yml on woodruffw/pyrage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrage-1.4.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: pyrage-1.4.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 848.2 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyrage-1.4.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c4a5dcd24a14b5e0d4cccff13649a2b8f1609ad45d6438bb85f35d84b0c8155e
MD5 c16910e14cd3fc163938c880ac33a6f0
BLAKE2b-256 d38c354fdb9ee7b45a2060272c623536b2cf9f0996de2242eaac177cff3f8003

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrage-1.4.0-cp310-abi3-win_amd64.whl:

Publisher: release.yml on woodruffw/pyrage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrage-1.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyrage-1.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f4eb0cbc2b4aee5deac9862c47b3895866df5554153951af822e9c581e68558
MD5 64617bc3a8dfb8ab849054b94fb54465
BLAKE2b-256 d9f041da7d88cfdad2eba492f3275ec50a65916ccd3a78140fb15875569ad1ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrage-1.4.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on woodruffw/pyrage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrage-1.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyrage-1.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f868b360ccd3f836326d42b532fae3e8eb8340a88cca0a39c0ae10fce68f6cc5
MD5 a4822d4b6a0ca1c1d39f7e142580c5af
BLAKE2b-256 5acbd88aaab0b89141802473f6139fe8e05519d1b6ac06bff8231a1378a5674f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrage-1.4.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on woodruffw/pyrage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrage-1.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for pyrage-1.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 bcf4177aea91a9f48951db8001c1385baafbae62cc15d691ef43efebaab6b8db
MD5 26920b80cd1ca0c2cb96157ce2557854
BLAKE2b-256 13bb6b167a449e95ecf0eaf4277c949a89a29dfc08cc533f710a9e6f12bef513

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrage-1.4.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on woodruffw/pyrage

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.4.0 This release

5 files

1.3.0

5 files

1.2.5

5 files

1.2.4

5 files

1.2.3

4 files

1.2.2

4 files

1.2.1

4 files

1.1.2

4 files

1.1.1

3 files

1.0.3

3 files

1.0.2

4 files

1.0.1

2 files

1.0.0

5 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page