infisicalsdk 1.0.4__tar.gz → 1.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of infisicalsdk might be problematic. Click here for more details.

@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: infisicalsdk
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Infisical API Client
5
5
  Home-page: https://github.com/Infisical/python-sdk-official
6
6
  Author: Infisical
7
7
  Author-email: support@infisical.com
8
8
  Keywords: Infisical,Infisical API,Infisical SDK
9
9
  Description-Content-Type: text/markdown
10
- Requires-Dist: urllib3<2.1.0,>=1.25.3
11
10
  Requires-Dist: python-dateutil
12
11
  Requires-Dist: aenum
13
12
  Requires-Dist: requests~=2.32
@@ -82,10 +82,11 @@ secrets = client.secrets.list_secrets(
82
82
  project_id="<project-id>",
83
83
  environment_slug="dev",
84
84
  secret_path="/",
85
- expand_secret_references=True,
86
- recursive=False,
87
- include_imports=True,
88
- tag_filters=[]
85
+ expand_secret_references=True, # Optional
86
+ view_secret_value=True, # Optional
87
+ recursive=False, # Optional
88
+ include_imports=True, # Optional
89
+ tag_filters=[] # Optional
89
90
  )
90
91
  ```
91
92
 
@@ -94,6 +95,7 @@ secrets = client.secrets.list_secrets(
94
95
  - `environment_slug` (str): The environment in which to list secrets (e.g., "dev").
95
96
  - `secret_path` (str): The path to the secrets.
96
97
  - `expand_secret_references` (bool): Whether to expand secret references.
98
+ - `view_secret_value` (bool): Whether or not to include the secret value in the response. If set to false, the `secretValue` will be masked with `<hidden-by-infisical>`. Defaults to true.
97
99
  - `recursive` (bool): Whether to list secrets recursively.
98
100
  - `include_imports` (bool): Whether to include imported secrets.
99
101
  - `tag_filters` (List[str]): Tags to filter secrets.
@@ -171,9 +173,10 @@ secret = client.secrets.get_secret_by_name(
171
173
  project_id="<project-id>",
172
174
  environment_slug="dev",
173
175
  secret_path="/",
174
- expand_secret_references=True,
175
- include_imports=True,
176
- version=None # Optional
176
+ expand_secret_references=True, # Optional
177
+ view_secret_value=True, # Optional
178
+ include_imports=True, # Optional
179
+ version=None # Optional
177
180
  )
178
181
  ```
179
182
 
@@ -183,6 +186,7 @@ secret = client.secrets.get_secret_by_name(
183
186
  - `environment_slug` (str): The environment in which to retrieve the secret.
184
187
  - `secret_path` (str): The path to the secret.
185
188
  - `expand_secret_references` (bool): Whether to expand secret references.
189
+ - `view_secret_value` (bool): Whether or not to include the secret value in the response. If set to false, the `secretValue` will be masked with `<hidden-by-infisical>`. Defaults to true.
186
190
  - `include_imports` (bool): Whether to include imported secrets.
187
191
  - `version` (str, optional): The version of the secret to retrieve. Fetches the latest by default.
188
192
 
@@ -74,6 +74,7 @@ class BaseSecret(BaseModel):
74
74
  createdAt: str
75
75
  updatedAt: str
76
76
  secretMetadata: Optional[Dict[str, Any]] = None
77
+ secretValueHidden: Optional[bool] = False
77
78
  secretReminderNote: Optional[str] = None
78
79
  secretReminderRepeatDays: Optional[int] = None
79
80
  skipMultilineEncoding: Optional[bool] = False
@@ -209,6 +209,7 @@ class V3RawSecrets:
209
209
  environment_slug: str,
210
210
  secret_path: str,
211
211
  expand_secret_references: bool = True,
212
+ view_secret_value: bool = True,
212
213
  recursive: bool = False,
213
214
  include_imports: bool = True,
214
215
  tag_filters: List[str] = []) -> ListSecretsResponse:
@@ -217,6 +218,7 @@ class V3RawSecrets:
217
218
  "workspaceId": project_id,
218
219
  "environment": environment_slug,
219
220
  "secretPath": secret_path,
221
+ "viewSecretValue": str(view_secret_value).lower(),
220
222
  "expandSecretReferences": str(expand_secret_references).lower(),
221
223
  "recursive": str(recursive).lower(),
222
224
  "include_imports": str(include_imports).lower(),
@@ -241,10 +243,12 @@ class V3RawSecrets:
241
243
  secret_path: str,
242
244
  expand_secret_references: bool = True,
243
245
  include_imports: bool = True,
246
+ view_secret_value: bool = True,
244
247
  version: str = None) -> BaseSecret:
245
248
 
246
249
  params = {
247
250
  "workspaceId": project_id,
251
+ "viewSecretValue": str(view_secret_value).lower(),
248
252
  "environment": environment_slug,
249
253
  "secretPath": secret_path,
250
254
  "expandSecretReferences": str(expand_secret_references).lower(),
@@ -1,10 +1,16 @@
1
1
  from typing import Any, Dict, Generic, Optional, TypeVar, Type
2
- from urllib.parse import urljoin
3
2
  import requests
4
3
  from dataclasses import dataclass
5
4
 
6
5
  T = TypeVar("T")
7
6
 
7
+ def join_url(base: str, path: str) -> str:
8
+ """
9
+ Join base URL and path properly, handling slashes appropriately.
10
+ """
11
+ if not base.endswith('/'):
12
+ base += '/'
13
+ return base + path.lstrip('/')
8
14
 
9
15
  class InfisicalError(Exception):
10
16
  """Base exception for Infisical client errors"""
@@ -60,7 +66,7 @@ class InfisicalRequests:
60
66
 
61
67
  def _build_url(self, path: str) -> str:
62
68
  """Construct full URL from path"""
63
- return urljoin(self.host, path.lstrip("/"))
69
+ return join_url(self.host, path.lstrip("/"))
64
70
 
65
71
  def set_token(self, token: str):
66
72
  """Set authorization token"""
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: infisicalsdk
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Infisical API Client
5
5
  Home-page: https://github.com/Infisical/python-sdk-official
6
6
  Author: Infisical
7
7
  Author-email: support@infisical.com
8
8
  Keywords: Infisical,Infisical API,Infisical SDK
9
9
  Description-Content-Type: text/markdown
10
- Requires-Dist: urllib3<2.1.0,>=1.25.3
11
10
  Requires-Dist: python-dateutil
12
11
  Requires-Dist: aenum
13
12
  Requires-Dist: requests~=2.32
@@ -1,4 +1,3 @@
1
- urllib3<2.1.0,>=1.25.3
2
1
  python-dateutil
3
2
  aenum
4
3
  requests~=2.32
@@ -12,7 +12,6 @@ include = ["infisicalapi_client/py.typed"]
12
12
  [tool.poetry.dependencies]
13
13
  python = "^3.7"
14
14
 
15
- urllib3 = ">= 1.25.3"
16
15
  python-dateutil = ">=2.8.2"
17
16
  aenum = ">=3.1.11"
18
17
 
@@ -15,10 +15,9 @@ from setuptools import setup, find_packages # noqa: H301
15
15
  # prerequisite: setuptools
16
16
  # http://pypi.python.org/pypi/setuptools
17
17
  NAME = "infisicalsdk"
18
- VERSION = "1.0.4"
18
+ VERSION = "1.0.6"
19
19
  PYTHON_REQUIRES = ">=3.8"
20
20
  REQUIRES = [
21
- "urllib3 >= 1.25.3, < 2.1.0",
22
21
  "python-dateutil",
23
22
  "aenum",
24
23
  "requests~=2.32",
File without changes