Giter Club home page Giter Club logo

fibonacci-api's Introduction

Fibonacci API

Fibonacci API will implement and deploy an API that calculates the n-th Fibonacci number for a given input number n.

๐Ÿ“– Documentation is available at Docs

Start the server on your localhost by building a docker image and run it on port 81:

cd fibonacci_api_peoject
docker build -t fibonacci_api .
docker run -p 81:8081 fibonacci_api

You can now find the n-th fibonacci number by sending a request to the server:

curl http://0.0.0.0:81/?n=7

OR

curl http://0.0.0.0:81/recursive/?n=7

Installation

Install project from source in a fresh virtual environment by running:

cd fibonacci_api_peoject
pip install -r requirements.txt
uvicorn src.fibonacci_api.main:app --host 0.0.0.0 --port 81 --reload

API Endpoints

[GET /] This endpoint uses the iterative algorithm to find the n-th number of the series.

[GET /recursive] This endpoint uses the recursive algorithm to find the n-th number of the series.

Contribute

To set up your local development environment, please use a fresh virtual environment, then run

pip install -r requirements-dev.txt

We use pytest as test framework. To execute the tests, please run

pytest

Access API docs from

0.0.0.0:81/docs

Before contributing code, please set up the pre-commit hooks to reduce errors and ensure consistency

pre-commit run -a
  • Issue Tracker: github.com/fatemetardasti96/fibonacci-api/issues
  • Source Code: github.com/fatemetardasti96/fibonacci-api

Support

If you are having issues, please let us know. We have a mailing list located at: [email protected]

License

The project is licensed under the BSD license.

fibonacci-api's People

Contributors

fatemetardasti96 avatar

Watchers

 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.