ASF Quart Framework
Project description
asfquart - a Quart framework for the ASF
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
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
asfquart-0.1.1.tar.gz
(20.2 kB
view hashes)
Built Distribution
asfquart-0.1.1-py3-none-any.whl
(21.1 kB
view hashes)