Giter Club home page Giter Club logo

fibonacci's Introduction

Fibonacci API

Example project to implement a Fibonacci API microservice.

Getting Started

Simple instructions to get set up in development environment are provided here

Deployment

The API is Docker-capable. Full instructions for getting started are here

Documentation

Documentation root for the project is provided here

To build the docs into html:

$ cd fibonacci_api/docs
$ make html

Documentation appears in $DEV_HOME/fibonacci_api/static/index.html

Testing

Run the tests with nosetests

$ cd $DEV_HOME/fibonacci_api
$ nosetests --with-coverage --cover-html --cover-package=fibonacci_api --cover-erase
.....

Name                         Stmts   Miss  Cover   Missing
----------------------------------------------------------
fibonacci_api.py                 0      0   100%   
fibonacci_api/common.py         16      2    88%   37-38
fibonacci_api/fibonacci.py      13      0   100%   
fibonacci_api/main.py           31      4    87%   23, 53-54, 75
----------------------------------------------------------
TOTAL                           60      6    90%   
----------------------------------------------------------------------
Ran 5 tests in 0.027s

Quick Start for the impatient

$ git clone https://github.com/anonymoose/fibonacci.git
$ cd fibonacci/fibonacci_api
$ virtualenv --no-site-packages python
$ source python/bin/activate               # ensure you are using the correct virtualenv python
$ pip install -r requirements.txt
$ python main.py

Use curl to interact with the API.

$ curl http://localhost:5000/fibonacci/list?count=10
{
  "answer": [
    0,
    1,
    1,
    2,
    3,
    5,
    8,
    13,
    21,
    34
  ]
}

Technology Stack / Dependencies

  • Python 2.7 - All components are build in Python
  • Nginx - HTTP Proxy to sitting in front of the Python Service
  • Flask - Web application framework suitable for creating microservices in Python.
  • Gunicorn - Pre-fork application server to efficiently serve the Flask application in production.
  • Docker - Container technology to create simple and consistent deployments.
  • Nose - Unit testing framework.
  • Sphinx - Documentation generator

fibonacci's People

Contributors

anonymoose avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.