Lightweight framework for building resource-oriented applications.
Ro·ax /ˈɹoʊ.æks/: A lightweight Python resource-oriented framework.
Roax is a lightweight framework for building resource-oriented applications in Python. By composing your application as a set of resources that expose operations through a uniform interface, they can be automatically exposed through a REST and/or command line interface.
- Resource operations accessed through WSGI based REST API.
- Command-line interface to resource operations.
- Generates OpenAPI interface description, compatible with Swagger UI.
- Schema enforcement of resource operation parameters and return values.
- Authorization to resource operations enforced through imperative security policies.
pip install roax
Here is a minimal application that responds with
"Hello world!" when the
client accesses http://localhost:8000/hello.
import roax.schema as schema from roax.resource import Resource, operation from roax.wsgi import App from wsgiref.simple_server import make_server class HelloResource(Resource): @operation(returns=schema.str(), security=) def read(self): return "Hello world!" app = App("/", "Hello", "1.0") app.register_resource("/hello", HelloResource()) if __name__== "__main__": make_server("", 8000, app).serve_forever()
poetry install poetry run pre-commit install
poetry run pytest
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size roax-1.10.2-py3-none-any.whl (38.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size roax-1.10.2.tar.gz (33.7 kB)||File type Source||Python version None||Upload date||Hashes View|