Skip to content

wu3ty/facehugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple RESTful API using Python Flask

This repository contains a minimum RESTful API using Python and Flask. It exposes the endpoint http://HOST:5000/hello. This repository uses a Github Flow branching strategy and Github Actions to run pylint to lint the code and pytest to execute unit tests.

Upon successfull merge into main, a Docker container is built and pushed to Githubs container registry Github Packages.

Finally, the app is deployed to a Kubernetes cluster.

Local API setup

Running the API locally requires Python 3.9, install that first. Then:

python3 -m venv test-api # create virtual environment
source test-api/bin/activate # activate virtual environment
pip3 install -r requirements.txt # install python packages

python3 app/main.py # start API

Now, you can access http://127.0.0.1:5000/hello.

Local Docker execution

Building and running Docker containers requires Docker to be installed. Then:

docker build -t meine-api . # build Docker container
docker run -it -p 5000:5000 meine-api # run Docker container

Now, you can access http://127.0.0.1:5000/hello.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages