No project description provided
Project description
Stormkey
Introduction
Stormkey is a Python library that provides a convenient interface for managing API keys for your applications. Whether you need to create, update, verify, or delete API keys, Stormkey simplifies the process with easy-to-use methods.
Installation
You can install Stormkey via pip:
pip install stormkey
Usage
To use Stormkey in your Python project, first import the Stormkey class and initialize it with your application ID, service key, and optional host URL.
from stormkey import Stormkey
app_id = "your_application_id"
service_key = "your_service_key"
host = "https://api.stormkey.app" # Optional host URL
stormkey = Stormkey(app_id, service_key, host)
Methods
- create(name: str, ownerId: str) -> str: Creates a new API key with the specified name and owner ID.
- update(name: str, ownerId: str) -> str: Updates the specified API key with a new name and owner ID.
- verify(key: str) -> dict: Verifies the validity of the provided API key.
- delete(name: str) -> str: Deletes the API key with the specified name.
Examples
Here's a simple example demonstrating how to use Stormkey to create a new API key:
key_name = "MyAPIKey"
owner_id = "user123"
key = stormkey.create(key_name, owner_id)
print("New API Key:", key["secretKey"])
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests on GitHub.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file stormkey-0.1.1.tar.gz.
File metadata
- Download URL: stormkey-0.1.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89552bfc15061494ca8ed5e3f04733b07638d971b6785cd86374d383e5ebbb65
|
|
| MD5 |
73f5bdebc20d15f5a20ff3988da08b74
|
|
| BLAKE2b-256 |
c72ce91e12bd969f6f370b163e78da981cf84f6ec83c447bbfc3b6563f3f7689
|
File details
Details for the file stormkey-0.1.1-py3-none-any.whl.
File metadata
- Download URL: stormkey-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d05e7c814b15f030b44925c3b2cd4e117c42be39a1248af752177e1a65932c3b
|
|
| MD5 |
8130a158873efaade52c5503d561b9e8
|
|
| BLAKE2b-256 |
591408662e7ff28eae706a974a42fb8ebba5ddae11ff2af41bf29cde24df91ba
|