robosystems-client 0.2.20__py3-none-any.whl → 0.2.22__py3-none-any.whl

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.
@@ -25,6 +25,7 @@ class RoboSystemsExtensionConfig:
25
25
  max_retries: int = 5
26
26
  retry_delay: int = 1000
27
27
  timeout: int = 30
28
+ s3_endpoint_url: Optional[str] = None # Override S3 endpoint (e.g., for LocalStack)
28
29
 
29
30
 
30
31
  class RoboSystemsExtensions:
@@ -41,6 +42,7 @@ class RoboSystemsExtensions:
41
42
  "max_retries": config.max_retries,
42
43
  "retry_delay": config.retry_delay,
43
44
  "timeout": config.timeout,
45
+ "s3_endpoint_url": config.s3_endpoint_url,
44
46
  }
45
47
 
46
48
  # Extract token from headers if it was set by auth classes
@@ -37,7 +37,6 @@ class FileUploadOptions:
37
37
  """Options for file upload operations"""
38
38
 
39
39
  on_progress: Optional[Callable[[str], None]] = None
40
- fix_localstack_url: bool = True
41
40
  ingest_to_graph: bool = False
42
41
 
43
42
 
@@ -78,6 +77,9 @@ class FileClient:
78
77
  self.base_url = config["base_url"]
79
78
  self.headers = config.get("headers", {})
80
79
  self.token = config.get("token")
80
+ self.s3_endpoint_url = config.get(
81
+ "s3_endpoint_url"
82
+ ) # Optional S3 endpoint override
81
83
  self._http_client = httpx.Client(timeout=120.0)
82
84
 
83
85
  def upload(
@@ -171,9 +173,23 @@ class FileClient:
171
173
  upload_url = upload_data.upload_url
172
174
  file_id = upload_data.file_id
173
175
 
174
- # Fix LocalStack URL if needed
175
- if options.fix_localstack_url and "localstack:4566" in upload_url:
176
- upload_url = upload_url.replace("localstack:4566", "localhost:4566")
176
+ # Override S3 endpoint if configured (e.g., for LocalStack)
177
+ if self.s3_endpoint_url:
178
+ from urllib.parse import urlparse, urlunparse
179
+
180
+ parsed_url = urlparse(upload_url)
181
+ override_parsed = urlparse(self.s3_endpoint_url)
182
+ # Replace scheme, host, and port with the override endpoint
183
+ upload_url = urlunparse(
184
+ (
185
+ override_parsed.scheme or parsed_url.scheme,
186
+ override_parsed.netloc,
187
+ parsed_url.path,
188
+ parsed_url.params,
189
+ parsed_url.query,
190
+ parsed_url.fragment,
191
+ )
192
+ )
177
193
 
178
194
  # Step 2: Upload file to S3
179
195
  if options.on_progress:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robosystems-client
3
- Version: 0.2.20
3
+ Version: 0.2.22
4
4
  Summary: Python Client for RoboSystems financial graph database API
5
5
  Author: RFS LLC
6
6
  License: MIT
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3
19
19
  Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
22
23
  Classifier: Topic :: Database :: Front-Ends
23
24
  Classifier: Topic :: Internet :: WWW/HTTP
24
25
  Classifier: Topic :: Office/Business :: Financial
@@ -147,8 +147,8 @@ robosystems_client/extensions/agent_client.py,sha256=Db2C4hrakVsf6ScnBcNk6rte3Kw
147
147
  robosystems_client/extensions/auth_integration.py,sha256=ABOJ8aVjfHehNGNzim1iR9-Cdh7Mr22ce-WgWWeqJt0,6535
148
148
  robosystems_client/extensions/dataframe_utils.py,sha256=gK1bgkVqBF0TvWVdGQvqWrt-ur_Rw11j8uNtMoulLWE,12312
149
149
  robosystems_client/extensions/element_mapping_client.py,sha256=yuh0QPQBPM33E7r6QWWDiKm3T4TfCdbn2kvO3Jlw4Cs,18516
150
- robosystems_client/extensions/extensions.py,sha256=7vsD3QeIKbwhC1UqNskFjsfKkg_ZO3PPDnc6TxV3PoA,6722
151
- robosystems_client/extensions/file_client.py,sha256=WNttw8BtdpLsb3N2fkvim-a8eDSshi8LM3nMtfEmLt0,11843
150
+ robosystems_client/extensions/extensions.py,sha256=IqTuVJNt6vvO5LhnH-9SexCF5k9Abqig1sBdY4SdD1I,6858
151
+ robosystems_client/extensions/file_client.py,sha256=bknqmbYrIqxc2PnWskeDvcWYP2bemBQaxY_4A6zr5LY,12326
152
152
  robosystems_client/extensions/graph_client.py,sha256=OBi0xj0SLIRKLeSu_DiGt2ZakCmhggvNrMP3jdRfEgQ,10326
153
153
  robosystems_client/extensions/materialization_client.py,sha256=Pvq4Gz5fS4B2eTxFrpCGTj7-diOZwOtWnNo7wKT9mVE,6811
154
154
  robosystems_client/extensions/operation_client.py,sha256=B1qju-wWQrnrnVJixKGgsA_KEInviwJwdlJxzm_i7P0,13359
@@ -414,7 +414,7 @@ robosystems_client/models/view_axis_config_member_labels_type_0.py,sha256=kkzpHx
414
414
  robosystems_client/models/view_config.py,sha256=HQnqYjLMXRhjZLOc5ypwILriMFKuvPzu0hPQi2vyNoM,3795
415
415
  robosystems_client/models/view_source.py,sha256=h66cASj-P_-qOptKv26uAIe9PtIewU2nTs42Ls-lFFk,4098
416
416
  robosystems_client/models/view_source_type.py,sha256=KpgczHUeOinV01jdLvytZ2URKwcsRcp1doPx2D3USyw,169
417
- robosystems_client-0.2.20.dist-info/METADATA,sha256=YhEF7b7jE9rE1DWePu4P5JVfW8qOFDNx_9xic0C8_ts,3899
418
- robosystems_client-0.2.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
419
- robosystems_client-0.2.20.dist-info/licenses/LICENSE,sha256=LjFqQPU4eQh7jAQ04SmE9eC0j74HCdXvzbo0hjW4mWo,1063
420
- robosystems_client-0.2.20.dist-info/RECORD,,
417
+ robosystems_client-0.2.22.dist-info/METADATA,sha256=yEG5FHqaUwnCVaVxGPrcXOAMY3DMYelvRAvJK3p5ikE,3950
418
+ robosystems_client-0.2.22.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
419
+ robosystems_client-0.2.22.dist-info/licenses/LICENSE,sha256=LjFqQPU4eQh7jAQ04SmE9eC0j74HCdXvzbo0hjW4mWo,1063
420
+ robosystems_client-0.2.22.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any