To use this sceleton, just
- fork this repo
- clone this repo
- remove the parts not needed
- docker is installed
- Build the container locally:
docker build -t my-flask-app .
- Run the container locally:
docker run -it --rm -p 80:80 --name my-flask-app -v $(pwd)/app:/app my-flask-app
- Access the app via your browser: http://localhost
pytest
is ran from within the /app
directory inside the container on build. The container build will not be successful if a test fails.
For the test to be successful the build has to happen within Daimler's internal network and with the certificate in the /app
directory.
The following screenshot helps to configure testing in pycharm:
Sample API request: GET /api/<string:variable>
This an endpoint of the api.
Endpoint: GET /api/<string:variable>
Return constraints:
{
"name": String,
"data": {
"age": Int,
"height": String
}
}
Return example:
{
"name": "jonnylangefeld",
"data": {
"age": 27,
"height": "6 ft 5.5"
}