pygate / pygate-webapp

A Filecoin Flask reference implementation for Pygate 0.1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyPI version

WARNING: USES DEPRECATED RELEASE

This webapp was created as a reference implementation for the very first few releases of the Pygate gRPC client as part of the HackFS competition. Please note, that there have been significant backward incompatible changes made to Powergate and therefore Pygate since then.

The Pygate gRPC client is actively maintained though, including compatibility with the latest Powergate releases. It includes developer quickstart examples in its repository.

pygate-webapp

A Filecoin Flask reference application for Python developers using Textile.io's Powergate and the Pygate gRPC client.

screencap

Features

  • Upload a file or multiple files from your local machine to the Filecoin network.
  • Download them from Filecoin back to your local machine.
  • Check Wallet balances.
  • Change Filecoin Filesystem (FFS) configuration settings and push them to files in storage.
  • Review logs of your activities in the Pygate webapp.

Quick installation

  • pip install pygate-webapp
  • check that the app installed properly:
    pygate-webapp --version
  • This is a development release of the pygate-webapp. It is designed to work with a Dockerized Localnet Powergate. It is assumed this is running concurrently at the 127.0.0.1:5002 address.
  • Start the app:
    pygate-webapp
  • Visit localhost:5000 in your browser to use the app.
  • See pygate-webapp -h for setting options.
  • You can change the Powergate server address (e.g. to a different Docker host address or an online hosted instance of Powergate that is connected to Testnet or Mainnet). Use by the -p flag on startup:
    pygate-webapp -p 123.123.123.123:5002

Developer installation

  • Clone files and cd to directory:
    git clone https://github.com/pygate/pygate-webapp && cd pygate-webapp
  • Set up virtualenv:
    virtualenv venv
  • Activate virtualenv:
    source venv/bin/activate
  • Install requirements:
    pip install -r requirements.txt
  • Create the application database:
    python create_db.py
  • pygate-webapp is built using the Python Flask framework. To start the built-in development server:
    python run.py
  • Go to localhost:5000 in your browser to use the app.
  • This is a development release of the pygate-webapp. It is designed to work with a Dockerized Localnet Powergate. It is assumed this is running at the 127.0.0.1:5002 address. You can change the POWERGATE_ADDRESS in the config.py file.
  • Help us improve this reference implementation. If you want to fix bugs, add new features, or improve existing ones, create a dev/[feature-name] branch and submit a Pull Request from it. Thanks!

About

A Filecoin Flask reference implementation for Pygate 0.1

License:MIT License


Languages

Language:Python 60.9%Language:HTML 37.6%Language:CSS 1.5%