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.
python-api-server/README.md
Michael Grote 49b3121b01
All checks were successful
lint, build and push / lint (push) Successful in 4s
lint, build and push / build (push) Successful in 26s
switch to gitea-actions
2024-09-02 21:26:37 +02:00

43 lines
1 KiB
Markdown

# 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
```yaml
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
![](./assets/screenshot_webui.png)
## API-Endpoints
- see [Flasgger](https://github.com/flasgger/flasgger): ``http://<host>:5040/apidocs/``