Netix ASGI Server
Netix is a high-performance ASGI (Asynchronous Server Gateway Interface) server designed for efficiently serving ASGI web applications and APIs. It offers a robust, customizable, and easy-to-use platform for deploying your ASGI applications.
Table of Contents
- Features
- Installation
- Getting Started
- Configuration
- Middleware Support
- Contributing
- License
- Acknowledgments
- Support and Feedback
Features
- Concurrency Control: Easily set the number of worker processes to manage concurrent requests efficiently.
- Socket Options: Support for both Unix sockets and network sockets with customizable socket options.
- Middleware Support: Implement request and response middlewares to customize the behavior of your ASGI application.
- Daemon Mode: Run Netix as a daemon to keep it running in the background, detached from the terminal.
- Status Monitoring: Schedule status checks to monitor the health of your ASGI server.
Installation
You can install Netix via pip, making it a breeze to get started:
pip install netix
Configuration
Available Commands and Options
You can control and configure Netix using various command-line options when starting the server:
--host: Listen host. Defaults to "127.0.0.1".--daemon: Start the daemon mode to run the server in the background. Use--daemon main:appor@app moduleto daemonize.--port: Listen port. Defaults to 8000.--bind: Address to bind. You can use this option instead of--hostand--port. For example, "127.0.0.1:8000" or "/tmp/file.sock".--reuse-port: UseSO_REUSEPORTwhen available.--worker-num: Number of worker processes. Defaults to 1.--backlog: Maximum number of pending connections. Defaults to 100.--ssl-cert: SSL certificate location. For example, "/path/to/fullchain.pem".--ssl-key: SSL private key location. For example, "/path/to/privkey.pem".--debug: Enable debug mode. Intended for development.--no-ws: Disable built-in WebSocket support.--log-level: Defaults to "DEBUG". For available log levels, see Python Logging Levels.--download-rate: Limits the sending speed to the client. Defaults to 1048576, which means 1 MiB/s.--upload-rate: Limits the upload / POST speed. Defaults to 1048576, which means 1 MiB/s.--buffer-size: Defaults to 16384, or 16 KiB.--client-max-body-size: Defaults to 2 * 1048576, or 2 MiB.--request-timeout: Defaults to 30 seconds.--keepalive-timeout: Defaults to 30 seconds.--keepalive-connections: Maximum number of keep-alive connections per worker. Defaults to 512 connections per worker.--root-path: Set the ASGI root_path. Defaults to an empty string.
For example, you can run Netix with these options:
python3 -m netix --debug --port 8080 example:app
python3 -m netix --daemon example:app
or
netix --debug --port 8080 example:app
netix --daemon example:app
Example
- Run the Lexan ASGI Framework App using Netix Server.
$ netix --bind 127.0.0.1:8000 example:app
- Output:
Starting Netix v1.11 (cpython 3.11.4, linux)
------------------------------------------------------------------------
Settings: [
host=127.0.0.1, port=8000, reuse_port=True, worker_num=1, ssl={}, app=test:app, log_level=DEBUG
]
------------------------------------------------------------------------
[2023-10-21 23:02:39] Starting Netix ASGI server for /\ Aquilify
[2023-10-21 23:02:39,890] INFO: lifespan: startup
[2023-10-21 23:02:40] Netix (ASGI) (pid 69334) is started at 127.0.0.1:8000 (Press CTRL+C to quit)
Metadata
Release files for netix 1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| netix-1.13.tar.gz | 38.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| netix-1.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.0 kB
Release files / netix-1.13.tar.gz
| Download URL | netix-1.13.tar.gz |
|---|---|
| Size | 38.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bc78f71ba4b0e900037dd2526fff4dc24441803e33a59aa8d26d564f8997326
|
|
BLAKE2b-256 checksum How to use checksums |
a58b9d9a6fc5f1e4f4a4f03fc61baa7f26a9dd80c2d564ca52219abd49945b6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / netix-1.13-py3-none-any.whl
| Download URL | netix-1.13-py3-none-any.whl |
|---|---|
| Size | 45.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27586efbfe7af26950183d8897316b2f098a2d008eeda4563b3766a9281b2036
|
|
BLAKE2b-256 checksum How to use checksums |
cec6cbb1f0d9fb4800f5dbdf6e4c774aa0803e06142444203e1399cea2c90671
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for netix 1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.