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.12.tar.gz (188.8 kB view details)

Uploaded Source

Built Distributions

esg-0.1.12-cp310-cp310-win_amd64.whl (300.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

esg-0.1.12-cp310-cp310-musllinux_1_1_x86_64.whl (892.0 kB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

esg-0.1.12-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (834.9 kB view details)

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

esg-0.1.12-cp310-cp310-macosx_10_9_x86_64.whl (323.5 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

esg-0.1.12-cp310-cp310-macosx_10_9_universal2.whl (443.4 kB view details)

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

esg-0.1.12-cp39-cp39-win_amd64.whl (299.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

esg-0.1.12-cp39-cp39-musllinux_1_1_x86_64.whl (884.1 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

esg-0.1.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (830.4 kB view details)

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

esg-0.1.12-cp39-cp39-macosx_10_9_x86_64.whl (323.1 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

esg-0.1.12-cp39-cp39-macosx_10_9_universal2.whl (442.3 kB view details)

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

File details

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

File metadata

  • Download URL: esg-0.1.12.tar.gz
  • Upload date:
  • Size: 188.8 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.12.tar.gz
Algorithm Hash digest
SHA256 158da5f1830e29116b4fefd8c0c48c0ffa0a72c9e48881dbd33432925c4524fd
MD5 a9053490c8ff7f4607ea78f1555dfbac
BLAKE2b-256 3f611f954fb33de2989877184db1fafefd6cfa262fc3205ea4a739de3decabd8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esg-0.1.12-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 300.1 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.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1f958d5363b6602b000de9f2f1f5452dee3602aa1cc6357c78f86e2f9b334cf3
MD5 d70952daa182988df7205a87599d964f
BLAKE2b-256 540b0139520e1c7b333e2dd1c97144140659a8fce24f96b8461e1b9d0ddee182

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esg-0.1.12-cp310-cp310-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 892.0 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.12-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 8e2b395c41f60b304d964fe6621d9dd62e01decc3a43d5637eed454509002906
MD5 05753526a962211570988c13b3c3a51c
BLAKE2b-256 e4dca094dd8172c779d58f50475845f814df0836919896ef7e2c96a2d73485e0

See more details on using hashes here.

File details

Details for the file esg-0.1.12-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.12-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8c47bcfa144199235b6467fc3b82bdf9befb6394686da197a97696f74ddaacb9
MD5 4867c5872982c0eab6dfe9471fb509b6
BLAKE2b-256 61bd55925c3a45cea5534593388e389f7c4ac1d403ee75be505add3380c1c619

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esg-0.1.12-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 323.5 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.12-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 80aef53dd681a4b3a3937738bd41a668d711256d6a15d68885dad88066c5eb72
MD5 37286976d4ef0396b0fce0e64548e6a3
BLAKE2b-256 a131699f6ddcb648efc1d494017c8a97937b17f45e5501feee4e8a84b6b371c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esg-0.1.12-cp310-cp310-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 443.4 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.12-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b9cb965f3735cb548e931c927d8f08ad2ee5b0a3bc1110e3d2f1884af5f0dcde
MD5 00a230dc3087cfb2732b4d7dfe6d29ba
BLAKE2b-256 590ccb42f6959ca6c5e8e84ec8f6856fa5755c4000ffc063cc6aa6ef75a9d26a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esg-0.1.12-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 299.6 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.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d4fdadbad33373e139a9255fc0a3f004b04f504399d5229841b8ad609d7be277
MD5 1e3deaa5fd53bf9137d899ed746275dc
BLAKE2b-256 71f1ce0b7fc0d8ae985e1eb4ea125b5eada7c8c1132561722cbc6181a7334532

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esg-0.1.12-cp39-cp39-musllinux_1_1_x86_64.whl
  • Upload date:
  • Size: 884.1 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.12-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 821c37e38c987873b8e9a1949397efcfb825a69fd191b9b30ba302efe57bd73e
MD5 b9e5955531d1f50c879f7c3b40072d9c
BLAKE2b-256 20499e90a1ba66aa482ba81e9c591058bf5d021941cc4fc22a3c9c1431e49ddf

See more details on using hashes here.

File details

Details for the file esg-0.1.12-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.12-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4c49208fec7e9be85f9a5ade71c3bd5ec017fa5c574c6c4265b21b41f218f586
MD5 bf05aa373d31c84df230274e49e439dd
BLAKE2b-256 f91f9afd51170c091fb8279f13f9213d620b00003d44694fef492e56a282392f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esg-0.1.12-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 323.1 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.12-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3cbc986c4a04edb568c7bed6e084415c9bc7e1f6a4af1c682f6b9271d779bf29
MD5 180acc0bc9ec508a676b2103efaa5ad0
BLAKE2b-256 530746596fed7c83cbe0304e2f98c4a968083704f63ec646770bd11efe222b60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esg-0.1.12-cp39-cp39-macosx_10_9_universal2.whl
  • Upload date:
  • Size: 442.3 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.12-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8349eef5d3a789499deea6bc5d2c60643e382342092df8213e70e1cd30d92d56
MD5 9fd8c961687b3a0231496c23255d5294
BLAKE2b-256 691f5abd6f4affeb7ae4ccb190de36c481243b511331a7ab29a7abbe0537833a

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