Skip to main content

Enhanced Service Gateway

Project description

Low latency ASGI server.


Build Status Package version PyVersions

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 use wsproto you'd need to install it manually) if possible.
  • the --reload flag in development mode will use watchgod.
  • 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 details)

Uploaded Source

Built Distributions

esg-0.1.11-cp310-cp310-win_amd64.whl (299.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

esg-0.1.11-cp310-cp310-musllinux_1_1_x86_64.whl (890.9 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

esg-0.1.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (835.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

esg-0.1.11-cp310-cp310-macosx_10_9_x86_64.whl (323.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

esg-0.1.11-cp310-cp310-macosx_10_9_universal2.whl (442.9 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

esg-0.1.11-cp39-cp39-win_amd64.whl (299.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

esg-0.1.11-cp39-cp39-musllinux_1_1_x86_64.whl (882.3 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

esg-0.1.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (831.8 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

esg-0.1.11-cp39-cp39-macosx_10_9_x86_64.whl (322.5 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

esg-0.1.11-cp39-cp39-macosx_10_9_universal2.whl (441.8 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file esg-0.1.11.tar.gz.

File metadata

  • Download URL: esg-0.1.11.tar.gz
  • Upload date:
  • Size: 188.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11.tar.gz
Algorithm Hash digest
SHA256 908ec47c5b37aac5773209d0c818a24ff1d812e18eaea2342883ee65857045ab
MD5 dabbb77855e8602c86149dbb76205d75
BLAKE2b-256 25c8f05ae3729e808121bc938ff42daa4339f33444d85f70a8114bb30e5d6dcf

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: esg-0.1.11-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 299.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9eee6859e2da4dcff03a7dd5f74493923f10e89a8fb14540b067e1c416b0acdc
MD5 c1ec2a900aa10b697635121b0d2337d0
BLAKE2b-256 a1b3f34bf646873b6f42212d95b00ede7939f6ca2a9c844a02a2972af7cf5b7b

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

  • Download URL: esg-0.1.11-cp310-cp310-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 890.9 kB
  • Tags: CPython 3.10, musllinux: musl 1.1+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 31ce9fbfc589e6ecfe80893fb56aab353411625a7c518709252b0ec384823473
MD5 9b62774838158d234e48baff97149313
BLAKE2b-256 37155a87d4a353392309dfb004b7943e5941124f404a83e068ebbc2c5c7967f0

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: esg-0.1.11-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 323.0 kB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ddd98d3a28043940fb7833e46ec3f2b4413470eeae16c7443f9881edd8fd38c3
MD5 d25077d3114a544c9fc5accca80316b4
BLAKE2b-256 210af62d75a4251b1742314917b6fb2c20da92513436307c65fd2324685eca33

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

  • Download URL: esg-0.1.11-cp310-cp310-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 442.9 kB
  • Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 15c2352f2d3eb5d241fd554c46531633460ee658184ccebbd91fb608bc889aab
MD5 05b22151902039d6fb460399ce06619a
BLAKE2b-256 0b8f59f865c4d3d74dd091dfa1a38f87b58131d8aed7c67d215a7079f197fafa

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: esg-0.1.11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 299.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9bc772b779c89c9a215840d676e191297ec680e96b654b37b0a98149b52f2873
MD5 be35c553a2c85feff896e0480c3cef90
BLAKE2b-256 751f1b1793ddf42d1dfab4f2285012555737664bc241febb1e4a0e5f9d42a0de

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

  • Download URL: esg-0.1.11-cp39-cp39-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 882.3 kB
  • Tags: CPython 3.9, musllinux: musl 1.1+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 ad8882b56cd40cb04e3546a8f2554284ec82c23c6f86e689a1dfd92deaadc335
MD5 fa83d7c83e603b4b411ecc0745d37903
BLAKE2b-256 a7ebabdd0c2cd3fa60728ba92bfe2b64bb71ad80d94c1148d14bfe173ad89fc4

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: esg-0.1.11-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 322.5 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c4b76924466765672897261588b5b63a0f64aa6f1798689634950c432eb2bf57
MD5 c2c07c520ff5280ce67fa0a33ac3be0a
BLAKE2b-256 2dedabd1d166d3412ce6fc72995b637c1f1738d1ef2234578baceb47f6aadd6b

See more details on using hashes here.

File details

Details for the file esg-0.1.11-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

  • Download URL: esg-0.1.11-cp39-cp39-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 441.8 kB
  • Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for esg-0.1.11-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1d9661ccdb404ee572e31f65b96e68541351e5c034e7eafaf45667091895b2f0
MD5 95cdfadd2c869a583d735837a3a0b2a6
BLAKE2b-256 fcec5c34140e164130bd8bffbc5e51ff88e4f50f250b0dab42f09b6515114268

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page