Skip to main content

A bit of sugar for the [fastest python framework][japronto]

Project description

Japronto Extra

A bit of sugar for the fastest python framework

pip install orjson japronto-extra


def home(request):
    return "You can pass an url explicitly"

def hello_world(request):
    # if you omit it though, the function name will be used
    return {"I'm served at": "/hello-world"}

def foo__bar(request):
    # double underscores map onto slashes
    return "I'm at /foo/bar"

@route("/validation", "POST")
def basic_validation(request):
    # required integer query argument
    id = get_argument(request.query, "id", int)
    # optional `datetime` json argument with a default fallback
    at = get_argument(
        request.json, "at", datetime.fromisoformat,
    return {"id": id, "at": at}

Look at the working example in

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for japronto-extra, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size japronto_extra-0.1.3-py3-none-any.whl (2.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page