distributed file system based on kademlia dht
Project description
Distributed file system based on https://github.com/bmuller/kademlia for the final project of distributed systems
Documentation
https://geekslabtech.github.io/kade-drive/
Basic Usage
- Clone the repo and run
poetry install
- Run
poetry run server
in one pc or several pc in a local network - Run
poetry run cli
in any pc of the network and start playing with the system
Usage with docker
- Build the image with
make docker
or pull it from docker.hubdocker pull joramas/kade-drive:latest
- Run
make shell
to start the Docker container with an interactive Bash shell - Now you can run
poetry run server
to start a server orpoetry run cli
Installation
pip install kade-drive
Server
from kade_drive.server import start_server
start_server()
Client
Note: Make sure that there exist at least a server in the local network
from kade_drive.cli import ClientSession
client = ClientSession()
client.connect()
response, _ = client.put(4, 5)
# If true, it means that the value was setted correctly, false otherwise
assert response is True
value, _ = client.get(4)
assert value == 5
Tests
To run tests make shure that there is at least one server in the network.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kade_drive-0.9.0.tar.gz
(30.8 kB
view details)
Built Distribution
File details
Details for the file kade_drive-0.9.0.tar.gz
.
File metadata
- Download URL: kade_drive-0.9.0.tar.gz
- Upload date:
- Size: 30.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.3 Linux/6.2.15-300.fc38.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b8090e2a899ce7d9dba961a2225df7341f85127fe6d347e7d0d8404635fa684 |
|
MD5 | 1c061b87e3ff03947d1394e1a8da3746 |
|
BLAKE2b-256 | db40fee6fbfbce91ec106ae5836c8538f2ee670d4be27568c2c72adfc3fc341b |
File details
Details for the file kade_drive-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: kade_drive-0.9.0-py3-none-any.whl
- Upload date:
- Size: 36.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.11.3 Linux/6.2.15-300.fc38.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f11bbe061613ef445e7c1152b5f48d4d97da6fdfa2561fb63f3cd74cf7a25f7d |
|
MD5 | 4342fc7c8eae5fa479ebdfbda105c1d7 |
|
BLAKE2b-256 | 10b86caa1600ca3630a2b5ec51bc6e78ef99b35389b0d68f35d6ea66655f6853 |