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
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
uvicornprocess. Ref - Using a single container, use
gunicorn
License
fibonacci-api is distributed under the terms of the MIT license.
Contributing
testing
- unit tests
- integration/e2e tests
- simulations tests and fuzzing (e.g: https://github.com/KissPeter/APIFuzzer, https://testdriven.io/blog/fastapi-hypothesis/)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc1c874b869b94209478576b00b92fd7d6bf49fd787c7fd6e9241539eb2d9d6a
|
|
| MD5 |
f548260d8008d65071d127102db0e72a
|
|
| BLAKE2b-256 |
74a4906d5aa9284398d0a0307100ac01ef6d7a1d3f2f8c2fb123abb335abf6c5
|
Provenance
The following attestation bundles were made for fibonacci_api-0.0.1.tar.gz:
Publisher:
cd.yaml on timonviola/hatch-fast-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fibonacci_api-0.0.1.tar.gz -
Subject digest:
dc1c874b869b94209478576b00b92fd7d6bf49fd787c7fd6e9241539eb2d9d6a - Sigstore transparency entry: 203342621
- Sigstore integration time:
-
Permalink:
timonviola/hatch-fast-api@9dcfc4eb71bb0947c35b7976268aa6a07137b9f5 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/timonviola
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@9dcfc4eb71bb0947c35b7976268aa6a07137b9f5 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad6a34117e72eed42449bec221ae9b42d42f8dc9c25f4ba84647ae9e39b863b9
|
|
| MD5 |
4f40e5bb20e7465bbab0eb841adea3ae
|
|
| BLAKE2b-256 |
a3b2b34805cfe0d44f18b8d9ecc60c0b1b4f44ed5cfdc6ea121b738ebb838f6a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fibonacci_api-0.0.1-py3-none-any.whl -
Subject digest:
ad6a34117e72eed42449bec221ae9b42d42f8dc9c25f4ba84647ae9e39b863b9 - Sigstore transparency entry: 203342623
- Sigstore integration time:
-
Permalink:
timonviola/hatch-fast-api@9dcfc4eb71bb0947c35b7976268aa6a07137b9f5 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/timonviola
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@9dcfc4eb71bb0947c35b7976268aa6a07137b9f5 -
Trigger Event:
push
-
Statement type: