No project description provided
Project description
dorky
A secure and flexible key management system for storing and managing service credentials.
Installation
pip install dorky
Usage
Basic Usage
from dorky import create_key
from dorky.impl.jsonfile import JsonBasedDorkyService
# Initialize the service with JSON file storage
service = JsonBasedDorkyService("keys.json")
# Create a new key
key = service.create_key(
username="john_doe",
service_name="my-service",
key_id="my-service-main" # optional
)
# Verify a key
is_valid = service.verify_key_str(key.encode())
# List all keys
all_keys = service.list_keys()
# List keys for a specific service
my_service_keys = service.list_keys(service_name="my-service")
# List keys for a specific user
user_keys = service.list_keys(username="john_doe")
# Delete a key
service.delete_key(key)
Using SQLite Storage
from dorky.impl.sqlite import SqliteBasedDorkyService
# Initialize the service with SQLite storage
service = SqliteBasedDorkyService("keys.db")
# Use the same interface as JSON storage
key = service.create_key("john_doe", service_name="my-service")
Key Format
Keys are stored in the following format:
service_name:username:key_id:password
The password is securely hashed using scrypt (default) or PBKDF2 before storage.
Development
Running Tests
pytest tests/
License
dorky is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dorky-0.0.1.tar.gz
(15.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dorky-0.0.1-py3-none-any.whl
(10.6 kB
view details)
File details
Details for the file dorky-0.0.1.tar.gz.
File metadata
- Download URL: dorky-0.0.1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2242309b1f8f766b1e5ee42f04ee0785c4b1fe4f762c3dbc5c4d9026e1be26e8
|
|
| MD5 |
9d7e05988e84dd6ce530040ab21343e4
|
|
| BLAKE2b-256 |
96bba0cd4af8e421100fe08b25197614db526a75c8d022cc12fd8c2e017d31a7
|
File details
Details for the file dorky-0.0.1-py3-none-any.whl.
File metadata
- Download URL: dorky-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
902fb68a7928b0d1b7d69e00a60e348cdca44ae5a07fe3e80e6b10d0884128a4
|
|
| MD5 |
69965e1c8ab06b65c0c5d19045d371a2
|
|
| BLAKE2b-256 |
cd02f8f0b46c7448c2a75da0de779c69eace6d243ca292bb1a8489a10d4dd36a
|