No description
Find a file
2023-07-19 20:46:20 +02:00
.drone.yml first try 2023-07-19 20:46:20 +02:00
app.sh first try 2023-07-19 20:46:20 +02:00
docker-compose.yml first try 2023-07-19 20:46:20 +02:00
Dockerfile first try 2023-07-19 20:46:20 +02:00
README.md first try 2023-07-19 20:46:20 +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
      ENABLE_WEBSERVER: true # if enabled a list of files can be viewed in a webbrowser (see screenshot)

volumes:
  uploads:

ENABLE_WEBSERVER Screenshot

API-Endpoints

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