Skip to main content

ASF Quart Framework

Project description

asfquart - a Quart framework for the ASF

Unit Tests

This repository will house the future Quart framework for use within ASF web applications. Nothing much to see here yet...

Primer

import asfquart
import asfquart.auth
import asfquart.generics

def my_app():
    asfquart.construct("my_app_service")
    asfquart.generics.setup_oauth()   # Sets up /auth for OAuth handling
    asfquart.generics.enforce_login() # If not logged in, redirect to the above default login flow

    @asfquart.APP.route("/")
    async def homepage():
        return "Hello!"

    @asfquart.APP.route("/secret")
    @asfquart.auth.require(asfquart.auth.Requirements.committer)
    async def secret_page():
      return "Secret stuff!"
    
    asfquart.APP.run(port=8000)


if __name__ == "__main__":
    my_app()

Project details


Download files

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

Source Distribution

asfquart-0.1.3.tar.gz (20.5 kB view hashes)

Uploaded Source

Built Distribution

asfquart-0.1.3-py3-none-any.whl (21.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page