Home

Awesome

BlackSheep-Examples

Various examples for BlackSheep.

ExampleDescription
./testing-api/Shows how to test a BlackSheep API using pytest and the provided TestClient (see also testing).
./piccolo-admin/Shows how to use the mount feature to use Piccolo Admin in BlackSheep.
./jwt-validationShows how to configure a BlackSheep API that uses JWTs to implement authentication and authorization for users.
./oidcShows how to configure a BlackSheep app to use OpenID Connect and integrate with: Azure Active Directory, Auth0, Google, or Okta.
./aad-machine-to-machineShows how to configure an API that requires access tokens issued by Azure Active Directory, and how to obtain access tokens using MSAL for Python for a confidential client (machine to machine communication).
./oauth2-password-providerShows an implementation of OAuth2 Server with password authentication.
./websocket-chatShows how to use WebSocket with BlackSheep, the example consists of a simple chat application built using WebSocket and VueJS.
./proxy-1Shows how to create a proxy server with BlackSheep, to proxy all requests to a back-end, and return responses from that back-end. (Proxying to a Flask back-end).
./proxy-2Shows how to create a proxy server with BlackSheep, to proxy all requests to a back-end, and return responses from that back-end. (Proxying to a BlackSheep back-end).
./max-body-sizeShows a way to control the maximum body size when reading requests streams.
./long-pollingShows an example of long polling implemented using BlackSheep.
./server-sent-eventsShows a basic example of how to use Server-sent events with BlackSheep (>=2.0.6).