Giter Site home page Giter Site logo

util_swarmsync's Introduction

Swarmsync

Swarmsync is a Python script that provides a set of tools for managing files on the Ethereum Swarm network. It allows you to upload, download, check the status of uploaded files, and more. You can also create and manage tags for your uploaded files.

Features

  • Upload files to Ethereum Swarm network
  • Download files from Ethereum Swarm network
  • Check the status of uploaded files using stewardship
  • Create and manage tags for uploaded files
  • Encrypt and pin files during upload
  • Monitor and send Prometheus statistics

Getting Started

Prerequisites

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/swarmsync.git
    cd swarmsync
  2. Install the required Python packages:

    pip install -r requirements.txt

Usage

Show

You can use the show command to display information about the files you have uploaded and their status.

python swarmsync.py show [options]

Options:

  • -s, --saved-tag: Check the existing/stored tag UID.
  • -t, --tag: Enter a tag UID to fetch information about a specific tag.

Download

To download files from the Ethereum Swarm network, use the download command. You can specify the number of concurrent tasks and the Bee node URL.

python swarmsync.py download [options]

Options:

  • -c, --count: Number of concurrent tasks for downloading.
  • -u, --beeurl: Bee node URL(s) (comma-separated) to connect to.

Check

Use the check command to check if files are retrievable using stewardship or to check the status of a specific tag.

python swarmsync.py check [options]

Options:

  • -c, --count: Number of concurrent tasks for checking.
  • -u, --beeurl: Bee node URL to connect to.

Upload

The upload command allows you to upload files and folders to the Ethereum Swarm network. You can specify the path to the folder, whether to encrypt the data, and more.

python swarmsync.py upload [options]

Options:

  • -p, --path: Path to the folder to be uploaded.
  • -s, --search: Search parameter (e.g., *, *.jpg, somename.txt).
  • -P, --pin: Should files be pinned during upload.
  • -t, --tag: Specify a UID tag for the upload.
  • --no-tag: Disable tagging for the upload.
  • -a, --address: Enter an Ethereum address or hexadecimal string (64 characters).
  • -E, --encrypt: Encrypt data during upload.
  • -r, --reupload: Reupload items that are not retrievable.
  • -d, --deferred: Sets Swarm deferred upload header to False.

Mantaray

The mantaray command allows you to manage a Mantaray index, which is a way to organize and access your files on the Swarm network.

python swarmsync.py mantaray [options]

Options:

  • -c, --count: Number of concurrent tasks for uploading the Mantaray index.
  • -u, --beeurl: Bee node URL(s) (comma-separated) to connect to.

Examples

  • To upload a folder with files and subfolders:

    python swarmsync.py upload -p /path/to/folder
  • To download files from the Ethereum Swarm network:

    python swarmsync.py download -c 5 -u http://yourbeeurl:1633
  • To check the status of uploaded files:

    python swarmsync.py check -c 10 -u http://yourbeeurl:1633
  • To display information about uploaded files and their status:

    python swarmsync.py show responses
  • To create and manage a Mantaray index:

    python swarmsync.py mantaray -u http://yourbeeurl:1633

Additional Options

Swarmsync allows you to configure additional options by modifying the script. These options include the Prometheus statistics endpoint, xBee header usage, and more. Please refer to the script's source code for these advanced configurations.

License

This project is licensed under the MIT License - see the LICENSE file for details.

util_swarmsync's People

Contributors

crtahlin avatar darkobas avatar darkobas2 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.