No description
This repository has been archived on 2024-11-06. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
mg 47ab99f891 add web-ui (#2)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/python-api-server#2
2023-04-26 19:51:53 +02:00
templates add web-ui (#2) 2023-04-26 19:51:53 +02:00
.drone.yml revert ed793f95f6 2023-04-25 21:15:38 +02:00
app.py add web-ui (#2) 2023-04-26 19:51:53 +02:00
Dockerfile add web-ui (#2) 2023-04-26 19:51:53 +02:00
gunicorn_config.py test logging 2023-04-13 15:18:23 +02:00
README.md add swagger (#1) 2023-04-25 20:52:45 +02:00
requirements.txt add swagger (#1) 2023-04-25 20:52:45 +02:00
tests.sh add docs + test 2023-04-14 12:20:04 +02:00

python-api-server

a small flask-application for storing and downloading stuff like small binaries

Variables

  • MAX_CONTENT_LENGTH: maximal Filesize in MB; defaults to 5MB
  • UPLOAD_DIRECTORY: where to store the uploaded files; should be mapped to a volume; defaults to "/uploads"
  • AUTH_TOKEN: token used for authenticating

Example Docker-Compose

version: '3'
services:
  python-api-server:
    container_name: httpd-api
    image: quotengrote/python-api-server:v2
    ports:
      - "5040:5000"
    volumes:
      - uploads:/uploads
    environment:
      # FLASK_DEBUG: 1 # for debugging
      # FLASK_APP: app # for debugging
      MAX_CONTENT_LENGTH: 10
      UPLOAD_DIRECTORY: /uploads
      AUTH_TOKEN: myuploadtoken

volumes:
  uploads:

API-Endpoints

  • see Flasgger: http://<host>:5040/apidocs/