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.2.tar.gz (2.8 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.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stormkey-0.1.2.tar.gz
  • Upload date:
  • Size: 2.8 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.2.tar.gz
Algorithm Hash digest
SHA256 bc7bf368cc49d0ebf8af352c57600a2059c5bf16729556ea5b5cb9d23a58365b
MD5 37b6cdedb0e85cab45935f096a562e08
BLAKE2b-256 be4ea3291fb72bd8557c3cc7e9a499aa9023f2e6c9ca8104cb67891c0c16c425

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stormkey-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 30daa8272e1c523b982a016fca50e5b6b259e7c84f062ef04baec65a70f25296
MD5 da1b79eb3123446f258383e25b7c2bc7
BLAKE2b-256 74f563e111ce93ed40b54b4fbf09034de2b4dc7a3ac8c760cd6e139449a86329

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