@@ -36,10 +36,13 @@ from infisical_sdk import InfisicalSDKClient
3636client = InfisicalSDKClient(host = " https://app.infisical.com" )
3737
3838# Authenticate (example using Universal Auth)
39- client.auth.universal_auth.login(client_id = " your_client_id" , client_secret = " your_client_secret" )
39+ client.auth.universal_auth.login(
40+ client_id = " <machine-identity-client-id>" ,
41+ client_secret = " <machine-identity-client-secret>"
42+ )
4043
4144# Use the SDK to interact with Infisical
42- secrets = client.secrets.list_secrets(project_id = " your_project_id " , environment_slug = " dev" , secret_path = " /" )
45+ secrets = client.secrets.list_secrets(project_id = " <project-id> " , environment_slug = " dev" , secret_path = " /" )
4346```
4447
4548## Core Methods
@@ -56,13 +59,16 @@ The `Auth` component provides methods for authentication:
5659#### Universal Auth
5760
5861``` python
59- response = client.auth.universal_auth.login(client_id = " your_client_id" , client_secret = " your_client_secret" )
62+ response = client.auth.universal_auth.login(
63+ client_id = " <machine-identity-client-id>" ,
64+ client_secret = " <machine-identity-client-secret>"
65+ )
6066```
6167
6268#### AWS Auth
6369
6470``` python
65- response = client.auth.aws_auth.login(identity_id = " your_identity_id " )
71+ response = client.auth.aws_auth.login(identity_id = " <machine-identity-id> " )
6672```
6773
6874### ` secrets `
@@ -73,7 +79,7 @@ This sub-class handles operations related to secrets:
7379
7480``` python
7581secrets = client.secrets.list_secrets(
76- project_id = " your_project_id " ,
82+ project_id = " <project-id> " ,
7783 environment_slug = " dev" ,
7884 secret_path = " /" ,
7985 expand_secret_references = True ,
@@ -100,7 +106,7 @@ secrets = client.secrets.list_secrets(
100106``` python
101107new_secret = client.secrets.create_secret_by_name(
102108 secret_name = " NEW_SECRET" ,
103- project_id = " your_project_id " ,
109+ project_id = " <project-id> " ,
104110 secret_path = " /" ,
105111 environment_slug = " dev" ,
106112 secret_value = " secret_value" ,
@@ -130,7 +136,7 @@ new_secret = client.secrets.create_secret_by_name(
130136``` python
131137updated_secret = client.secrets.update_secret_by_name(
132138 current_secret_name = " EXISTING_SECRET" ,
133- project_id = " your_project_id " ,
139+ project_id = " <project-id> " ,
134140 secret_path = " /" ,
135141 environment_slug = " dev" ,
136142 secret_value = " new_secret_value" ,
@@ -162,7 +168,7 @@ updated_secret = client.secrets.update_secret_by_name(
162168``` python
163169secret = client.secrets.get_secret_by_name(
164170 secret_name = " EXISTING_SECRET" ,
165- project_id = " your_project_id " ,
171+ project_id = " <project-id> " ,
166172 environment_slug = " dev" ,
167173 secret_path = " /" ,
168174 expand_secret_references = True ,
@@ -188,7 +194,7 @@ secret = client.secrets.get_secret_by_name(
188194``` python
189195deleted_secret = client.secrets.delete_secret_by_name(
190196 secret_name = " EXISTING_SECRET" ,
191- project_id = " your_project_id " ,
197+ project_id = " <project-id> " ,
192198 environment_slug = " dev" ,
193199 secret_path = " /"
194200)
0 commit comments