Fast HTTP Server/Client microframework for Python asyncio
Project description
BlackSheep
HTTP Server/Client microframework for Python asyncio, using Cython,
uvloop, and
httptools.
This project is a beta version. The reason behind this framework is described in this page of the Wiki: Story.
from datetime import datetime
from blacksheep import HttpResponse, TextContent
from blacksheep.server import Application
app = Application()
@app.route('/')
async def home(request):
return HttpResponse(200, content=TextContent(f'Hello, World! {datetime.utcnow().isoformat()}'))
app.start()
Objectives
- Clean architecture and source code
- Avoid CPU cycles to handle things that are not strictly necessary
- Intelligible and easy to learn API, similar to those of many Python web frameworks
- Keep the core package minimal and focused, as much as possible, on features defined in HTTP and HTML standards
- High performance
Server Features
- Routing
- Middlewares
- Built-in support for multi processing
- Integration with built-in
loggingmodule to log access and errors synchronously - this is completely disabled by default - Chunked encoding through generators (yield syntax)
- Serving static files
- Linux only: support for Windows is currently out of the scope of this project
Documentation
Please refer to the project Wiki.
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
blacksheep-0.0.2.tar.gz
(578.6 kB
view details)
File details
Details for the file blacksheep-0.0.2.tar.gz.
File metadata
- Download URL: blacksheep-0.0.2.tar.gz
- Upload date:
- Size: 578.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca6b603774c80a995c739aa1c6dd05782cad1e037af046233690c384017640fa
|
|
| MD5 |
d7be9815ab5b3cf6872be9980209cb2f
|
|
| BLAKE2b-256 |
e27d42f811033edcd615d908a2192f0fefdfad7f3460f5e2dff171985a0a2a9f
|