Skip to main content

Aembit Edge Python SDK

PyPI version Python License

Official Python SDK for interacting with the Aembit Edge API.

The Aembit Edge SDK allows Python backend services, serverless functions, web applications, AI agents, and MCP servers to authenticate and retrieve credentials dynamically without managing static secrets.

Features

  • 🔐 Zero Hardcoded Secrets: Authenticate via workload identity (AWS STS Role, GitHub Actions OIDC, GitLab CI/CD OIDC, Terraform Cloud OIDC).
  • 🔄 Automatic Token Lifecycle: Built-in in-memory bearer token caching and proactive background refresh.
  • 🪵 Standard Library Logging: Configured via the standard logging library under the aembit_edge namespace.
  • 📦 Modern Python: Strictly typed, supporting Python >=3.10.

Installation

pip install aembit-edge-sdk

Or using uv:

uv add aembit-edge-sdk

Quickstart

Using AWS IAM Role (STS)

from aembit_edge import CredentialServerRef, EdgeClient, EdgeClientConfig, GetCredentialInput
from aembit_edge.trust_providers import AwsRoleTrustProvider

# 1. Initialize the AWS Role Trust Provider
aws_provider = AwsRoleTrustProvider(region="us-east-1")

# 2. Configure the Edge Client
config = EdgeClientConfig(
    base_url="https://your-tenant.aembit.io",
    client_id="your-client-id",
    trust_provider=aws_provider,
)
client = EdgeClient(config)

# 3. Retrieve target server credentials
server = CredentialServerRef(host="database.internal", port=5432)
request = GetCredentialInput(server=server, credential_type="api_key")

result = client.get_credential(request)
print("Retrieved Credential Data:", result.data)

Using OIDC Trust Providers (GitHub, GitLab, Terraform)

from aembit_edge import CredentialServerRef, EdgeClient, EdgeClientConfig, GetCredentialInput
from aembit_edge.trust_providers import GitHubTrustProvider

# 1. Initialize the trust provider with the environment's identity token
github_provider = GitHubTrustProvider(identity_token="YOUR_GITHUB_OIDC_TOKEN")

# 2. Configure the Edge Client
config = EdgeClientConfig(
    base_url="https://your-tenant.aembit.io",
    client_id="your-client-id",
    trust_provider=github_provider,
)
client = EdgeClient(config)

# 3. Request credentials for a target server
server = CredentialServerRef(host="api.internal", port=443)
request = GetCredentialInput(server=server, credential_type="api_key")

result = client.get_credential(request)
print("Retrieved Credential Data:", result.data)

Other OIDC providers (GitLabTrustProvider, TerraformTrustProvider) follow the same pattern:

from aembit_edge.trust_providers import GitLabTrustProvider, TerraformTrustProvider

# For GitLab CI/CD:
gitlab_provider = GitLabTrustProvider(identity_token="YOUR_GITLAB_OIDC_TOKEN")

# For Terraform Cloud:
terraform_provider = TerraformTrustProvider(identity_token="YOUR_TERRAFORM_OIDC_TOKEN")

Supported Trust Providers

Trust Provider Class Name Import Path
AWS IAM Role (STS) AwsRoleTrustProvider(region=...) aembit_edge.trust_providers
GitHub Actions OIDC GitHubTrustProvider(identity_token=...) aembit_edge.trust_providers
GitLab CI/CD OIDC GitLabTrustProvider(identity_token=...) aembit_edge.trust_providers
Terraform Cloud OIDC TerraformTrustProvider(identity_token=...) aembit_edge.trust_providers

Logging & Observability

By default, the SDK remains silent with a logging.NullHandler attached to the aembit_edge namespace. To enable operational debug logging:

import logging

logging.basicConfig(level=logging.INFO)
logging.getLogger("aembit_edge").setLevel(logging.DEBUG)

Examples

Runnable integration examples are available in the GitHub repository:

Documentation & Resources

License

This project is licensed under the Apache-2.0 License.

Metadata

Release files for aembit-edge-sdk 1.35.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aembit-edge-sdk 1.35.0
File Size Uploaded Provenance
aembit_edge_sdk-1.35.0.tar.gz 69.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aembit-edge-sdk 1.35.0
File Interpreter ABI Platform
aembit_edge_sdk-1.35.0-py3-none-any.whl Python 3 none any Details

Total release size: 114.8 kB

Release files / aembit_edge_sdk-1.35.0.tar.gz

Download URL aembit_edge_sdk-1.35.0.tar.gz
Size 69.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2f1d9d02567165c3678def68ea573ae94df271c814e0ba8c0ef58ecc1a7f422e
BLAKE2b-256 checksum
How to use checksums
7a909d37f7ef7fc08949c02e75adb91cadf0e6ff500358dcdddfd1c0b6afeedc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / aembit_edge_sdk-1.35.0-py3-none-any.whl

Download URL aembit_edge_sdk-1.35.0-py3-none-any.whl
Size 45.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
229458bd41c919a06952248c8ede67b5909d56be5f77edfe928956ddaa3f0a5e
BLAKE2b-256 checksum
How to use checksums
d3dfeed0b54b2abec37172b96d0aad6697ca4ead0b90ccb80dcf7b02ac89af1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Security for aembit-edge-sdk 1.35.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aembit_edge_sdk-1.35.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.35.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page