simpledht 0.1.3__tar.gz → 0.1.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simpledht
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: A simple distributed hash table implementation
5
5
  Home-page: https://github.com/dhruvldrp9/simpledht
6
6
  Author: Dhruvkumar Patel
@@ -53,7 +53,7 @@ pip install simpledht
53
53
 
54
54
  1. Clone the repository:
55
55
  ```bash
56
- git clone <repository-url>
56
+ git clone https://github.com/dhruvldrp9/SimpleDHT
57
57
  cd SimpleDHT
58
58
  ```
59
59
 
@@ -103,48 +103,50 @@ See the `examples/` directory for more detailed usage examples:
103
103
  #### Starting a Node
104
104
 
105
105
  To start a new DHT node:
106
+
106
107
  ```bash
107
- simpledht start --host 0.0.0.0 --port 5000
108
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000
108
109
  ```
109
110
 
110
111
  To start a node and connect to existing nodes:
112
+
111
113
  ```bash
112
- simpledht start --host 0.0.0.0 --port 5001 --bootstrap "PUBLIC_IP:5000"
114
+ python -m simpledht.cli start --host 0.0.0.0 --port 5001 --bootstrap "PUBLIC_IP:5000"
113
115
  ```
114
116
 
115
117
  #### Storing Data
116
118
 
117
119
  To store a key-value pair:
120
+
118
121
  ```bash
119
- simpledht put --host PUBLIC_IP --port 5000 mykey "my value"
122
+ python -m simpledht.cli put --host PUBLIC_IP --port 5000 mykey "my value"
120
123
  ```
121
124
 
122
125
  #### Retrieving Data
123
126
 
124
- To retrieve a value:
125
127
  ```bash
126
- simpledht get --host PUBLIC_IP --port 5000 mykey
128
+ python -m simpledht.cli get --host PUBLIC_IP --port 5000 mykey
127
129
  ```
128
130
 
129
131
  ### Cross-Network Example
130
132
 
131
133
  1. Start Node 1 (First network):
132
134
  ```bash
133
- simpledht start --host 0.0.0.0 --port 5000
135
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000
134
136
  ```
135
137
 
136
138
  2. Start Node 2 (Second network):
137
139
  ```bash
138
- simpledht start --host 0.0.0.0 --port 5000 --bootstrap "NODE1_PUBLIC_IP:5000"
140
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000 --bootstrap "NODE1_PUBLIC_IP:5000"
139
141
  ```
140
142
 
141
143
  3. Store and retrieve data:
142
144
  ```bash
143
145
  # Store on Node 1
144
- simpledht put --host NODE1_PUBLIC_IP --port 5000 test_key "test_value"
146
+ python -m simpledht.cli put --host NODE1_PUBLIC_IP --port 5000 test_key "test_value"
145
147
 
146
148
  # Retrieve from Node 2
147
- simpledht get --host NODE2_PUBLIC_IP --port 5000 test_key
149
+ python -m simpledht.cli get --host NODE2_PUBLIC_IP --port 5000 test_key
148
150
  ```
149
151
 
150
152
  ## Network Configuration
@@ -168,12 +170,13 @@ If your node is behind a NAT router:
168
170
  2. Set up port forwarding for UDP port 5000
169
171
  3. Forward to your node's local IP address
170
172
 
171
- ## New Features in Version 0.1.2
173
+ ## New Features in Version 0.1.3
172
174
 
173
175
  - **Improved Bootstrap Mechanism**: Added retry logic for more reliable connections across networks
174
176
  - **Data Synchronization**: Nodes automatically sync data when joining the network
175
177
  - **Enhanced Error Handling**: Better handling of network timeouts and connection issues
176
178
  - **Full Data Replication**: All nodes maintain a complete copy of the data for redundancy
179
+ - **Alternative Command Method**: Added support for running via `python -m simpledht.cli`
177
180
 
178
181
  ## Troubleshooting
179
182
 
@@ -202,6 +205,7 @@ If your node is behind a NAT router:
202
205
  - `Address already in use`: Port conflict
203
206
  - `Failed to get public IP`: Network connectivity issue
204
207
  - `Connection attempt X/3 timed out, retrying...`: Network latency or connectivity issues
208
+ - `simpledht: command not found`: The command-line tool is not in your PATH. Use the Python module directly: `python -m simpledht.cli`
205
209
 
206
210
  ## Architecture
207
211
 
@@ -27,7 +27,7 @@ pip install simpledht
27
27
 
28
28
  1. Clone the repository:
29
29
  ```bash
30
- git clone <repository-url>
30
+ git clone https://github.com/dhruvldrp9/SimpleDHT
31
31
  cd SimpleDHT
32
32
  ```
33
33
 
@@ -77,48 +77,50 @@ See the `examples/` directory for more detailed usage examples:
77
77
  #### Starting a Node
78
78
 
79
79
  To start a new DHT node:
80
+
80
81
  ```bash
81
- simpledht start --host 0.0.0.0 --port 5000
82
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000
82
83
  ```
83
84
 
84
85
  To start a node and connect to existing nodes:
86
+
85
87
  ```bash
86
- simpledht start --host 0.0.0.0 --port 5001 --bootstrap "PUBLIC_IP:5000"
88
+ python -m simpledht.cli start --host 0.0.0.0 --port 5001 --bootstrap "PUBLIC_IP:5000"
87
89
  ```
88
90
 
89
91
  #### Storing Data
90
92
 
91
93
  To store a key-value pair:
94
+
92
95
  ```bash
93
- simpledht put --host PUBLIC_IP --port 5000 mykey "my value"
96
+ python -m simpledht.cli put --host PUBLIC_IP --port 5000 mykey "my value"
94
97
  ```
95
98
 
96
99
  #### Retrieving Data
97
100
 
98
- To retrieve a value:
99
101
  ```bash
100
- simpledht get --host PUBLIC_IP --port 5000 mykey
102
+ python -m simpledht.cli get --host PUBLIC_IP --port 5000 mykey
101
103
  ```
102
104
 
103
105
  ### Cross-Network Example
104
106
 
105
107
  1. Start Node 1 (First network):
106
108
  ```bash
107
- simpledht start --host 0.0.0.0 --port 5000
109
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000
108
110
  ```
109
111
 
110
112
  2. Start Node 2 (Second network):
111
113
  ```bash
112
- simpledht start --host 0.0.0.0 --port 5000 --bootstrap "NODE1_PUBLIC_IP:5000"
114
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000 --bootstrap "NODE1_PUBLIC_IP:5000"
113
115
  ```
114
116
 
115
117
  3. Store and retrieve data:
116
118
  ```bash
117
119
  # Store on Node 1
118
- simpledht put --host NODE1_PUBLIC_IP --port 5000 test_key "test_value"
120
+ python -m simpledht.cli put --host NODE1_PUBLIC_IP --port 5000 test_key "test_value"
119
121
 
120
122
  # Retrieve from Node 2
121
- simpledht get --host NODE2_PUBLIC_IP --port 5000 test_key
123
+ python -m simpledht.cli get --host NODE2_PUBLIC_IP --port 5000 test_key
122
124
  ```
123
125
 
124
126
  ## Network Configuration
@@ -142,12 +144,13 @@ If your node is behind a NAT router:
142
144
  2. Set up port forwarding for UDP port 5000
143
145
  3. Forward to your node's local IP address
144
146
 
145
- ## New Features in Version 0.1.2
147
+ ## New Features in Version 0.1.3
146
148
 
147
149
  - **Improved Bootstrap Mechanism**: Added retry logic for more reliable connections across networks
148
150
  - **Data Synchronization**: Nodes automatically sync data when joining the network
149
151
  - **Enhanced Error Handling**: Better handling of network timeouts and connection issues
150
152
  - **Full Data Replication**: All nodes maintain a complete copy of the data for redundancy
153
+ - **Alternative Command Method**: Added support for running via `python -m simpledht.cli`
151
154
 
152
155
  ## Troubleshooting
153
156
 
@@ -176,6 +179,7 @@ If your node is behind a NAT router:
176
179
  - `Address already in use`: Port conflict
177
180
  - `Failed to get public IP`: Network connectivity issue
178
181
  - `Connection attempt X/3 timed out, retrying...`: Network latency or connectivity issues
182
+ - `simpledht: command not found`: The command-line tool is not in your PATH. Use the Python module directly: `python -m simpledht.cli`
179
183
 
180
184
  ## Architecture
181
185
 
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name="simpledht",
8
- version="0.1.3",
8
+ version="0.1.4",
9
9
  author="Dhruvkumar Patel",
10
10
  author_email="dhruv.ldrp9@gmail.com",
11
11
  description="A simple distributed hash table implementation",
@@ -20,7 +20,7 @@ Example usage:
20
20
  node.bootstrap('other_node_ip:5000')
21
21
  """
22
22
 
23
- __version__ = "0.1.3"
23
+ __version__ = "0.1.4"
24
24
 
25
25
  from .dht_node import DHTNode
26
26
  from .cli import main as cli_main
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: simpledht
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: A simple distributed hash table implementation
5
5
  Home-page: https://github.com/dhruvldrp9/simpledht
6
6
  Author: Dhruvkumar Patel
@@ -53,7 +53,7 @@ pip install simpledht
53
53
 
54
54
  1. Clone the repository:
55
55
  ```bash
56
- git clone <repository-url>
56
+ git clone https://github.com/dhruvldrp9/SimpleDHT
57
57
  cd SimpleDHT
58
58
  ```
59
59
 
@@ -103,48 +103,50 @@ See the `examples/` directory for more detailed usage examples:
103
103
  #### Starting a Node
104
104
 
105
105
  To start a new DHT node:
106
+
106
107
  ```bash
107
- simpledht start --host 0.0.0.0 --port 5000
108
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000
108
109
  ```
109
110
 
110
111
  To start a node and connect to existing nodes:
112
+
111
113
  ```bash
112
- simpledht start --host 0.0.0.0 --port 5001 --bootstrap "PUBLIC_IP:5000"
114
+ python -m simpledht.cli start --host 0.0.0.0 --port 5001 --bootstrap "PUBLIC_IP:5000"
113
115
  ```
114
116
 
115
117
  #### Storing Data
116
118
 
117
119
  To store a key-value pair:
120
+
118
121
  ```bash
119
- simpledht put --host PUBLIC_IP --port 5000 mykey "my value"
122
+ python -m simpledht.cli put --host PUBLIC_IP --port 5000 mykey "my value"
120
123
  ```
121
124
 
122
125
  #### Retrieving Data
123
126
 
124
- To retrieve a value:
125
127
  ```bash
126
- simpledht get --host PUBLIC_IP --port 5000 mykey
128
+ python -m simpledht.cli get --host PUBLIC_IP --port 5000 mykey
127
129
  ```
128
130
 
129
131
  ### Cross-Network Example
130
132
 
131
133
  1. Start Node 1 (First network):
132
134
  ```bash
133
- simpledht start --host 0.0.0.0 --port 5000
135
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000
134
136
  ```
135
137
 
136
138
  2. Start Node 2 (Second network):
137
139
  ```bash
138
- simpledht start --host 0.0.0.0 --port 5000 --bootstrap "NODE1_PUBLIC_IP:5000"
140
+ python -m simpledht.cli start --host 0.0.0.0 --port 5000 --bootstrap "NODE1_PUBLIC_IP:5000"
139
141
  ```
140
142
 
141
143
  3. Store and retrieve data:
142
144
  ```bash
143
145
  # Store on Node 1
144
- simpledht put --host NODE1_PUBLIC_IP --port 5000 test_key "test_value"
146
+ python -m simpledht.cli put --host NODE1_PUBLIC_IP --port 5000 test_key "test_value"
145
147
 
146
148
  # Retrieve from Node 2
147
- simpledht get --host NODE2_PUBLIC_IP --port 5000 test_key
149
+ python -m simpledht.cli get --host NODE2_PUBLIC_IP --port 5000 test_key
148
150
  ```
149
151
 
150
152
  ## Network Configuration
@@ -168,12 +170,13 @@ If your node is behind a NAT router:
168
170
  2. Set up port forwarding for UDP port 5000
169
171
  3. Forward to your node's local IP address
170
172
 
171
- ## New Features in Version 0.1.2
173
+ ## New Features in Version 0.1.3
172
174
 
173
175
  - **Improved Bootstrap Mechanism**: Added retry logic for more reliable connections across networks
174
176
  - **Data Synchronization**: Nodes automatically sync data when joining the network
175
177
  - **Enhanced Error Handling**: Better handling of network timeouts and connection issues
176
178
  - **Full Data Replication**: All nodes maintain a complete copy of the data for redundancy
179
+ - **Alternative Command Method**: Added support for running via `python -m simpledht.cli`
177
180
 
178
181
  ## Troubleshooting
179
182
 
@@ -202,6 +205,7 @@ If your node is behind a NAT router:
202
205
  - `Address already in use`: Port conflict
203
206
  - `Failed to get public IP`: Network connectivity issue
204
207
  - `Connection attempt X/3 timed out, retrying...`: Network latency or connectivity issues
208
+ - `simpledht: command not found`: The command-line tool is not in your PATH. Use the Python module directly: `python -m simpledht.cli`
205
209
 
206
210
  ## Architecture
207
211
 
File without changes
File without changes
File without changes
File without changes