updated environment

This commit is contained in:
Daniel Schick 2023-03-12 11:56:24 +01:00
parent 29419540de
commit d130dc08b0
4 changed files with 40 additions and 3 deletions

25
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,25 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "BreCal",
"FLASK_DEBUG": "1"
},
"args": [
"run",
"--no-debugger",
"--no-reload"
],
"jinja": true,
"justMyCode": true
}
]
}

View File

@ -6,4 +6,8 @@ Projekt zur verbesserten Kommunikation der maritimen Partner bei Schiffsanläufe
## Requirements
## Development
Zum Debuggen der Flask App verwende ich dieses Tutorial:
https://code.visualstudio.com/docs/python/tutorial-flask#_create-a-project-environment-for-the-flask-tutorial

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -2,11 +2,19 @@
## OpenAPI 3.0 Generated Flask project
The code was originally created by exporting the API from Postman. Selecting the API on the left (root element) the code generation icon becomes visible on the right.
![image](../../docs/export_flask_project.png)
If the API gets updated I think it makes most sense to export again into a API helper branch and then merge this branch back into the project. Please do not forget to update the [index.yaml](../../misc/index.yaml) file.
The branch is named yaml_export.
All the routes are defined in 'project/api' folder.
Each route parses the request and calls the corresponding function in the 'project/impl' directory passing all the parameters and request body as function arguments.
To run this project:
```
```bash
pip install -r requirements.txt
export FLASK_APP='BreCal'
export FLASK_ENV=development