https://github.com/neoteroi/blacksheep-api
Project template to start Web APIs with BlackSheep
https://github.com/neoteroi/blacksheep-api
api blacksheep project-template webapp
Last synced: 7 months ago
JSON representation
Project template to start Web APIs with BlackSheep
- Host: GitHub
- URL: https://github.com/neoteroi/blacksheep-api
- Owner: Neoteroi
- License: mit
- Created: 2019-10-04T19:49:33.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-05-11T07:40:36.000Z (9 months ago)
- Last Synced: 2025-06-09T22:44:48.594Z (8 months ago)
- Topics: api, blacksheep, project-template, webapp
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# BlackSheep-API Cookiecutter template
[Cookiecutter](https://github.com/cookiecutter/cookiecutter) template to
boostrap a new BlackSheep v2 application to build a Web API.
## Getting started
```bash
pip install blacksheep-cli
```
```bash
blacksheep create --template api
๐ Project name example
๐ค Use controllers? Yes
๐ Use OpenAPI Documentation? Yes
๐ง Library to read settings essentials-configuration
๐ฉ App settings format (Use arrow keys)
ยป YAML
TOML
JSON
INI
```
## Documentation
The documentation of the [framework can be read here](https://www.neoteroi.dev/blacksheep/).
## Features
- Basic folder structure
- Settings handled using [Pydantic Settings Management](https://docs.pydantic.dev/latest/usage/settings/) or [essentials-configuration](https://github.com/Neoteroi/essentials-configuration)
- Strategy to read configuration from YAML, TOML, JSON, INI files, and
environmental variables, or settings stored in a user's folder when using
[`essentials-configuration`](https://github.com/Neoteroi/essentials-configuration)
- Handling of [dependency injection](https://www.neoteroi.dev/blacksheep/dependency-injection/), using [`rodi`](https://github.com/RobertoPrevato/rodi)
- Configuration of exceptions handlers
- Strategy to handle [authentication](https://www.neoteroi.dev/blacksheep/authentication/) and [authorization](https://www.neoteroi.dev/blacksheep/authorization/), using [`guardpost`](https://github.com/RobertoPrevato/GuardPost)
## For more information on rodi
For more information and documentation about `rodi`, see:
- [dependency injection in BlackSheep](https://www.neoteroi.dev/blacksheep/dependency-injection/)
- [rodi](https://github.com/RobertoPrevato/rodi)
## Using Cookiecutter
The template can also be used with `Cookiecutter`.
```bash
pip install cookiecutter
cookiecutter https://github.com/Neoteroi/BlackSheep-API
```
## Docker image
The project template includes a `Dockerfile`.
To test using the image from Docker Hub:
```bash
docker run --name apidemo --rm -p 8080:80 robertoprevato/apidemo
```
And navigate to:
```bash
http://localhost:8080/docs/
```