Registry / auth-security / infisical-python

infisical-python

JSON →
library2.3.6pypypi✓ verified 79d ago

Official Python SDK for Infisical, a secrets management platform. Version 2.x is a complete rewrite (new SDK) that is not backwards-compatible with the 0.x legacy SDK. Provides programmatic access to secrets, service tokens, and machine identity authentication.

pip install infisical-python
INSTALL
IMPORT
SIG · INFISICAL-PYTHON
I
infisical-python
auth-securitypythonv2.3.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

InfisicalClient
from infisical_client import InfisicalClient
from infisical import InfisicalClient

Initialize client with a service token, then fetch or list secrets.

from infisical import InfisicalClient client = InfisicalClient(token='your_service_token') # Fetch a single secret secret = client.get_secret('MY_API_KEY', environment='dev', project_id='your_project_id') print(f"Secret: {secret.get('secret_value')}") # List all secrets in environment all_secrets = client.list_secrets(environment='dev', project_id='your_project_id') for s in all_secrets: print(s['secret_key'], s['secret_value'])
Debug
Known issues
breakingVersion 2.x is a complete rewrite with a new API design. Code written for the legacy 0.x SDK is incompatible and must be rewritten.
fix
Migrate to the new v2 API. See migration guide at https://infisical.com/docs/sdks/python/migration.
affects: >=2.0.0
gotchaThe client initializes synchronously but also offers an async interface. Mixing sync and async methods on the same client instance can lead to hangs or errors.
fix
Create separate client instances for sync and async usage, or use the appropriate method variants (e.g., run until complete in async context).
affects: >=2.0.0
deprecatedLegacy v0.x SDK (pip package 'infisical-python' v0) is deprecated and no longer maintained. Do not install v0.x.
fix
Uninstall the old package: pip uninstall infisical-python && pip install infisical-python>=2.0.0
affects: 0.x
Upgrade
Version history
2.3.6latest on PyPI · released Apr 17, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Amazon
1
OpenAI (training)
1
Resources