{"id":27874,"library":"infisical-python","title":"Infisical Python SDK","description":"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.","status":"active","version":"2.3.6","language":"python","source_language":"en","source_url":"https://github.com/infisical/sdk","tags":["infisical","secrets","configuration","sdk","secrets-management"],"install":[{"cmd":"pip install infisical-python","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"wrong":"from infisical import InfisicalClient","symbol":"InfisicalClient","correct":"from infisical_client import InfisicalClient"}],"quickstart":{"code":"from infisical import InfisicalClient\n\nclient = InfisicalClient(token='your_service_token')\n\n# Fetch a single secret\nsecret = client.get_secret('MY_API_KEY', environment='dev', project_id='your_project_id')\nprint(f\"Secret: {secret.get('secret_value')}\")\n\n# List all secrets in environment\nall_secrets = client.list_secrets(environment='dev', project_id='your_project_id')\nfor s in all_secrets:\n    print(s['secret_key'], s['secret_value'])","lang":"python","description":"Initialize client with a service token, then fetch or list secrets."},"warnings":[{"fix":"Migrate to the new v2 API. See migration guide at https://infisical.com/docs/sdks/python/migration.","message":"Version 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.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Create separate client instances for sync and async usage, or use the appropriate method variants (e.g., run until complete in async context).","message":"The 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.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Uninstall the old package: pip uninstall infisical-python && pip install infisical-python>=2.0.0","message":"Legacy v0.x SDK (pip package 'infisical-python' v0) is deprecated and no longer maintained. Do not install v0.x.","severity":"deprecated","affected_versions":"0.x"}],"env_vars":null,"search_vec":"'0':30 '2':14 'access':36 'authent':44 'backward':26 'backwards-compat':25 'compat':27 'complet':18 'configur':47 'ident':43 'infis':1,8,45 'legaci':32 'machin':42 'manag':11,51 'new':20 'offici':4 'platform':12 'programmat':35 'provid':34 'python':2,5 'rewrit':19 'sdk':3,6,21,33,48 'secret':10,38,46,50 'secrets-manag':49 'servic':39 'token':40 'version':13 'x':15,31","created_at":"2026-05-09T05:52:32.476892+00:00","updated_at":"2026-05-09T05:52:32.476892+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://infisical.com","github":"https://github.com/Infisical/sdk","docs":"https://github.com/Infisical/sdk/tree/main/crates/infisical-py#readme","changelog":null,"pypi":"https://pypi.org/project/infisical-python/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["auth-security","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}