Python SDK for AgentKeys — proxy API calls through a secure credential vault
Project description
agentkeys-io
Python SDK for AgentKeys — proxy API calls through a secure credential vault. Your agent never sees the real API keys.
Install
pip install agentkeys-io
Usage
With API key (recommended — access all credentials by name)
from agentkeys import AgentKeys
ak = AgentKeys(
token="ak_ws_your_key...",
proxy_url="https://proxy.agentkeys.io",
)
# Proxy a request through the "resend" credential
response = ak.proxy(
credential="resend",
url="https://api.resend.com/emails",
method="POST",
body={
},
)
print(response.json())
With proxy token (single credential)
ak = AgentKeys(token="pxr_resend_abc123...")
response = ak.proxy(
credential="ignored",
url="https://api.resend.com/emails",
method="POST",
body={""from": "hi@example.com", "to": "user@example.com", "subject": "Hello", "text": "Sent via AgentKeys"},
)
Scoped client
resend = ak.for_credential("resend")
stripe = ak.for_credential("stripe")
resend.post("https://api.resend.com/emails", body={
"from": "hi@example.com",
"to": "user@example.com",
"subject": "Hello",
"text": "Sent via AgentKeys",
})
balance = stripe.get("https://api.stripe.com/v1/balance")
Context manager
with AgentKeys(token="ak_ws_...") as ak:
response = ak.proxy("resend", url="https://api.resend.com/emails", method="POST", body={...})
Links
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
agentkeys-0.1.0.tar.gz
(3.4 kB
view details)
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 agentkeys-0.1.0.tar.gz.
File metadata
- Download URL: agentkeys-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
612bd0735161a7a26e110d064bb7653e3b0ebde5ae6228c2226e45ab04cd9984
|
|
| MD5 |
e333135cd45f9c0f57bea7646bd2d21c
|
|
| BLAKE2b-256 |
0aa5d92d30bb5b0b1fde4ea7b2b7ea80004d5358ee7a00d4b8eeb8efe7959abd
|
File details
Details for the file agentkeys-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentkeys-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bc361923e73d3fdf058230382b06a69051f124e2432b6313fb8ee494ea1a27e
|
|
| MD5 |
9d53917466d36990b4823c9b4e72c721
|
|
| BLAKE2b-256 |
256d075e003d61c4626f1ddd218e1b3525d120eb20caca361e3a958d76d99282
|