Metadata-Version: 2.4
Name: echocorn
Version: 1.0.0b0
Summary: Very fast asynchronous asgi server with HTTP/1.1 and HTTP/2.0
Home-page: https://github.com/mishakorzik/echocorn
Author: MishaKorzhik_He1Zen
Author-email: developer.mishakorzhik@gmail.com
License: Apache 2.0
Project-URL: Bug Tracker, https://github.com/mishakorzik/echocorn/issues
Project-URL: Donate, https://www.buymeacoffee.com/misakorzik
Keywords: asgi,async,uvloop,fast,http,https,hsts,tls,server,secure,secured,dualstack
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Framework :: AsyncIO
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Environment :: Web Environment
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: h2>=4.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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:

```bash
pip install echocorn
```

---

## Quick start

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

```bash
echocorn --app app:app --port 443
```

Show all available command-line options:

```bash
echocorn --help
```

---

## Example usage

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

```bash
# 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:

<img width="48.9%" src="https://raw.githubusercontent.com/mishakorzik/echocorn/refs/heads/main/screenshot_1.jpg"/>
<img width="48.9%" src="https://raw.githubusercontent.com/mishakorzik/echocorn/refs/heads/main/screenshot_2.jpg"/>

---

## Donate

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

[<img title="Donate" src="https://img.shields.io/badge/Donate-Echocorn-blue?style=for-the-badge&logo=github"/>](https://www.buymeacoffee.com/misakorzik)

---

## Community & support

* Telegram: [https://t.me/ubp2q](https://t.me/ubp2q)
* Discord: [https://discord.gg/xwpMuMYW57](https://discord.gg/xwpMuMYW57)

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