ipfs-node 0.1.6__tar.gz → 0.1.7__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.
- {ipfs_node-0.1.6/src/ipfs_node.egg-info → ipfs_node-0.1.7}/PKG-INFO +1 -1
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/setup.py +4 -9
- {ipfs_node-0.1.6 → ipfs_node-0.1.7/src/ipfs_node.egg-info}/PKG-INFO +1 -1
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node.egg-info/SOURCES.txt +4 -2
- ipfs_node-0.1.7/src/libkubo/libkubo_android_arm64.h +237 -0
- ipfs_node-0.1.7/src/libkubo/libkubo_android_arm64.so +0 -0
- {ipfs_node-0.1.6/src/ipfs_node → ipfs_node-0.1.7/src}/libkubo/libkubo_linux_x86_64.so +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/INSTALL.md +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/LICENSE +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/MANIFEST.in +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/README.md +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/examples/basic_usage.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/examples/chat_app.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/examples/file_sharing.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/examples/p2p_example.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/examples/p2p_socket_example.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/examples/pubsub_example.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/examples/pubsub_simple_test.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/setup.cfg +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/__init__.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/ipfs_files.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/ipfs_node.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/ipfs_peers.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/ipfs_pubsub.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/ipfs_tunnels.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/utils/__init__.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/utils/cid_utils.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node/utils/peer_utils.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node.egg-info/dependency_links.txt +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node.egg-info/requires.txt +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/ipfs_node.egg-info/top_level.txt +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/libkubo/__init__.py +0 -0
- {ipfs_node-0.1.6/src/ipfs_node → ipfs_node-0.1.7/src}/libkubo/libkubo_linux_x86_64.h +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/src/libkubo/libkubo_loader.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/tests/test_all.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/tests/test_peers.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/tests/test_pubsub.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/tests/test_tunnels.py +0 -0
- {ipfs_node-0.1.6 → ipfs_node-0.1.7}/tests/test_utils.py +0 -0
|
@@ -30,12 +30,6 @@ def compile_go_library():
|
|
|
30
30
|
if not os.path.exists(libkubo_dir):
|
|
31
31
|
os.makedirs(libkubo_dir)
|
|
32
32
|
|
|
33
|
-
# Create the libkubo directory if it doesn't exist
|
|
34
|
-
lib_dir = os.path.join(os.path.dirname(
|
|
35
|
-
os.path.abspath(__file__)), 'src', 'ipfs_node', 'libkubo')
|
|
36
|
-
if not os.path.exists(lib_dir):
|
|
37
|
-
os.makedirs(lib_dir)
|
|
38
|
-
|
|
39
33
|
# Determine the output file extension based on platform
|
|
40
34
|
if platform.system() == 'Windows':
|
|
41
35
|
lib_name = 'libkubo.dll'
|
|
@@ -55,7 +49,7 @@ def compile_go_library():
|
|
|
55
49
|
print("Continuing with existing code...")
|
|
56
50
|
|
|
57
51
|
# Check if the output library already exists
|
|
58
|
-
output_path = os.path.join(
|
|
52
|
+
output_path = os.path.join(libkubo_dir, lib_name)
|
|
59
53
|
if os.path.exists(output_path):
|
|
60
54
|
print(f"Shared library already exists at {output_path}")
|
|
61
55
|
return
|
|
@@ -101,12 +95,13 @@ pip.main(["install", "-r", os.path.join(PROJ_DIR, "requirements.txt")])
|
|
|
101
95
|
|
|
102
96
|
setup(
|
|
103
97
|
name="ipfs_node",
|
|
104
|
-
version="0.1.
|
|
98
|
+
version="0.1.7",
|
|
105
99
|
packages=find_packages(where="src"),
|
|
106
100
|
package_dir={"": "src"},
|
|
107
101
|
package_data={
|
|
108
|
-
'
|
|
102
|
+
'libkubo': ['*.so', '*.h'],
|
|
109
103
|
},
|
|
104
|
+
include_package_data=True,
|
|
110
105
|
cmdclass={
|
|
111
106
|
'build_py': BuildGoLibraryCommand,
|
|
112
107
|
'install': InstallCommand,
|
|
@@ -21,12 +21,14 @@ src/ipfs_node.egg-info/SOURCES.txt
|
|
|
21
21
|
src/ipfs_node.egg-info/dependency_links.txt
|
|
22
22
|
src/ipfs_node.egg-info/requires.txt
|
|
23
23
|
src/ipfs_node.egg-info/top_level.txt
|
|
24
|
-
src/ipfs_node/libkubo/libkubo_linux_x86_64.h
|
|
25
|
-
src/ipfs_node/libkubo/libkubo_linux_x86_64.so
|
|
26
24
|
src/ipfs_node/utils/__init__.py
|
|
27
25
|
src/ipfs_node/utils/cid_utils.py
|
|
28
26
|
src/ipfs_node/utils/peer_utils.py
|
|
29
27
|
src/libkubo/__init__.py
|
|
28
|
+
src/libkubo/libkubo_android_arm64.h
|
|
29
|
+
src/libkubo/libkubo_android_arm64.so
|
|
30
|
+
src/libkubo/libkubo_linux_x86_64.h
|
|
31
|
+
src/libkubo/libkubo_linux_x86_64.so
|
|
30
32
|
src/libkubo/libkubo_loader.py
|
|
31
33
|
tests/test_all.py
|
|
32
34
|
tests/test_peers.py
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/* Code generated by cmd/cgo; DO NOT EDIT. */
|
|
2
|
+
|
|
3
|
+
/* package github.com/emendir/py_ipfs_node/libkubo */
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
#line 1 "cgo-builtin-export-prolog"
|
|
7
|
+
|
|
8
|
+
#include <stddef.h>
|
|
9
|
+
|
|
10
|
+
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
|
11
|
+
#define GO_CGO_EXPORT_PROLOGUE_H
|
|
12
|
+
|
|
13
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
|
14
|
+
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#endif
|
|
18
|
+
|
|
19
|
+
/* Start of preamble from import "C" comments. */
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
#line 3 "files.go"
|
|
23
|
+
#include <stdlib.h>
|
|
24
|
+
#include <stdbool.h>
|
|
25
|
+
|
|
26
|
+
#line 1 "cgo-generated-wrapper"
|
|
27
|
+
|
|
28
|
+
#line 3 "p2p.go"
|
|
29
|
+
|
|
30
|
+
#include <stdlib.h>
|
|
31
|
+
#include <stdbool.h>
|
|
32
|
+
|
|
33
|
+
#line 1 "cgo-generated-wrapper"
|
|
34
|
+
|
|
35
|
+
#line 3 "peers.go"
|
|
36
|
+
#include <stdlib.h>
|
|
37
|
+
|
|
38
|
+
#line 1 "cgo-generated-wrapper"
|
|
39
|
+
|
|
40
|
+
#line 3 "pubsub.go"
|
|
41
|
+
#include <stdlib.h>
|
|
42
|
+
|
|
43
|
+
#line 1 "cgo-generated-wrapper"
|
|
44
|
+
|
|
45
|
+
#line 3 "repo.go"
|
|
46
|
+
#include <stdlib.h>
|
|
47
|
+
|
|
48
|
+
#line 1 "cgo-generated-wrapper"
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/* End of preamble from import "C" comments. */
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
/* Start of boilerplate cgo prologue. */
|
|
55
|
+
#line 1 "cgo-gcc-export-header-prolog"
|
|
56
|
+
|
|
57
|
+
#ifndef GO_CGO_PROLOGUE_H
|
|
58
|
+
#define GO_CGO_PROLOGUE_H
|
|
59
|
+
|
|
60
|
+
typedef signed char GoInt8;
|
|
61
|
+
typedef unsigned char GoUint8;
|
|
62
|
+
typedef short GoInt16;
|
|
63
|
+
typedef unsigned short GoUint16;
|
|
64
|
+
typedef int GoInt32;
|
|
65
|
+
typedef unsigned int GoUint32;
|
|
66
|
+
typedef long long GoInt64;
|
|
67
|
+
typedef unsigned long long GoUint64;
|
|
68
|
+
typedef GoInt64 GoInt;
|
|
69
|
+
typedef GoUint64 GoUint;
|
|
70
|
+
typedef size_t GoUintptr;
|
|
71
|
+
typedef float GoFloat32;
|
|
72
|
+
typedef double GoFloat64;
|
|
73
|
+
#ifdef _MSC_VER
|
|
74
|
+
#include <complex.h>
|
|
75
|
+
typedef _Fcomplex GoComplex64;
|
|
76
|
+
typedef _Dcomplex GoComplex128;
|
|
77
|
+
#else
|
|
78
|
+
typedef float _Complex GoComplex64;
|
|
79
|
+
typedef double _Complex GoComplex128;
|
|
80
|
+
#endif
|
|
81
|
+
|
|
82
|
+
/*
|
|
83
|
+
static assertion to make sure the file is being used on architecture
|
|
84
|
+
at least with matching size of GoInt.
|
|
85
|
+
*/
|
|
86
|
+
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
|
|
87
|
+
|
|
88
|
+
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
|
89
|
+
typedef _GoString_ GoString;
|
|
90
|
+
#endif
|
|
91
|
+
typedef void *GoMap;
|
|
92
|
+
typedef void *GoChan;
|
|
93
|
+
typedef struct { void *t; void *v; } GoInterface;
|
|
94
|
+
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
|
|
95
|
+
|
|
96
|
+
#endif
|
|
97
|
+
|
|
98
|
+
/* End of boilerplate cgo prologue. */
|
|
99
|
+
|
|
100
|
+
#ifdef __cplusplus
|
|
101
|
+
extern "C" {
|
|
102
|
+
#endif
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
// AddFile adds a file to IPFS
|
|
106
|
+
//
|
|
107
|
+
extern char* AddFile(char* repoPath, char* filePath, _Bool onlyHash);
|
|
108
|
+
|
|
109
|
+
// FreeString is a no-op for now - we'll let Go's garbage collection handle the memory
|
|
110
|
+
//
|
|
111
|
+
extern void FreeString(char* str);
|
|
112
|
+
|
|
113
|
+
// Download retrieves a file or directory from IPFS
|
|
114
|
+
//
|
|
115
|
+
extern int Download(char* repoPath, char* cidStr, char* destPath);
|
|
116
|
+
|
|
117
|
+
// PinCID pins a CID to the IPFS node
|
|
118
|
+
//
|
|
119
|
+
extern int PinCID(char* repoPath, char* cidStr);
|
|
120
|
+
|
|
121
|
+
// UnpinCID unpins a CID from the IPFS node
|
|
122
|
+
//
|
|
123
|
+
extern int UnpinCID(char* repoPath, char* cidStr);
|
|
124
|
+
|
|
125
|
+
// ListPins returns a list of pinned CIDs
|
|
126
|
+
//
|
|
127
|
+
extern char* ListPins(char* repoPath);
|
|
128
|
+
|
|
129
|
+
// RemoveCID removes a pinned CID from IPFS (alias for UnpinCID for clarity)
|
|
130
|
+
//
|
|
131
|
+
extern int RemoveCID(char* repoPath, char* cidStr);
|
|
132
|
+
|
|
133
|
+
// P2PForward creates a libp2p stream mounting forwarding connection
|
|
134
|
+
//
|
|
135
|
+
extern int P2PForward(char* repoPath, char* proto, char* listenAddr, char* targetPeerID);
|
|
136
|
+
|
|
137
|
+
// P2PListen creates a libp2p service that listens for connections on the given protocol
|
|
138
|
+
//
|
|
139
|
+
extern int P2PListen(char* repoPath, char* proto, char* targetAddr);
|
|
140
|
+
|
|
141
|
+
// P2PClose closes p2p listener or stream
|
|
142
|
+
//
|
|
143
|
+
extern int P2PClose(char* repoPath, char* proto, char* listenAddr, char* targetAddr, _Bool _all, _Bool listeners, _Bool forwarders);
|
|
144
|
+
|
|
145
|
+
// P2PListListeners lists active p2p listeners
|
|
146
|
+
//
|
|
147
|
+
extern char* P2PListListeners(char* repoPath);
|
|
148
|
+
|
|
149
|
+
// P2PEnable ensures p2p functionality is enabled in the config
|
|
150
|
+
//
|
|
151
|
+
extern int P2PEnable(char* repoPath);
|
|
152
|
+
|
|
153
|
+
// P2PListForwards lists active p2p forwarding connections
|
|
154
|
+
//
|
|
155
|
+
extern char* P2PListForwards(char* repoPath);
|
|
156
|
+
|
|
157
|
+
// P2PCloseAllListeners closes all p2p listeners
|
|
158
|
+
//
|
|
159
|
+
extern int P2PCloseAllListeners(char* repoPath);
|
|
160
|
+
|
|
161
|
+
// P2PCloseAllForwards closes all p2p forwards
|
|
162
|
+
//
|
|
163
|
+
extern int P2PCloseAllForwards(char* repoPath);
|
|
164
|
+
|
|
165
|
+
// ConnectToPeer connects to a peer
|
|
166
|
+
//
|
|
167
|
+
extern int ConnectToPeer(char* repoPath, char* peerAddr);
|
|
168
|
+
|
|
169
|
+
// ListPeers connects to a peer
|
|
170
|
+
//
|
|
171
|
+
extern char* ListPeers(char* repoPath);
|
|
172
|
+
|
|
173
|
+
// ListPeers connects to a peer
|
|
174
|
+
//
|
|
175
|
+
extern char* ListPeersIDs(char* repoPath);
|
|
176
|
+
|
|
177
|
+
// FindPeer connects to a peer
|
|
178
|
+
//
|
|
179
|
+
extern char* FindPeer(char* repoPath, char* peerAddr, int timeOut);
|
|
180
|
+
|
|
181
|
+
// PubSubListTopics lists the topics the node is subscribed to
|
|
182
|
+
//
|
|
183
|
+
extern char* PubSubListTopics(char* repoPath);
|
|
184
|
+
|
|
185
|
+
// PubSubPublish publishes a message to a topic
|
|
186
|
+
//
|
|
187
|
+
extern int PubSubPublish(char* repoPath, char* topic, void* data, int dataLen);
|
|
188
|
+
|
|
189
|
+
// PubSubSubscribe subscribes to a topic
|
|
190
|
+
//
|
|
191
|
+
extern long long PubSubSubscribe(char* repoPath, char* topic);
|
|
192
|
+
|
|
193
|
+
// PubSubNextMessage gets the next message from a subscription
|
|
194
|
+
//
|
|
195
|
+
extern char* PubSubNextMessage(long long subID);
|
|
196
|
+
|
|
197
|
+
// PubSubUnsubscribe unsubscribes from a topic
|
|
198
|
+
//
|
|
199
|
+
extern int PubSubUnsubscribe(long long subID);
|
|
200
|
+
|
|
201
|
+
// PubSubPeers lists peers participating in a topic
|
|
202
|
+
//
|
|
203
|
+
extern char* PubSubPeers(char* repoPath, char* topic);
|
|
204
|
+
|
|
205
|
+
// PubSubCloseRepoSubscriptions closes all active pubsub subscriptions for a specific repository
|
|
206
|
+
//
|
|
207
|
+
extern int PubSubCloseRepoSubscriptions(char* repoPath);
|
|
208
|
+
|
|
209
|
+
// PubSubCloseAllSubscriptions closes all active pubsub subscriptions across all repositories
|
|
210
|
+
//
|
|
211
|
+
extern int PubSubCloseAllSubscriptions();
|
|
212
|
+
|
|
213
|
+
// CreateRepo initializes a new IPFS repository
|
|
214
|
+
//
|
|
215
|
+
extern int CreateRepo(char* repoPath);
|
|
216
|
+
extern int RunNode(char* repoPath);
|
|
217
|
+
|
|
218
|
+
// PubSubEnable enables pubsub on an IPFS node configuration
|
|
219
|
+
//
|
|
220
|
+
extern int PubSubEnable(char* repoPath);
|
|
221
|
+
extern char* TestGetString();
|
|
222
|
+
|
|
223
|
+
// GetNodeID gets the ID of the IPFS node
|
|
224
|
+
//
|
|
225
|
+
extern char* GetNodeID(char* repoPath);
|
|
226
|
+
|
|
227
|
+
// GetNodeMultiAddrs gets the ID of the IPFS node
|
|
228
|
+
//
|
|
229
|
+
extern char* GetNodeMultiAddrs(char* repoPath);
|
|
230
|
+
|
|
231
|
+
// CleanupNode explicitly releases a node by path
|
|
232
|
+
//
|
|
233
|
+
extern int CleanupNode(char* repoPath);
|
|
234
|
+
|
|
235
|
+
#ifdef __cplusplus
|
|
236
|
+
}
|
|
237
|
+
#endif
|
|
Binary file
|
|
index a0f517f..f786450 100644
|
|
|
Binary file
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|