Skip to content

Boilerplate code for Data Science project microservice in Python

License

Notifications You must be signed in to change notification settings

ankitksharma/datascience-microservice

Repository files navigation

Data Science Micro-Service (DSMS)

Gunicorn + Falcon + Python

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.

Setup

Install using Docker

# 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

Install from scratch

# 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

Usage

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

About

Boilerplate code for Data Science project microservice in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published