basic-ipfs 1.3.0__tar.gz → 1.3.1__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.
- {basic_ipfs-1.3.0/basic_ipfs.egg-info → basic_ipfs-1.3.1}/PKG-INFO +17 -5
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/README.md +16 -4
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1/basic_ipfs.egg-info}/PKG-INFO +17 -5
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/pyproject.toml +1 -1
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/LICENSE +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/MANIFEST.in +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/SECURITY.md +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs/__init__.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs/cli.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs/kubo_checksums.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs/py.typed +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs.egg-info/SOURCES.txt +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs.egg-info/dependency_links.txt +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs.egg-info/entry_points.txt +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs.egg-info/requires.txt +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/basic_ipfs.egg-info/top_level.txt +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/setup.cfg +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_announcing.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_basic.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_blocks.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_cli.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_concurrency.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_download.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_in_place.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_ranges_and_endpoints.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_streams.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_topics.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_two_node.py +0 -0
- {basic_ipfs-1.3.0 → basic_ipfs-1.3.1}/tests/test_unit.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: basic-ipfs
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: An intentionally tiny IPFS library for Python. Auto-manages a real Kubo node.
|
|
5
5
|
Author: Luke Profits
|
|
6
6
|
License: MIT License
|
|
@@ -48,7 +48,7 @@ An intentionally tiny IPFS library for Python. Zero setup, real Kubo node under
|
|
|
48
48
|
|
|
49
49
|
### Description
|
|
50
50
|
|
|
51
|
-
`basic-ipfs` does
|
|
51
|
+
At its core `basic-ipfs` does five things:
|
|
52
52
|
|
|
53
53
|
- Add a file or bytes to [IPFS](https://ipfs.tech/) and pin it (returns a [CID](https://docs.ipfs.tech/concepts/content-addressing/))
|
|
54
54
|
- Announce a file or bytes to IPFS without pinning (returns a CID — content may be GC'd)
|
|
@@ -56,6 +56,11 @@ An intentionally tiny IPFS library for Python. Zero setup, real Kubo node under
|
|
|
56
56
|
- Pin one CID or a list of CIDs (so they never get garbage-collected)
|
|
57
57
|
- Unpin one CID or a list of CIDs (idempotent — safe to re-run)
|
|
58
58
|
|
|
59
|
+
For a program that needs more there is a node of its own, byte-range reads,
|
|
60
|
+
peer-to-peer streams, publish/listen topics, adding a file in place, single
|
|
61
|
+
blocks, and choosing what your node announces -- each off unless you ask (see
|
|
62
|
+
below).
|
|
63
|
+
|
|
59
64
|
It also runs and manages a real [Kubo](https://github.com/ipfs/kubo) node for you — auto-downloaded on first use, auto-shutdown on exit. No daemon to install, no config files to edit, no accounts. (See [Privacy](#privacy) below — the default daemon does join the public IPFS network.)
|
|
60
65
|
|
|
61
66
|
I made `basic-ipfs` because no other Python packages make it this simple. Every existing client assumes you already have an IPFS daemon running. This one just works.
|
|
@@ -96,6 +101,7 @@ cid = basic_ipfs.compute_cid_locally("photo.jpg")
|
|
|
96
101
|
# Get — returns bytes, or writes to disk if you pass an output path
|
|
97
102
|
data = basic_ipfs.get(cid)
|
|
98
103
|
basic_ipfs.get(cid, "copy.jpg")
|
|
104
|
+
part = basic_ipfs.get(cid, offset=1000, length=500) # just those bytes
|
|
99
105
|
|
|
100
106
|
# Pin — one CID, or a whole list (one HTTP round-trip per ~500 CIDs)
|
|
101
107
|
basic_ipfs.pin(cid)
|
|
@@ -372,7 +378,9 @@ REQUESTS_CA_BUNDLE=/etc/ssl/corp-ca.pem \
|
|
|
372
378
|
python your_script.py
|
|
373
379
|
```
|
|
374
380
|
|
|
375
|
-
If
|
|
381
|
+
If `dist.ipfs.tech` cannot be reached, the first call fails in about a
|
|
382
|
+
minute with `IPFSBinaryNotFound`, naming the URL and the exact path to put
|
|
383
|
+
the binary at. If outbound access to `dist.ipfs.tech` is blocked, pre-place the binary at
|
|
376
384
|
`<user_data_dir>/basic_ipfs/bin/<platform>/ipfs` (or `ipfs.exe` on Windows)
|
|
377
385
|
and `basic-ipfs` will skip the download entirely. The bundled
|
|
378
386
|
`<site-packages>/basic_ipfs/bin/<platform>/ipfs` path is also honoured
|
|
@@ -444,8 +452,12 @@ For non-public data, you have three escape hatches — pick what fits:
|
|
|
444
452
|
```python
|
|
445
453
|
import basic_ipfs
|
|
446
454
|
|
|
447
|
-
# 1.
|
|
448
|
-
|
|
455
|
+
# 1. Announce only what you choose: a node of your own that tells the
|
|
456
|
+
# DHT only what you list (add(provide=False) alone does not do this).
|
|
457
|
+
node = basic_ipfs.IPFSManager(provide_strategy="mfs")
|
|
458
|
+
node.start()
|
|
459
|
+
cid = node.add(b"private") # kept, not announced
|
|
460
|
+
node.mfs_add(cid, f"/shown/{cid}") # only if you want it found
|
|
449
461
|
|
|
450
462
|
# 2. Private network: only peers with the same 256-bit swarm key can
|
|
451
463
|
# connect. Run BEFORE start() / the first IPFS operation.
|
|
@@ -4,7 +4,7 @@ An intentionally tiny IPFS library for Python. Zero setup, real Kubo node under
|
|
|
4
4
|
|
|
5
5
|
### Description
|
|
6
6
|
|
|
7
|
-
`basic-ipfs` does
|
|
7
|
+
At its core `basic-ipfs` does five things:
|
|
8
8
|
|
|
9
9
|
- Add a file or bytes to [IPFS](https://ipfs.tech/) and pin it (returns a [CID](https://docs.ipfs.tech/concepts/content-addressing/))
|
|
10
10
|
- Announce a file or bytes to IPFS without pinning (returns a CID — content may be GC'd)
|
|
@@ -12,6 +12,11 @@ An intentionally tiny IPFS library for Python. Zero setup, real Kubo node under
|
|
|
12
12
|
- Pin one CID or a list of CIDs (so they never get garbage-collected)
|
|
13
13
|
- Unpin one CID or a list of CIDs (idempotent — safe to re-run)
|
|
14
14
|
|
|
15
|
+
For a program that needs more there is a node of its own, byte-range reads,
|
|
16
|
+
peer-to-peer streams, publish/listen topics, adding a file in place, single
|
|
17
|
+
blocks, and choosing what your node announces -- each off unless you ask (see
|
|
18
|
+
below).
|
|
19
|
+
|
|
15
20
|
It also runs and manages a real [Kubo](https://github.com/ipfs/kubo) node for you — auto-downloaded on first use, auto-shutdown on exit. No daemon to install, no config files to edit, no accounts. (See [Privacy](#privacy) below — the default daemon does join the public IPFS network.)
|
|
16
21
|
|
|
17
22
|
I made `basic-ipfs` because no other Python packages make it this simple. Every existing client assumes you already have an IPFS daemon running. This one just works.
|
|
@@ -52,6 +57,7 @@ cid = basic_ipfs.compute_cid_locally("photo.jpg")
|
|
|
52
57
|
# Get — returns bytes, or writes to disk if you pass an output path
|
|
53
58
|
data = basic_ipfs.get(cid)
|
|
54
59
|
basic_ipfs.get(cid, "copy.jpg")
|
|
60
|
+
part = basic_ipfs.get(cid, offset=1000, length=500) # just those bytes
|
|
55
61
|
|
|
56
62
|
# Pin — one CID, or a whole list (one HTTP round-trip per ~500 CIDs)
|
|
57
63
|
basic_ipfs.pin(cid)
|
|
@@ -328,7 +334,9 @@ REQUESTS_CA_BUNDLE=/etc/ssl/corp-ca.pem \
|
|
|
328
334
|
python your_script.py
|
|
329
335
|
```
|
|
330
336
|
|
|
331
|
-
If
|
|
337
|
+
If `dist.ipfs.tech` cannot be reached, the first call fails in about a
|
|
338
|
+
minute with `IPFSBinaryNotFound`, naming the URL and the exact path to put
|
|
339
|
+
the binary at. If outbound access to `dist.ipfs.tech` is blocked, pre-place the binary at
|
|
332
340
|
`<user_data_dir>/basic_ipfs/bin/<platform>/ipfs` (or `ipfs.exe` on Windows)
|
|
333
341
|
and `basic-ipfs` will skip the download entirely. The bundled
|
|
334
342
|
`<site-packages>/basic_ipfs/bin/<platform>/ipfs` path is also honoured
|
|
@@ -400,8 +408,12 @@ For non-public data, you have three escape hatches — pick what fits:
|
|
|
400
408
|
```python
|
|
401
409
|
import basic_ipfs
|
|
402
410
|
|
|
403
|
-
# 1.
|
|
404
|
-
|
|
411
|
+
# 1. Announce only what you choose: a node of your own that tells the
|
|
412
|
+
# DHT only what you list (add(provide=False) alone does not do this).
|
|
413
|
+
node = basic_ipfs.IPFSManager(provide_strategy="mfs")
|
|
414
|
+
node.start()
|
|
415
|
+
cid = node.add(b"private") # kept, not announced
|
|
416
|
+
node.mfs_add(cid, f"/shown/{cid}") # only if you want it found
|
|
405
417
|
|
|
406
418
|
# 2. Private network: only peers with the same 256-bit swarm key can
|
|
407
419
|
# connect. Run BEFORE start() / the first IPFS operation.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: basic-ipfs
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: An intentionally tiny IPFS library for Python. Auto-manages a real Kubo node.
|
|
5
5
|
Author: Luke Profits
|
|
6
6
|
License: MIT License
|
|
@@ -48,7 +48,7 @@ An intentionally tiny IPFS library for Python. Zero setup, real Kubo node under
|
|
|
48
48
|
|
|
49
49
|
### Description
|
|
50
50
|
|
|
51
|
-
`basic-ipfs` does
|
|
51
|
+
At its core `basic-ipfs` does five things:
|
|
52
52
|
|
|
53
53
|
- Add a file or bytes to [IPFS](https://ipfs.tech/) and pin it (returns a [CID](https://docs.ipfs.tech/concepts/content-addressing/))
|
|
54
54
|
- Announce a file or bytes to IPFS without pinning (returns a CID — content may be GC'd)
|
|
@@ -56,6 +56,11 @@ An intentionally tiny IPFS library for Python. Zero setup, real Kubo node under
|
|
|
56
56
|
- Pin one CID or a list of CIDs (so they never get garbage-collected)
|
|
57
57
|
- Unpin one CID or a list of CIDs (idempotent — safe to re-run)
|
|
58
58
|
|
|
59
|
+
For a program that needs more there is a node of its own, byte-range reads,
|
|
60
|
+
peer-to-peer streams, publish/listen topics, adding a file in place, single
|
|
61
|
+
blocks, and choosing what your node announces -- each off unless you ask (see
|
|
62
|
+
below).
|
|
63
|
+
|
|
59
64
|
It also runs and manages a real [Kubo](https://github.com/ipfs/kubo) node for you — auto-downloaded on first use, auto-shutdown on exit. No daemon to install, no config files to edit, no accounts. (See [Privacy](#privacy) below — the default daemon does join the public IPFS network.)
|
|
60
65
|
|
|
61
66
|
I made `basic-ipfs` because no other Python packages make it this simple. Every existing client assumes you already have an IPFS daemon running. This one just works.
|
|
@@ -96,6 +101,7 @@ cid = basic_ipfs.compute_cid_locally("photo.jpg")
|
|
|
96
101
|
# Get — returns bytes, or writes to disk if you pass an output path
|
|
97
102
|
data = basic_ipfs.get(cid)
|
|
98
103
|
basic_ipfs.get(cid, "copy.jpg")
|
|
104
|
+
part = basic_ipfs.get(cid, offset=1000, length=500) # just those bytes
|
|
99
105
|
|
|
100
106
|
# Pin — one CID, or a whole list (one HTTP round-trip per ~500 CIDs)
|
|
101
107
|
basic_ipfs.pin(cid)
|
|
@@ -372,7 +378,9 @@ REQUESTS_CA_BUNDLE=/etc/ssl/corp-ca.pem \
|
|
|
372
378
|
python your_script.py
|
|
373
379
|
```
|
|
374
380
|
|
|
375
|
-
If
|
|
381
|
+
If `dist.ipfs.tech` cannot be reached, the first call fails in about a
|
|
382
|
+
minute with `IPFSBinaryNotFound`, naming the URL and the exact path to put
|
|
383
|
+
the binary at. If outbound access to `dist.ipfs.tech` is blocked, pre-place the binary at
|
|
376
384
|
`<user_data_dir>/basic_ipfs/bin/<platform>/ipfs` (or `ipfs.exe` on Windows)
|
|
377
385
|
and `basic-ipfs` will skip the download entirely. The bundled
|
|
378
386
|
`<site-packages>/basic_ipfs/bin/<platform>/ipfs` path is also honoured
|
|
@@ -444,8 +452,12 @@ For non-public data, you have three escape hatches — pick what fits:
|
|
|
444
452
|
```python
|
|
445
453
|
import basic_ipfs
|
|
446
454
|
|
|
447
|
-
# 1.
|
|
448
|
-
|
|
455
|
+
# 1. Announce only what you choose: a node of your own that tells the
|
|
456
|
+
# DHT only what you list (add(provide=False) alone does not do this).
|
|
457
|
+
node = basic_ipfs.IPFSManager(provide_strategy="mfs")
|
|
458
|
+
node.start()
|
|
459
|
+
cid = node.add(b"private") # kept, not announced
|
|
460
|
+
node.mfs_add(cid, f"/shown/{cid}") # only if you want it found
|
|
449
461
|
|
|
450
462
|
# 2. Private network: only peers with the same 256-bit swarm key can
|
|
451
463
|
# connect. Run BEFORE start() / the first IPFS operation.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "basic-ipfs"
|
|
7
|
-
version = "1.3.
|
|
7
|
+
version = "1.3.1"
|
|
8
8
|
description = "An intentionally tiny IPFS library for Python. Auto-manages a real Kubo node."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { file = "LICENSE" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|