Skip to main content

Very fast asynchronous asgi server with HTTP/1.1 and HTTP/2.0

Project description

Echocorn

Echocorn is an exceptionally fast, lightweight ASGI server with a custom HTTP/1.1 implementation and first-class HTTP/2 support (powered by the h2 library). Designed for modern web applications, Echocorn combines high throughput with small resource overhead and includes built-in response compression and hardened HTTP header security.


Key features

  • High-performance ASGI server optimized for low-latency workloads
  • Native HTTP/1.1 implementation plus built-in HTTP/2 support via h2
  • Transparent response compression (gzip/deflate) to reduce bandwidth usage
  • Enhanced HTTP header security (CSP, HSTS, X-Frame-Options, etc.) out of the box
  • Minimal dependencies and small memory footprint
  • Simple command-line interface for quick deployment

Quick install

Install from PyPI:

pip install echocorn

Quick start

Run your ASGI application (example using a callable named app inside app.py):

echocorn --app app:app --port 443

Show all available command-line options:

echocorn --help

Example usage

Use Echocorn to serve a FastAPI, Starlette, or any ASGI app.

# Serve app.app (where `app` is an ASGI application instance)
echocorn --app app:app --host 0.0.0.0 --port 443 --workers 2 --safe-headers --keyfile key.pem --certfile cert.pem

Configuration & options

Echocorn exposes CLI flags for common server settings such as:

  • --app — module:callable path to your ASGI application
  • --host / --port — where the server listens
  • --workers — number of worker processes
  • --certfile, --keyfile — TLS/SSL files for secure connections
  • --compression — toggle or tune response compression
  • --safe-headers — enable security headers
  • --domain — allows requests only if host in headers matches
  • --about — show about the server

Run echocorn --help to see the full set of parameters and defaults.


Security & performance

Echocorn focuses on secure and efficient defaults:

  • HTTP header hardening (CSP, HSTS, X-Content-Type-Options, X-Frame-Options) to reduce common web risks
  • Built-in compression to reduce latency & bandwidth costs for clients
  • Optimised request/response handling path for minimal overhead and maximum throughput

For production use, pair Echocorn with standard hardening measures (firewall rules, TLS best practices, OS-level tuning) and monitor resource usage.


Screenshots

Examples of running Echocorn and request logs:


Donate

If you find Echocorn useful and want to support development, you can donate here:


Community & support

If you find a bug or have questions, open an issue or reach out on Discord.

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

echocorn-1.0.1b0.tar.gz (15.7 kB view details)

Uploaded Source

File details

Details for the file echocorn-1.0.1b0.tar.gz.

File metadata

  • Download URL: echocorn-1.0.1b0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for echocorn-1.0.1b0.tar.gz
Algorithm Hash digest
SHA256 c274ced21c83dda3d8f5ec9be377e0a3353fb55b5e58b10cdcff9479dd1899cc
MD5 5ce65d10f4208686c70d23e46c104f29
BLAKE2b-256 92771402c51fbbe98baedb9c0d6f2ef64c8d29c7cbd3f9e17e080b70f312725f

See more details on using hashes here.

Supported by

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