Skip to main content

No project description provided

Project description

fibonacci-api

The FastAPI app implements a minimal Fibonacci sequence calculator. The purpose of the repo is to show-case:

  • building with hatch/uv
  • property based testing

PyPI - Version PyPI - Python Version


Table of Contents

Fibonacci-api

  • get the n-th number in Fibonacci sequence
  • get the [1,Nth] range of numbers in Fibonacci sequence (default pagination: 100)
  • add/remove sequence numbers to a exclude-list, these numbers will be redacted from the responses. The list is stored in-memory application state.

Running the application

The following command launches the API on localhost:8000

$ hatch run dev 

API Documentation: http://localhost:8000/docs#/

Run tests:

$ hatch test 

Run in container:

$ podman compose up 

Deployment

Scaling

  • Using an orchestration tool e.g.: Kubernetes, make sure the application starts with a single uvicorn process. Ref
  • Using a single container, use gunicorn

License

fibonacci-api is distributed under the terms of the MIT license.

Contributing

testing

packaging

  • hatch (+uv) is used for packaging and dependency management

Code quality

  • type checking is set to strict
  • basedpyright and ruff are used for linting
  • mypy is used for static type checking
  • ruff is used for formatting

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fibonacci_api-0.0.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fibonacci_api-0.0.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file fibonacci_api-0.0.1.tar.gz.

File metadata

  • Download URL: fibonacci_api-0.0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fibonacci_api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dc1c874b869b94209478576b00b92fd7d6bf49fd787c7fd6e9241539eb2d9d6a
MD5 f548260d8008d65071d127102db0e72a
BLAKE2b-256 74a4906d5aa9284398d0a0307100ac01ef6d7a1d3f2f8c2fb123abb335abf6c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for fibonacci_api-0.0.1.tar.gz:

Publisher: cd.yaml on timonviola/hatch-fast-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fibonacci_api-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: fibonacci_api-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fibonacci_api-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad6a34117e72eed42449bec221ae9b42d42f8dc9c25f4ba84647ae9e39b863b9
MD5 4f40e5bb20e7465bbab0eb841adea3ae
BLAKE2b-256 a3b2b34805cfe0d44f18b8d9ecc60c0b1b4f44ed5cfdc6ea121b738ebb838f6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fibonacci_api-0.0.1-py3-none-any.whl:

Publisher: cd.yaml on timonviola/hatch-fast-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page