Enhanced Service Gateway
Project description
Low latency ASGI server.
Documentation: https://esg.mtag.dev
ESG is a speed-oriented ASGI server implementation.
Implements application server for asynchronous Python Web-frameworks.
Please read ASGI specification
Supports HTTP/1.1 and WebSockets.
Quickstart
Install using pip
:
$ pip install esg
This will install ESG with minimal (pure Python) dependencies.
$ pip install esg[standard]
This will install ESG with "Cython-based" dependencies (where possible) and other "optional extras".
In this context, "Cython-based" means the following:
- the event loop
uvloop
will be installed and used if possible. - the http protocol will be handled by
httptools
if possible.
Moreover, "optional extras" means that:
- the websocket protocol will be handled by
websockets
(should you want to usewsproto
you'd need to install it manually) if possible. - the
--reload
flag in development mode will usewatchgod
. - windows users will have
colorama
installed for the colored logs. python-dotenv
will be installed should you want to use the--env-file
option.PyYAML
will be installed to allow you to provide a.yaml
file to--log-config
, if desired.
ASGI application example
Put following code in example.py
:
async def app(scope, receive, send):
assert scope['type'] == 'http'
await send({
'type': 'http.response.start',
'status': 200,
'headers': [
[b'content-type', b'text/plain'],
],
})
await send({
'type': 'http.response.body',
'body': b'Hello, world!',
})
Run the server:
$ esg example:app
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
esg-0.1.10.tar.gz
(188.3 kB
view hashes)
Built Distributions
esg-0.1.10-cp310-cp310-win_amd64.whl
(299.5 kB
view hashes)
esg-0.1.10-cp39-cp39-win_amd64.whl
(299.0 kB
view hashes)
Close
Hashes for esg-0.1.10-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c59599b5a498d24f6798cd9390e5dcd96503f9cc7ff454c551be73e48a72a223 |
|
MD5 | def3da606c115b50d16afd4cbfb7a607 |
|
BLAKE2b-256 | 16f6cbf18a21826da8a899caa67852a577db131ac21eac68dc6b54e8a8b1c23c |
Close
Hashes for esg-0.1.10-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2163a8a1f72363b8525d67b377d59dc9dabec3eb366849b5e3ced66a99c8e98e |
|
MD5 | 6c68dd91cfef96e49953c41ea83c3715 |
|
BLAKE2b-256 | ccf739806609cc89faddbddc623732f918fb1cf4a2927eaca6b10d5e60006b95 |
Close
Hashes for esg-0.1.10-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31283a6177fa0381e9152eb9182da517daf6390af6ba280ead1712d45b459b6d |
|
MD5 | ac7452a34b1a4af519bb084aabf3a54c |
|
BLAKE2b-256 | 8d7c32697c1755857a9b39ffb00f773745e33825770ebede2b1dacc6d48e7f15 |
Close
Hashes for esg-0.1.10-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 151c7e4165f60b1f24f8292e7b408fec1d5a9ebad8ec02ae99fd6cffedc0880e |
|
MD5 | 2079cae5a48b06e91579c15363ad4351 |
|
BLAKE2b-256 | f84ff0ec07e27b8efd99a5f3057a3f28e21a23d6f32ed0cf3565d147b0a8d7ad |
Close
Hashes for esg-0.1.10-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e97cc15837d2f05dd644e545e3056fb365b4245eb6244ca2550010bb5c0f72cd |
|
MD5 | 14e543eea3bd8de60d338ee592b73762 |
|
BLAKE2b-256 | e587378714eb50b5ef040618b29fe1132f41f32439a696321f6987429adeca60 |
Close
Hashes for esg-0.1.10-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aee72855a96a56e7c4c2a02fdf3f310bed4cac189f2476418649446b1afe752d |
|
MD5 | dcd6249c0c67548182aafafb629d161c |
|
BLAKE2b-256 | 79f82949eb3b3fbcf9c9e720f1f37cec2afe1fe70766f2fa21c3bcd9ddf15d1c |
Close
Hashes for esg-0.1.10-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14e7465d209660eff931234d142c5c1d839a8a9bbfad2193d45cc13464d94944 |
|
MD5 | 11b540210089911d2e390cb45f9cf416 |
|
BLAKE2b-256 | 837a14384622ad854abd6ea22090d6dff17d11043da58ca9e24fffac3b17bb5c |
Close
Hashes for esg-0.1.10-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10f15d5d4af219a9bee4646cd14e175d028b449cae8f0c55b14ce541b6ccb3d1 |
|
MD5 | d253b959cfd7509276b44b94905e6839 |
|
BLAKE2b-256 | e36c8ade24505f326d561fddbd0c491953601c3fc2e169705438a4e8d44cff61 |
Close
Hashes for esg-0.1.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40a9310ad136293f786d9755e62a1a34c4868429ef2d16637eddca301af098b3 |
|
MD5 | adde2da52711fb74bc02f9f0993f61a1 |
|
BLAKE2b-256 | 5d923056df7a4ab0542fda0167b3bec065119e64ef5a8554c22393b4884131f0 |
Close
Hashes for esg-0.1.10-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f86b37e45c769dd86f52e338ad09060b0ad3db511c49dbd60ede63e4eecaf7b |
|
MD5 | 2c12f629460cbed381712ebc70b4fe19 |
|
BLAKE2b-256 | 186f4b76bc1162ecd39635ae08b8d4765c642703eab55bafc4e62ca9a5062b44 |