A Client package to connect and retrieve api keys from vault serivce called AnarchKey
Project description
AnarchKey Client
The official Python SDK for AnarchKey, a secure secret management platform for developers.
AnarchKey lets you securely store API keys, tokens, passwords, and other secrets in the cloud, then retrieve them at runtime without hardcoding sensitive values into your applications.
Features
- 🔐 Secure cloud-based secret management
- 🚀 Simple Python API
- 🛡️ Local device initialization for secure access
- 🔑 Retrieve secrets by name
- 💻 Lightweight with minimal dependencies
- ⚡ Works seamlessly in local development, CI/CD, and production
Installation
Install the SDK from PyPI:
pip install AnarchKeyClient
Getting Started
1. Create an AnarchKey account
Sign up at:
https://anarchkey.bytheseus.me
After creating an account, generate an Access Token from your dashboard.
2. Initialize your machine
Run the initialization command once:
anarchkey init --username <YOUR_USERNAME> --password <YOUR_PASSWORD>
This securely stores a local initialization token inside:
~/.anarchkey
3. Retrieve secrets
from AnarchKeyClient import AnarchKeyClient
client = AnarchKeyClient(
api_key="YOUR_ACCESS_TOKEN"
)
database_url = client.get_api_key("DATABASE_URL")
print(database_url)
or, if you've added the alias:
secret = client.getApiKey("DATABASE_URL")
Example
Suppose you have a secret named:
OPENAI_API_KEY
Retrieve it like this:
from AnarchKeyClient import AnarchKeyClient
client = AnarchKeyClient(
api_key="ak_xxxxxxxxxxxxxxxxx"
)
openai_key = client.get_api_key("OPENAI_API_KEY")
No credentials are stored in your source code other than your access token.
API
Create a client
client = AnarchKeyClient(
api_key="YOUR_ACCESS_TOKEN"
)
Retrieve a secret
secret = client.get_api_key("SECRET_NAME")
Returns the secret value stored in your AnarchKey vault.
Command Line
Initialize your machine:
anarchkey init --username YOUR_USERNAME --password YOUR_PASSWORD
This command only needs to be run once per machine.
Requirements
- Python 3.8+
- requests
License
MIT License
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 anarchkeyclient-2.0.0.tar.gz.
File metadata
- Download URL: anarchkeyclient-2.0.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71b0c4825c4a309cab9ac4b9650497ed3caabd713130a7851d706850e3ed7fa2
|
|
| MD5 |
18ebf12e77d3dad1df50b09d1c606ffa
|
|
| BLAKE2b-256 |
9afea46e762dce1aabbfd92d739d0e7931ed13cc4c5bdbc76e5d21e7213b8206
|
File details
Details for the file anarchkeyclient-2.0.0-py3-none-any.whl.
File metadata
- Download URL: anarchkeyclient-2.0.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9d496c45a629cc10b84e9061a1954554eaf7bf5b4f778d1418e31103abb7c68
|
|
| MD5 |
f48e4c317b9a15caa554ac151d7fca65
|
|
| BLAKE2b-256 |
b5eeaf1d3d57ac5fc864caf95d89ce5bffd8d7a39938f1a80e795fa9334fa118
|