hippius 0.2.52__py3-none-any.whl → 0.2.53__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.
- {hippius-0.2.52.dist-info → hippius-0.2.53.dist-info}/METADATA +1 -1
- {hippius-0.2.52.dist-info → hippius-0.2.53.dist-info}/RECORD +6 -6
- hippius_sdk/__init__.py +1 -1
- hippius_sdk/ipfs.py +18 -5
- {hippius-0.2.52.dist-info → hippius-0.2.53.dist-info}/WHEEL +0 -0
- {hippius-0.2.52.dist-info → hippius-0.2.53.dist-info}/entry_points.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
hippius_sdk/__init__.py,sha256=
|
1
|
+
hippius_sdk/__init__.py,sha256=oO-2itSSL6zSBvfbDXJ2kIX1nI_0bMldoJJFFVD6P6c,1474
|
2
2
|
hippius_sdk/cli.py,sha256=3TocM--b4stdOYS8_ixZMzThZvJZVmmWqEqz_PHvWxo,22188
|
3
3
|
hippius_sdk/cli_assets.py,sha256=rjH3Z5A1CQr2d5CIAAAb0WMCjoZZlMWcdo0f93KqluE,635
|
4
4
|
hippius_sdk/cli_handlers.py,sha256=zwLpOMW_sorPZRP8LWxhR9ITZSdOzUxucDy7wXrcMJw,157852
|
@@ -14,12 +14,12 @@ hippius_sdk/db/setup_database.sh,sha256=STp03qxkp2RmIVr6YZIcvQQm-_LLUOb6Jobh-52H
|
|
14
14
|
hippius_sdk/db_utils.py,sha256=-x0rbN0as7Tn3PJPZBYCgreZe52FLH40ppA1TLxsg90,1851
|
15
15
|
hippius_sdk/errors.py,sha256=LScJJmawVAx7aRzqqQguYSkf9iazSjEQEBNlD_GXZ6Y,1589
|
16
16
|
hippius_sdk/incentives.py,sha256=0_xpaxNBmbK-0mvTm87vwBaZF-daM7hxm0dKYgkuXh4,16908
|
17
|
-
hippius_sdk/ipfs.py,sha256=
|
17
|
+
hippius_sdk/ipfs.py,sha256=rCAuSEiO1B2FCs3WQpNb2rpSJfRJkt6PWUD7KsmF6B8,105376
|
18
18
|
hippius_sdk/ipfs_core.py,sha256=xsY0Ox6anmrkbrxkRr2RXzEukB-EEaW_oMvO0Va3vjQ,13148
|
19
19
|
hippius_sdk/key_storage.py,sha256=HWV9mM5Zkq_xxn7A72L7gvlYBtcmMwOyeFdtl8ExlmE,8315
|
20
20
|
hippius_sdk/substrate.py,sha256=4a7UIE4UqGcDW7luKTBgSDqfb2OIZusB39G1UiRs_YU,50158
|
21
21
|
hippius_sdk/utils.py,sha256=rJ611yvwKSyiBpYU3w-SuyQxoghMGU-ePuslrPv5H5g,7388
|
22
|
-
hippius-0.2.
|
23
|
-
hippius-0.2.
|
24
|
-
hippius-0.2.
|
25
|
-
hippius-0.2.
|
22
|
+
hippius-0.2.53.dist-info/METADATA,sha256=TWhWHeH2ok1GkBtYeGatgYBMlDrCMw5mpMWJwKTfJA4,30088
|
23
|
+
hippius-0.2.53.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
24
|
+
hippius-0.2.53.dist-info/entry_points.txt,sha256=bFAZjW3vndretf9-8s587jA2ebMVI7puhn_lVs8jPc8,149
|
25
|
+
hippius-0.2.53.dist-info/RECORD,,
|
hippius_sdk/__init__.py
CHANGED
@@ -26,7 +26,7 @@ from hippius_sdk.config import (
|
|
26
26
|
from hippius_sdk.ipfs import IPFSClient, S3PublishResult, S3DownloadResult
|
27
27
|
from hippius_sdk.utils import format_cid, format_size, hex_to_ipfs_cid
|
28
28
|
|
29
|
-
__version__ = "0.2.
|
29
|
+
__version__ = "0.2.53"
|
30
30
|
__all__ = [
|
31
31
|
"HippiusClient",
|
32
32
|
"IPFSClient",
|
hippius_sdk/ipfs.py
CHANGED
@@ -2117,15 +2117,26 @@ class IPFSClient:
|
|
2117
2117
|
|
2118
2118
|
logger.info(f"Got {len(objects)=} from {store_node=}")
|
2119
2119
|
# filter out just the one file cid, ignore dirs, it's usually the first item,
|
2120
|
-
# but hey let's not risk it
|
2120
|
+
# but hey let's not risk it. IPFS may convert + to spaces in filenames.
|
2121
2121
|
for o in objects:
|
2122
2122
|
if o["Name"] == file_name:
|
2123
2123
|
cid = o["Hash"]
|
2124
2124
|
break
|
2125
2125
|
else:
|
2126
|
-
|
2127
|
-
|
2128
|
-
)
|
2126
|
+
# If exact match fails, try to find by matching the basename only
|
2127
|
+
# This handles cases where IPFS modifies the filename (e.g., + to space)
|
2128
|
+
target_basename = os.path.basename(file_name)
|
2129
|
+
for o in objects:
|
2130
|
+
if os.path.basename(o["Name"]) == target_basename:
|
2131
|
+
cid = o["Hash"]
|
2132
|
+
logger.info(
|
2133
|
+
f"Found file by basename match: {o['Name']} (original: {file_name})"
|
2134
|
+
)
|
2135
|
+
break
|
2136
|
+
else:
|
2137
|
+
raise KeyError(
|
2138
|
+
f"Store call failed, {file_name=} not found in {objects=}"
|
2139
|
+
)
|
2129
2140
|
else:
|
2130
2141
|
cid = result["Hash"]
|
2131
2142
|
logger.info(f"Content uploaded to store node {store_node} with CID: {cid}")
|
@@ -2526,7 +2537,9 @@ class IPFSClient:
|
|
2526
2537
|
async with httpx.AsyncClient() as client:
|
2527
2538
|
async with client.stream("GET", download_url) as response:
|
2528
2539
|
response.raise_for_status()
|
2529
|
-
logger.info(
|
2540
|
+
logger.info(
|
2541
|
+
f"Started streaming from {download_node} for CID: {cid}"
|
2542
|
+
)
|
2530
2543
|
|
2531
2544
|
async for chunk in response.aiter_bytes(chunk_size=8192):
|
2532
2545
|
yield chunk
|
File without changes
|
File without changes
|