Crypto Service API
Project description
crypto-service-sdk
A secure cryptographic service providing encryption, decryption, hashing, and key management operations.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0
- Package version: 1.0.0
- Generator version: 7.20.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit http://yourorg.com/support
Requirements.
Python 3.9+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import crypto_service_sdk
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import crypto_service_sdk
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import crypto_service_sdk
from crypto_service_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = crypto_service_sdk.Configuration(
host = "http://localhost:8080"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with crypto_service_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = crypto_service_sdk.AuditApi(api_client)
operation = 'operation_example' # str | Filter by operation (e.g. encrypt, decrypt, hash) (optional)
caller_id = 'caller_id_example' # str | Filter by caller ID (optional)
limit = 56 # int | Max results (default 50, max 500) (optional)
offset = 56 # int | Pagination offset (optional)
try:
# Query audit logs (admin only)
api_response = api_instance.query_audit_logs(operation=operation, caller_id=caller_id, limit=limit, offset=offset)
print("The response of AuditApi->query_audit_logs:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AuditApi->query_audit_logs: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost:8080
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AuditApi | query_audit_logs | GET /v1/audit/logs | Query audit logs (admin only) |
| AuthApi | issue_token | POST /v1/auth/token | Issue a JWT token |
| AuthApi | register_api_key | POST /v1/auth/api-keys | Register a new API key (admin only) |
| CryptoApi | decrypt | POST /v1/decrypt | Decrypt ciphertext |
| CryptoApi | encrypt | POST /v1/encrypt | Encrypt plaintext |
| CryptoApi | hash | POST /v1/hash | Hash data |
| HealthApi | get_health | GET /health | Health check |
| KeysApi | generate_key | POST /v1/keys | Generate a new encryption key |
| KeysApi | list_keys | GET /v1/keys | List all keys |
| KeysApi | rotate_key | POST /v1/keys/{key_id}/rotate | Rotate an encryption key |
Documentation For Models
- ModelsDecryptRequest
- ModelsDecryptResponse
- ModelsEncryptRequest
- ModelsEncryptResponse
- ModelsErrorResponse
- ModelsHashRequest
- ModelsHashResponse
- ModelsHealthResponse
- ModelsKeyGenerateRequest
- ModelsKeyGenerateResponse
- ModelsKeyListResponse
- ModelsKeyRotateResponse
- ModelsLogQueryResponse
- ModelsRegisterAPIKeyRequest
- ModelsRegisterAPIKeyResponse
- ModelsTokenRequest
- ModelsTokenResponse
Documentation For Authorization
Authentication schemes defined for the API:
ApiKeyAuth
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
BearerAuth
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Author
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
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 crypto_service_sdk-1.0.0.tar.gz.
File metadata
- Download URL: crypto_service_sdk-1.0.0.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a156535425870308ae8147b424cb29d05ce45a874bfbe39a7ff319ad993cbf20
|
|
| MD5 |
17464c20a7615beea5f6ee4b8b737c36
|
|
| BLAKE2b-256 |
21eb69f2d2b4ff082832650402edb657150b12293b1a27f12b860d89cea89b31
|
File details
Details for the file crypto_service_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: crypto_service_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 56.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d933e71fea4aa978f53f44da26519ea789ea3e4f4956753407e947acf5e2d98e
|
|
| MD5 |
196fa127b8bb49e028df6fb34f1a2286
|
|
| BLAKE2b-256 |
1794a085476e93014ccc2d5c20b2191cfbb7263e01fb94ed7a1efcb2798766a0
|