Alpha sort [skip ci]
1 file changed
tree: 0c24e47bca9b09fe6f5b45c0115a4cca9d9b5887
  1. .github/
  2. docs/
  3. examples/
  4. src/
  5. tests/
  6. .gitignore
  7. LICENSE
  8. Pipfile
  9. pylint_google
  10. pylintrc
  11. pyproject.toml
  12. README.md
  13. requirements.txt
  14. setup.cfg
README.md

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...

For more detailed documentation, see the documentation page.

Primer

import asfquart
import asfquart.auth

def my_app():
    # Construct the quart service. By default, the oauth gateway is enabled at /oauth.
    asfquart.construct("my_app_service")

    @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()