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.11.tar.gz
(188.2 kB
view hashes)
Built Distributions
esg-0.1.11-cp310-cp310-win_amd64.whl
(299.5 kB
view hashes)
esg-0.1.11-cp39-cp39-win_amd64.whl
(299.0 kB
view hashes)
Close
Hashes for esg-0.1.11-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9eee6859e2da4dcff03a7dd5f74493923f10e89a8fb14540b067e1c416b0acdc |
|
MD5 | c1ec2a900aa10b697635121b0d2337d0 |
|
BLAKE2b-256 | a1b3f34bf646873b6f42212d95b00ede7939f6ca2a9c844a02a2972af7cf5b7b |
Close
Hashes for esg-0.1.11-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31ce9fbfc589e6ecfe80893fb56aab353411625a7c518709252b0ec384823473 |
|
MD5 | 9b62774838158d234e48baff97149313 |
|
BLAKE2b-256 | 37155a87d4a353392309dfb004b7943e5941124f404a83e068ebbc2c5c7967f0 |
Close
Hashes for esg-0.1.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad2c9eb04a394ceca4efda2e8b9e01941af474f2c5f9a3b3095cfa12db0eb25b |
|
MD5 | f499c10e99710fffde09226e908837aa |
|
BLAKE2b-256 | c6f38f8e6dcdb38b8425bba8488366786f0b21853e56e353f3227382947fe026 |
Close
Hashes for esg-0.1.11-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddd98d3a28043940fb7833e46ec3f2b4413470eeae16c7443f9881edd8fd38c3 |
|
MD5 | d25077d3114a544c9fc5accca80316b4 |
|
BLAKE2b-256 | 210af62d75a4251b1742314917b6fb2c20da92513436307c65fd2324685eca33 |
Close
Hashes for esg-0.1.11-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15c2352f2d3eb5d241fd554c46531633460ee658184ccebbd91fb608bc889aab |
|
MD5 | 05b22151902039d6fb460399ce06619a |
|
BLAKE2b-256 | 0b8f59f865c4d3d74dd091dfa1a38f87b58131d8aed7c67d215a7079f197fafa |
Close
Hashes for esg-0.1.11-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bc772b779c89c9a215840d676e191297ec680e96b654b37b0a98149b52f2873 |
|
MD5 | be35c553a2c85feff896e0480c3cef90 |
|
BLAKE2b-256 | 751f1b1793ddf42d1dfab4f2285012555737664bc241febb1e4a0e5f9d42a0de |
Close
Hashes for esg-0.1.11-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad8882b56cd40cb04e3546a8f2554284ec82c23c6f86e689a1dfd92deaadc335 |
|
MD5 | fa83d7c83e603b4b411ecc0745d37903 |
|
BLAKE2b-256 | a7ebabdd0c2cd3fa60728ba92bfe2b64bb71ad80d94c1148d14bfe173ad89fc4 |
Close
Hashes for esg-0.1.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7deb66423d8b6f9f0370500cc2324cbf39fa77e67d9f47738bb169a668011620 |
|
MD5 | 8c297a9886459f25e6fb0595cf5d2de8 |
|
BLAKE2b-256 | 518fc2e1fba2b0e16653430b1763adb818856c392b4ec7d1f4e16cd3a9c23183 |
Close
Hashes for esg-0.1.11-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4b76924466765672897261588b5b63a0f64aa6f1798689634950c432eb2bf57 |
|
MD5 | c2c07c520ff5280ce67fa0a33ac3be0a |
|
BLAKE2b-256 | 2dedabd1d166d3412ce6fc72995b637c1f1738d1ef2234578baceb47f6aadd6b |
Close
Hashes for esg-0.1.11-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d9661ccdb404ee572e31f65b96e68541351e5c034e7eafaf45667091895b2f0 |
|
MD5 | 95cdfadd2c869a583d735837a3a0b2a6 |
|
BLAKE2b-256 | fcec5c34140e164130bd8bffbc5e51ff88e4f50f250b0dab42f09b6515114268 |