https://github.com/dyarleniber/fastapi-boilerplate
Starter template for building high-performance RESTful APIs using FastAPI. It includes pre-configured settings and dependencies to help you kickstart your project development.
https://github.com/dyarleniber/fastapi-boilerplate
async fastapi poetry python python3 rest-api testing
Last synced: about 2 months ago
JSON representation
Starter template for building high-performance RESTful APIs using FastAPI. It includes pre-configured settings and dependencies to help you kickstart your project development.
- Host: GitHub
- URL: https://github.com/dyarleniber/fastapi-boilerplate
- Owner: dyarleniber
- License: mit
- Created: 2023-07-07T23:46:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-14T18:57:37.000Z (about 2 years ago)
- Last Synced: 2025-01-13T16:25:37.095Z (over 1 year ago)
- Topics: async, fastapi, poetry, python, python3, rest-api, testing
- Language: Python
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FastAPI Boilerplate
Starter template for building RESTful APIs using [FastAPI](https://fastapi.tiangolo.com/). It includes pre-configured settings and dependencies to help you kickstart your project development.
## Features
- [FastAPI](https://fastapi.tiangolo.com/) framework for building high-performance APIs.
- Testing with [pytest](https://docs.pytest.org/).
- Dependency management with [Poetry](https://python-poetry.org/).
- Code formatting with [Black](https://pypi.org/project/black/) and [isort](https://pycqa.github.io/isort/).
> **Note:** This project is still under development. More features will be added in the future.
## Getting Started
To clone and run this project, you'll need to have Git, Python 3, and Poetry installed on your computer.
From your command line:
- Clone this repository
```bash
git clone https://github.com/dyarleniber/fastapi-boilerplate.git
```
- Go into the repository folder
```bash
cd fastapi-boilerplate
```
- Install the project dependencies
```bash
poetry install
```
- Activate the virtual environment (in order to ensure that subsequent commands refer to the correct dependencies)
```bash
poetry shell
```
> To deactivate the virtual environment and exit the shell, run `exit`.
- Start the development server (in watch mode)
```bash
poetry run task dev
```
> The API will be available at `http://127.0.0.1:8000/` by default.
### Testing and Code Formatting
- Use the following command to run the tests:
```bash
poetry run task test
```
- Use the following command to format the code:
```bash
poetry run task lint
```
## Contributing
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
## License
This project is licensed under the terms of the MIT license.