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
Release files for AnarchKeyClient 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anarchkeyclient-2.0.0.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anarchkeyclient-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 kB
Release files / anarchkeyclient-2.0.0.tar.gz
| Download URL | anarchkeyclient-2.0.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71b0c4825c4a309cab9ac4b9650497ed3caabd713130a7851d706850e3ed7fa2
|
|
BLAKE2b-256 checksum How to use checksums |
9afea46e762dce1aabbfd92d739d0e7931ed13cc4c5bdbc76e5d21e7213b8206
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / anarchkeyclient-2.0.0-py3-none-any.whl
| Download URL | anarchkeyclient-2.0.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9d496c45a629cc10b84e9061a1954554eaf7bf5b4f778d1418e31103abb7c68
|
|
BLAKE2b-256 checksum How to use checksums |
b5eeaf1d3d57ac5fc864caf95d89ce5bffd8d7a39938f1a80e795fa9334fa118
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|