Skip to content

BlackSheep is an asynchronous web framework to build event based web applications with Python.

Black Sheep

pip install blacksheep

BlackSheep offers...

  • A rich code API, based on dependency injection and inspired by Flask and ASP.NET Core
  • A typing-friendly codebase, which enables a comfortable development experience thanks to hints when coding with IDEs
  • Built-in generation of OpenAPI Documentation, supporting version 3, YAML, and JSON
  • A cross platform framework, using the most modern versions of Python
  • Good performance

Getting started

To get started with BlackSheep, read these tutorials:


The following timeline describe the current vision on the project, describing features that are under development or taken into consideration.

The work on V2 starts


The work on the second version of the web framework starts. The documentation site is modified to host the documentation for v1 and the current actively developed version of the system.

SSR Refactoring

The integration with Jinja2 is modified to support different libraries to achieve server side rendering (SSR). Jinja2 becomes an optional dependency, and handling of view and view_async is improved considerably.

Library Simplification

The HTTP Client will be removed, and the library will be simplified. At the beginning, blacksheep implemented both an HTTP server and and HTTP client. The classes used to handle web requests are bidirectional: the Request and Response classes are the same both for incoming requests and outgoing web requests and responses. Even though this is arguably a good principle, it constitutes a great complication for the code. Version 2.x of the framework drops the HTTP Client and removes the complexity to support bidirectional flows.

Configuration Strategy

The framework will provide a strategy to handle application settings.

DI Refactoring

Under consideration: the integration with rodi might be modified to support different libraries to achieve dependency injection (DI). rodi might become an optional dependency.

Name Change

Under consideration: the web framework might be renamed, to have a more abstract name and to adopt a more consistent naming convention across the libraries.

Application Builder

Under consideration: the Builder pattern might be adopted to simplify the Application class. In such scenario, an ApplicationBuilder class would be used to configure the application, and an instance of the application would be obtained through it.

Last modified on: 2022-11-20 10:54:13