GithubHelp home page GithubHelp logo

mobius_server's Introduction

Mobius-server

Running the server:

  1. Setting up flask app in terminal:
    • In Windows: set FLASK_APP=server.py
    • In Linux: export FLASK_APP=server.py
  2. To run the server: flask run

Note: if run on an Azure instance for example the application will be killed when you close the ssh connection. Instead use tmux:

  1. Start a tmux session: tmux
  2. Do the steps from above here
  3. Exit the tmux window by pressing ctrl+b and then d (detach)
  4. To enter a running tmux session: tmux attach
  5. To close it: go into the session and write exit

Optional:

  • to run flask app in debug mode set FLASK_DEBUG=1 or export FLASK_DEBUG=1 before running the server.
  • if LOGFILE is specified in .env the logger will write to that file.
  • if UPLOAD_DIRECTORY in .env is not specified it will default to api_uploaded_files

Usage

  • List uploaded files (No authentication required): GET request to <server-ip>/files
  • Upload files: POST request to <server-ip>/files/<file-name-with-extension> with allowed API-key in header (file may be renamed due to secure_filename()-function from flask) and file as attachment
  • Download files: GET request to <server-ip>/files/<file-name-with-extension> with allowed API-key in header

About

Uploading and downloading is only possible when the user gives an API-key that is also in the .env-file of the server in the ALLOWED_KEYS-variable.


Requirements
  • flask
  • dotenv

mobius_server's People

Contributors

hansbambel avatar

Watchers

 avatar  avatar

mobius_server's Issues

Some thing about the csv converter

Hey @dimstudio,
some things I noticed in the converter:
x = x[len(x) - 1].replace('.zip', '').replace('T', '-')
--> x = x[-1].replace('.zip', '')
Here you remove the "T" from the timestamp, right? But if the user ID also contains a "T" this would also replace that one. Instead I would not replace it and instead parse the T here:
session_datetime = datetime.strptime(recordingID, "%Y-%m-%d'T'%H:%M:%S.%f")

Apart from that, really cool!

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.