Metadata-Version: 2.1
Name: rskeyring
Version: 0.1.0
Summary: A C-level keyring module ported from the Rust programming language (crates.io)
Home-page: https://github.com/DK26/pyrust-keyring
Author: David Krasnitsky
Author-email: dikaveman@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# pyrust-keyring
A C-level conversion to Python (cpython) of the Rust keyring crate by hwchen (https://github.com/hwchen/keyring-rs).

# Motivation
Since using _pypi.org_ keyring library to store sensitive data with the PyInstaller library  
isn't possible at the moment due to the error `keyring.errors.NoKeyringError` and since   
it has been like this for a long time now, I've decided to try to port the Rust programming language  
keyring library (as I'm still learning it) to Python and been able to do so successfully.

Tested successfully on Windows 10 to work with PyInstaller.

# Usage

## Store Password
```python
import rskeyring
from getpass import getpass

username = input("Username: ")
password = getpass()

rskeyring.set_password("service", username, password)
```

## Retrieve Password
```python
import rskeyring

username = input("Username: ")
password = rskeyring.get_password("service", username)

print(password)
```

# Compile
In order to compile the Rust code, you'll need to have the `rustup` toolchain.  
To install the `rustup` toolchain, go to https://rustup.rs

From within this directory, execute the next command to compile:  
`cargo build --release`

# Use Compiled Library

## Windows
Copy the file `pyrust-keyring\target\release\rskeyring.dll` to your Python project. Make sure you rename its extension from `.dll` to `.pyd`.

## MacOS
Copy the file `pyrust-keyring/target/release/rskeyring.dylib` to your Python project. Make sure you rename its extension from `.dylib` to `.so`.




# Docs

`help(rskeyring)`





