Skip to main content

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

stormkey-0.1.3.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stormkey-0.1.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file stormkey-0.1.3.tar.gz.

File metadata

  • Download URL: stormkey-0.1.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for stormkey-0.1.3.tar.gz
Algorithm Hash digest
SHA256 191baf27c248b8dc6b11b5280dba18a59c956836a5055c8ee7bc8950b83c84e8
MD5 ca5c5000de2ff45c00ba43a28c511cc9
BLAKE2b-256 d6415aa38f6dc0e70a6a19c9d095dd8d19dbe24ca2e2c77b6e97ad177d9a8165

See more details on using hashes here.

File details

Details for the file stormkey-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: stormkey-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for stormkey-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0f5537f2a8d5b0861daf0e7b92d1079a61404c4ab3ac01aadd2ae6662b916458
MD5 7cce88098735b10d41cb13a416903b85
BLAKE2b-256 7f4bc2fdc6b301612b0980136cc1f9a9d11acfe8099d65041e50e58713a6d517

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page