hippius 0.1.10__py3-none-any.whl → 0.1.11__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.1.10.dist-info → hippius-0.1.11.dist-info}/METADATA +13 -1
- {hippius-0.1.10.dist-info → hippius-0.1.11.dist-info}/RECORD +5 -5
- hippius_sdk/cli.py +47 -0
- {hippius-0.1.10.dist-info → hippius-0.1.11.dist-info}/WHEEL +0 -0
- {hippius-0.1.10.dist-info → hippius-0.1.11.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: hippius
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.11
|
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
|
@@ -348,6 +348,18 @@ When choosing the second option, the system will process each file in the direct
|
|
348
348
|
- Successfully coded files with their metadata CIDs
|
349
349
|
- Any files that failed, with error details
|
350
350
|
|
351
|
+
You can also directly use the dedicated command for directory erasure coding:
|
352
|
+
|
353
|
+
```bash
|
354
|
+
# Direct command for applying erasure coding to an entire directory
|
355
|
+
hippius erasure-code-dir my_directory/
|
356
|
+
|
357
|
+
# With custom parameters
|
358
|
+
hippius erasure-code-dir my_important_files/ --k 4 --m 8 --encrypt
|
359
|
+
```
|
360
|
+
|
361
|
+
This dedicated command processes each file in the directory individually, optimizing erasure coding parameters for each file based on its size.
|
362
|
+
|
351
363
|
To reconstruct a file from erasure-coded chunks:
|
352
364
|
|
353
365
|
```bash
|
@@ -1,12 +1,12 @@
|
|
1
1
|
hippius_sdk/__init__.py,sha256=OluIKx43ZOGvMI0W06B4bTTcmOJz4e6lq46GLBbPg8M,1402
|
2
2
|
hippius_sdk/account.py,sha256=R0lsyUAqe4nmPyiMt4hGDRucoSrpeLouWBVe7DP20Bc,24308
|
3
|
-
hippius_sdk/cli.py,sha256=
|
3
|
+
hippius_sdk/cli.py,sha256=yG1K0N2syohVUIoz9FSoBPTEVpc6ZsDIiPM1H0VsHwU,85646
|
4
4
|
hippius_sdk/client.py,sha256=54tsg4k29sqt3F77LQJ_vhzzTR73QuZ_edqI_BvZM1E,14905
|
5
5
|
hippius_sdk/config.py,sha256=wrVU0599aH39NIVRL59pZPyHXRevATQR9zwIUkCaWFE,25389
|
6
6
|
hippius_sdk/ipfs.py,sha256=9fds5MJwVb7t8IqROM70x9fWgyk9_Ot5psat_hMnRN8,63969
|
7
7
|
hippius_sdk/substrate.py,sha256=V49s1VYbl94Wk8-IH8DQsXLmRsAShGhIX9aYSY0BkBk,33034
|
8
8
|
hippius_sdk/utils.py,sha256=FSdVhYuCsKRNZiN9-XdzN2HESHXAVcWEpOpb3CLmVPI,2192
|
9
|
-
hippius-0.1.
|
10
|
-
hippius-0.1.
|
11
|
-
hippius-0.1.
|
12
|
-
hippius-0.1.
|
9
|
+
hippius-0.1.11.dist-info/METADATA,sha256=8O4ifXpoKIvnchWph3WdHLytZniD37M8exHG_HhXux8,31735
|
10
|
+
hippius-0.1.11.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
11
|
+
hippius-0.1.11.dist-info/entry_points.txt,sha256=b1lo60zRXmv1ud-c5BC-cJcAfGE5FD4qM_nia6XeQtM,98
|
12
|
+
hippius-0.1.11.dist-info/RECORD,,
|
hippius_sdk/cli.py
CHANGED
@@ -1915,6 +1915,41 @@ examples:
|
|
1915
1915
|
"--verbose", action="store_true", help="Enable verbose output", default=True
|
1916
1916
|
)
|
1917
1917
|
|
1918
|
+
# Erasure code directory command
|
1919
|
+
erasure_code_dir_parser = subparsers.add_parser(
|
1920
|
+
"erasure-code-dir", help="Apply erasure coding to each file in a directory"
|
1921
|
+
)
|
1922
|
+
erasure_code_dir_parser.add_argument(
|
1923
|
+
"dir_path", help="Path to directory to process"
|
1924
|
+
)
|
1925
|
+
erasure_code_dir_parser.add_argument(
|
1926
|
+
"--k",
|
1927
|
+
type=int,
|
1928
|
+
default=3,
|
1929
|
+
help="Number of data chunks needed to reconstruct (default: 3)",
|
1930
|
+
)
|
1931
|
+
erasure_code_dir_parser.add_argument(
|
1932
|
+
"--m", type=int, default=5, help="Total number of chunks to create (default: 5)"
|
1933
|
+
)
|
1934
|
+
erasure_code_dir_parser.add_argument(
|
1935
|
+
"--chunk-size",
|
1936
|
+
type=int,
|
1937
|
+
default=1048576,
|
1938
|
+
help="Chunk size in bytes (default: 1MB)",
|
1939
|
+
)
|
1940
|
+
erasure_code_dir_parser.add_argument(
|
1941
|
+
"--miner-ids", help="Comma-separated list of miner IDs"
|
1942
|
+
)
|
1943
|
+
erasure_code_dir_parser.add_argument(
|
1944
|
+
"--encrypt", action="store_true", help="Encrypt the files"
|
1945
|
+
)
|
1946
|
+
erasure_code_dir_parser.add_argument(
|
1947
|
+
"--no-encrypt", action="store_true", help="Do not encrypt the files"
|
1948
|
+
)
|
1949
|
+
erasure_code_dir_parser.add_argument(
|
1950
|
+
"--verbose", action="store_true", help="Enable verbose output", default=True
|
1951
|
+
)
|
1952
|
+
|
1918
1953
|
# Reconstruct command
|
1919
1954
|
reconstruct_parser = subparsers.add_parser(
|
1920
1955
|
"reconstruct", help="Reconstruct an erasure-coded file"
|
@@ -2260,6 +2295,18 @@ examples:
|
|
2260
2295
|
verbose=args.verbose,
|
2261
2296
|
)
|
2262
2297
|
|
2298
|
+
elif args.command == "erasure-code-dir":
|
2299
|
+
return handle_erasure_code_directory(
|
2300
|
+
client,
|
2301
|
+
args.dir_path,
|
2302
|
+
args.k,
|
2303
|
+
args.m,
|
2304
|
+
args.chunk_size,
|
2305
|
+
miner_ids,
|
2306
|
+
encrypt=args.encrypt,
|
2307
|
+
verbose=args.verbose,
|
2308
|
+
)
|
2309
|
+
|
2263
2310
|
elif args.command == "reconstruct":
|
2264
2311
|
return handle_reconstruct(
|
2265
2312
|
client, args.metadata_cid, args.output_file, verbose=args.verbose
|
File without changes
|
File without changes
|