Lazy router implementation for FastAPI
Project description
fastapi-lazyrouter
Not implemented yet
Lazy router implementation for FastAPI.
- code to share between several applications
- domain specific library
- compliant with different python version
- ...
Getting started
-
clone this repository
-
remove .git directory
-
create a new git repository and push it on github
The latest version
You can find the latest version to ...
git clone https://github.com/FabienArcellier/fastapi-lazyrouter.git
Usage
You can run the application with the following command
from fastapi_lazyrouter import hello_world
hello_world()
Publish the library on pypi
The publication use a tag-based workflow to run the publication on github action. First, a developper tag a commit using alfred publish, then github action publish the library on pypi.
The alfred publish take the version number from pyproject.toml. The command will raise an error if the current branch is not master, if changes are in progress, or if the tag already exists, if the branch is not synchronized with remote branch
alfred publish
Run in docker container
You can run this template with docker. The manufactured image can be distributed and used to deploy your application to a production environment.
docker-compose build
docker-compose run app
Run in gitpod
gitpod can be used as an IDE. You can load the code inside to try the code.
Developper guideline
Add a dependency
bash poetry add requests
Install development environment
Use make to instanciate a python virtual environment in ./venv and install the python dependencies.
poetry install
Update release dependencies
Use make to instanciate a python virtual environment in ./venv and freeze dependencies version
poetry update update
Activate the python environment
When you setup the requirements, a venv directory on python 3 is created.
To activate the venv, you have to execute :
poetry shell
Run the continuous integration process
Before commit or send a pull request, you have to execute pylint to check the syntax
of your code and run the unit tests to validate the behavior.
$ poetry run alfred ci
Rebuild the blueprint from scratch
I have to regularly rebuild it to update dependencies and refresh the skeleton documentation.
Contributors
- Fabien Arcellier
License
MIT License
Copyright (c) 2018-2023 Fabien Arcellier
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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 fastapi_lazyrouter-0.1.0rc1.tar.gz.
File metadata
- Download URL: fastapi_lazyrouter-0.1.0rc1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.0 CPython/3.12.13 Linux/6.17.0-1010-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45ee996fb49049122e324b18b12c974d2792b3423bed6f914ae57f38b14f6774
|
|
| MD5 |
cf814c9bd268abfc66b8c3ae9514abd5
|
|
| BLAKE2b-256 |
7f37b8d496360db9823c97d91f53ac5e32903fa0aad3ff541d6ab7c44b5f53b7
|
File details
Details for the file fastapi_lazyrouter-0.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: fastapi_lazyrouter-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.0 CPython/3.12.13 Linux/6.17.0-1010-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5fe2b748e95ff1ecacf9e846e54b0b627129ad95bd80cacc3b881b6a2b2d5dd
|
|
| MD5 |
b8290ea6ebe6e986b92cfa1c645c110c
|
|
| BLAKE2b-256 |
7b94f763fba7b454b15613a3a019dbcb0c78a28d7fbaa7aea52298150a0109a5
|