Skip to main content

a simple application to share data via http with python flask backend and react frontend

Project description

teilen

A simple application to share data via http with python flask backend and react frontend.

Share the contents of a local directory with a single command over the network.

It features

  • a lightweight and responsive interface,
  • downloads for entire directories as ZIP-files, and
  • a simple authentication-system.

See the demo-gallery for some impressions.

Install

teilen can be installed using pip by entering

pip install teilen

It is recommended to use a virtual environment

python3 -m venv venv
source venv/bin/activate

Run

After installing, run the teilen-application with

teilen <path/to/directory>

By default, the web-UI is available at http://localhost:27183. If you are done, stop by hitting Ctrl+C.

Command line options

  • the last argument to the cli is interpreted as the path to the directory that should be shared, e.g.,

    teilen <path/to/directory>
    

    omit to share the current working directory

  • -p, --password: (optionally) set a password that is required to access the share

    The authentication method is implement via a custom request-header X-Teilen-Auth that, if the option is set, is required for any content-related endpoints of the teilen-API.

  • --port: (optionally) changes the port that the application is running on (default is 27183)

Update

Run

pip install teilen --upgrade

to get the latest version.

Environment configuration

The following environment variables can be set to configure teilen:

  • WORKING_DIR [DEFAULT <cwd>] path to the shared directory (see also the argument to the cli)
  • PASSWORD [DEFAULT null] optional password to access the share (see also the cli-option -p, --password)
  • PORT [DEFAULT 27183] teilen port (see also the cli-option --port)
  • SECRET_KEY [DEFAULT <random uuid>] secret key

Running in dev-mode

The development setup requires both python3 and the node package manager npm to be installed. Contrary to the pure python production server, back- and frontend are run separately in the development context.

To run the backend server, enter

cd backend
python3 -m venv venv
source venv/bin/activate
pip install .
pip install -r dev-requirements.txt
MODE=dev flask run

Based on pre-defined scripts, the frontend development server can be started with

cd frontend
npm install
npm start

The client can then be accessed via the node-development server at http://localhost:3000.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teilen-0.1.0.tar.gz (82.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

teilen-0.1.0-py3-none-any.whl (83.1 kB view details)

Uploaded Python 3

File details

Details for the file teilen-0.1.0.tar.gz.

File metadata

  • Download URL: teilen-0.1.0.tar.gz
  • Upload date:
  • Size: 82.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for teilen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8ac20feeb6746faea34e51d74c01ef359958fc8b35a71f49bcc5183689dd99e8
MD5 b03e2a9cd48328dbfd95263977d2b2e7
BLAKE2b-256 bc89b9f31465a60cb5e067397830e7ddcc5879f34bf62f9557425fd19a4f90b1

See more details on using hashes here.

File details

Details for the file teilen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: teilen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 83.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for teilen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2505e299e87ad3ef47db6cf9ceb424a8b628c37c4f36a97258b18fcc6f1f275
MD5 b0531519d2882cc6115979f7cf6d358a
BLAKE2b-256 ba4cf77ef7b0c8dd7c3f1a5ca4a0f4f38286add2c92afa4364abc229e06c7ca5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page