Boilerplate code for Data Science project microservice in Python
Gunicorn & Falcon based server which is all you'll need to expose your awesome Data Science project as microservice with your peers.
There is a Docker file also added to dockerize you code which can then easily be put on Kubernetes or other container management service.
# 1. Setup by running `setup.sh` file
./setup.sh
# 2. Run Docker image
docker run -p 8000:8000 -t <docker_username>/dsms1:1.0.0
# 3. Run bash
docker run -it <docker_username>/dsms1:1.0.0 /bin/bash
# Create virtual environment (optional)
conda create -n dsms python=3
source activate dsms
# Install dependencies
pip install -r basepy/py/pip_requirements.txt
# Run the service
./run.sh
curl -X POST http://localhost:8000/
curl -X POST http://localhost:8000/update -d '{"text":"Some text to be sent."}'
curl -XGET http://localhost:8000/update?id=10