Skip to main content

dorky

PyPI - Version PyPI - Python Version

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.

Metadata

Release files for dorky 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dorky 0.0.1
File Size Uploaded
dorky-0.0.1.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dorky 0.0.1
File Interpreter ABI Platform
dorky-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.8 kB

Release files / dorky-0.0.1.tar.gz

Download URL dorky-0.0.1.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2242309b1f8f766b1e5ee42f04ee0785c4b1fe4f762c3dbc5c4d9026e1be26e8
BLAKE2b-256 checksum
How to use checksums
96bba0cd4af8e421100fe08b25197614db526a75c8d022cc12fd8c2e017d31a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / dorky-0.0.1-py3-none-any.whl

Download URL dorky-0.0.1-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
902fb68a7928b0d1b7d69e00a60e348cdca44ae5a07fe3e80e6b10d0884128a4
BLAKE2b-256 checksum
How to use checksums
cd02f8f0b46c7448c2a75da0de779c69eace6d243ca292bb1a8489a10d4dd36a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page