leomaurodesenv / data-science-api-framework

A simple framework to test and deploy your Data Science API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data Science API Framework

MIT license GitHub Codacy Badge Build Status

This repository is the basis for a fast, efficient and scalable python API structure for data scientists.
This framework presents a continuous integration test using Travis CI, a Docker image to deploy your data science project, and, finally, a simple API Restful implementation to allow security access for everyone; facilitating the documentation, test, development, and deployment for production.

Combing all these things, this framework provides an potential DataOps procedure for your project. "DataOps is an automated, process-oriented methodology, used by analytic and data teams, to improve the quality and reduce the cycle time of data analytics ... DataOps focuses on continuous delivery by leveraging on-demand IT resources and by automating test and deployment". Wikipedia.

Idea


Start Coding

Installation

Important links: DockerHub, Documentation.

Each Operating System (OS) have its own steps.
Note: Docker CE (Community Edition), Docker EE (Enterprise Edition).

Running

Download or clone this repository, and run

## Install requirements
$ pip install --no-cache-dir -r ./requirements.txt

## Running local - with Python
$ uvicorn app.main:API --port 5050

## Running local - with Docker
$ docker build -t ds-api .
$ docker run -it --rm --name api-container -p 5050:8080 ds-api

## Open browser
# http://127.0.0.1:8080/

## Open browser - Swagger documentation
# http://127.0.0.1:8080/docs

Done! You can access your API in http://localhost:5050/.

Coding your API

Create your endpoint logic (API), such as app/routers/hello_world.py.
Add the new endpoint to app/main.py; that is it, just run.


Deep personalization

Useful personalizations:


Also look ~

About

A simple framework to test and deploy your Data Science API

License:MIT License


Languages

Language:Python 87.3%Language:Dockerfile 12.7%