README.md

January 12, 2026 ยท View on GitHub

Python module for the Rust keyring

build

This Rust crate, when built using the PyO3 project's maturin tool, produces a Python module that can be used to access the keyring ecosystem from Python. The built module is available on PyPI in the rust-native-keyring project; use

pip install rust-native-keyring

to install it and

import rust_native_keyring

to load it into your Python REPL. Here is a sample of what you can do:

import rust_native_keyring as rnk

rnk.use_named_store("sample", { 'backing-file': 'sample-test.ron' })
rnk.store_info()

entry = rnk.Entry('service', 'user')
entry.set_password('test password')
entry.info()
entry.get_credential().info()
if entry.get_password() == 'test password':
    print('Passwords match!')

e2 = rnk.Entry('service', 'user2')
e2.set_password('test password 2')
entries = rnk.Entry.search({ 'service': 'service' })
print(list(map(lambda e: e.info(), entries)))

rnk.release_store()

The crate doc gives more details on the API.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.