Tiny web framework based on msgspec and dependency-injector
Project description
pulya is a tiny python web framework focused on performance and new python features.
Features:
- msgspec for validation and serialization
- dependency-injector as the main and the only DI framework
- RSGI and first-class granian support
- free-threading / no-gil python support
- zero-cost routing with python-matchit
Minimal supported python version 3.12.
Quick start
Installation:
pip install pulya
Simple application (main.py:
from typing import Any
from pulya import Pulya, RequestContainer
from dependency_injector import containers, providers
class Container(containers.DeclarativeContainer):
# Wiring configuration.
# RequestContainer will also use this wiring config.
wiring_config = containers.WiringConfiguration(
modules=[__name__],
)
# Specially named dependency providing access to active request.
# Must have exact name `request`, actual container will be injected
# by the application on startup.
request = providers.Container(RequestContainer)
app = Pulya(Container)
@app.get("/")
def home() -> dict[str, Any]:
return {"success": True}
Run using granian:
granian --interface rsgi main:app
Check:
curl http://localhost:8000/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pulya-0.2.1.tar.gz
(8.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pulya-0.2.1-py3-none-any.whl
(11.9 kB
view details)
File details
Details for the file pulya-0.2.1.tar.gz.
File metadata
- Download URL: pulya-0.2.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1535e2fdd9d5573f590f363b1f9d777059802be9ddee73eedf4986e122186261
|
|
| MD5 |
dc358366d4c38598ed449938e0fca5ad
|
|
| BLAKE2b-256 |
f212e216046d2bbc14110a342b44cf38e7c368de9a2636694f870cf4ca32a225
|
File details
Details for the file pulya-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pulya-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc0a985e056aefc23716dbb1f9451cb74a1ba6d9496a3fe4fdd7e809a0c6ea50
|
|
| MD5 |
ace6b5eb3b18e755fb4853d5ed06249e
|
|
| BLAKE2b-256 |
1148426f207c8a962142d711d0fe2b848e2650470c4757431b777c14fcd01d93
|