hippius 0.2.52__tar.gz → 0.2.53__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.
Files changed (24) hide show
  1. {hippius-0.2.52 → hippius-0.2.53}/PKG-INFO +1 -1
  2. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/__init__.py +1 -1
  3. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/ipfs.py +18 -5
  4. {hippius-0.2.52 → hippius-0.2.53}/pyproject.toml +1 -1
  5. {hippius-0.2.52 → hippius-0.2.53}/README.md +0 -0
  6. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/cli.py +0 -0
  7. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/cli_assets.py +0 -0
  8. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/cli_handlers.py +0 -0
  9. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/cli_parser.py +0 -0
  10. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/cli_rich.py +0 -0
  11. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/client.py +0 -0
  12. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/config.py +0 -0
  13. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/db/README.md +0 -0
  14. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/db/env.db.template +0 -0
  15. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/db/migrations/20241201000001_create_key_storage_tables.sql +0 -0
  16. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/db/migrations/20241202000001_switch_to_subaccount_encryption.sql +0 -0
  17. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/db/setup_database.sh +0 -0
  18. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/db_utils.py +0 -0
  19. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/errors.py +0 -0
  20. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/incentives.py +0 -0
  21. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/ipfs_core.py +0 -0
  22. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/key_storage.py +0 -0
  23. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/substrate.py +0 -0
  24. {hippius-0.2.52 → hippius-0.2.53}/hippius_sdk/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hippius
3
- Version: 0.2.52
3
+ Version: 0.2.53
4
4
  Summary: Python SDK and CLI for Hippius blockchain storage
5
5
  Home-page: https://github.com/thenervelab/hippius-sdk
6
6
  Author: Dubs
@@ -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.52"
29
+ __version__ = "0.2.53"
30
30
  __all__ = [
31
31
  "HippiusClient",
32
32
  "IPFSClient",
@@ -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
- raise KeyError(
2127
- f"Store call failed, {file_name=} not found in {objects=}"
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(f"Started streaming from {download_node} for CID: {cid}")
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "hippius"
3
- version = "0.2.52"
3
+ version = "0.2.53"
4
4
  description = "Python SDK and CLI for Hippius blockchain storage"
5
5
  authors = ["Dubs <dubs@dubs.rs>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes