Vellox
Vellox is an adapter for running ASGI applications in GCP Cloud Functions.
Requirements
Python 3.8+
Installation
pip install vellox
Example
from vellox import Vellox
async def app(scope, receive, send):
await send(
{
"type": "http.response.start",
"status": 200,
"headers": [[b"content-type", b"text/plain; charset=utf-8"]],
}
)
await send({"type": "http.response.body", "body": b"Hello, world!"})
vellox = Vellox(app=app, lifespan="off")
def handler(request):
return vellox(request)
Or using a framework:
from fastapi import FastAPI
from vellox import Vellox
app = FastAPI()
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: str = None):
return {"item_id": item_id, "q": q}
vellox = Vellox(app=app, lifespan="off")
def handler(request):
return vellox(request)
Release files for vellox 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vellox-0.2.0.tar.gz | 17.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vellox-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.3 kB
Release files / vellox-0.2.0.tar.gz
| Download URL | vellox-0.2.0.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
88c0fa1bd931bc1de45c1a2f2df20e167bd52f4b28aa84d42a46638e2e081da1
|
|
BLAKE2b-256 checksum How to use checksums |
650b685e8bef978139554fc6b036b87eacb0f81c6422bc691f9f71531961faf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / vellox-0.2.0-py3-none-any.whl
| Download URL | vellox-0.2.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b1909411279458b3d8e0bee6646aae4cf40bd51f9a42e56622a95b288b28483
|
|
BLAKE2b-256 checksum How to use checksums |
62bf93974e76723b8160c5c3809033ae7d3ea5e3803e79725204cde3f23389c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|