Litestar Socketify Plugin
[!WARNING] Socketify currently has an issue with ASGI lifespans. This plugin should be considered experimental.
Installation
pip install litestar-socketify
Usage
Here is a basic application that demonstrates how to use the plugin.
from __future__ import annotations
from litestar import Controller, Litestar, get
from litestar_socketify import SocketifyPlugin
class SampleController(Controller):
@get(path="/sample")
async def sample_route(self ) -> dict[str, str]:
"""Sample Route."""
return {"sample": "hello-world"}
app = Litestar(plugins=[SocketifyPlugin()], route_handlers=[SampleController])
Now, you can use the standard Litestar CLI and it will run with Socketify instead of Uvicorn.
❯ litestar --app examples.basic:app run
Using Litestar app from env: 'examples.basic:app'
Starting socketify server process ──────────────────────────────────────────────
┌──────────────────────────────┬──────────────────────┐
│ Litestar version │ 2.1.1 │
│ Debug mode │ Disabled │
│ Python Debugger on exception │ Disabled │
│ CORS │ Disabled │
│ CSRF │ Disabled │
│ OpenAPI │ Enabled path=/schema │
│ Compression │ Disabled │
└──────────────────────────────┴──────────────────────┘
...
Metadata
Release files for litestar-socketify 0.1.1
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 | Actions |
|---|---|---|---|---|
| litestar_socketify-0.1.1.tar.gz | 71.7 kB | Without provenance | Details for litestar_socketify-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| litestar_socketify-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for litestar_socketify-0.1.1-py3-none-any.whl |
Total release size: 77.0 kB
Release files / litestar_socketify-0.1.1.tar.gz
| Download URL | litestar_socketify-0.1.1.tar.gz |
|---|---|
| Size | 71.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b7d17b4144eb3343938ff1f7c2fe0c4bc5d5a4a43b2695ee763d18641b1eeea
|
|
BLAKE2b-256 checksum How to use checksums |
4a2d7d3e148cb8e94a399bd7eec0a9df3bcf2a7116f1e359456feb185b0464ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / litestar_socketify-0.1.1-py3-none-any.whl
| Download URL | litestar_socketify-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edbe9ce2cb7230f36a1fc65e159a655010fe808dc33af1cf24d96a8012752e19
|
|
BLAKE2b-256 checksum How to use checksums |
4481c95da29ff458f2ecc91bec1185c47f743332802ced5ff07ff8e67b6dca7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for litestar-socketify 0.1.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.