Skip to main content

asfquart - a Quart framework for the ASF

PyPI PyPI - Python Versions Unit Tests Apache License

This is a Quart framework for ASF web applications.

On top of Quart, this package layers a lot of functionality, much of which is specific to the ASF and its infrastructure and preferred approaches for website application development.

asfquart adds the following items to basic quart:

  • simple construction of the APP
  • default config.yaml
  • watching the .py and config for changes, to cause a restart/reload
  • watch SIGINT to halt and SIGUSR2 to restart/reload
  • template watching and rendering for EZT templates
  • URL path routing for pages and API endpoints
  • Oauth with our ASF provider for authn
  • LDAP group testing for authz
  • long-running tasks and their lifecycle management

Current (known, public) users of asfquart:

Future users of asfquart:

  • Apache STeVe
  • Identity management (replaces the old id.a.o)
  • Gitbox UI
  • ??

Primer

See the documentation page for more information.

import asfquart
from asfquart.auth import Requirements as R

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

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

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


if __name__ == "__main__":
    my_app()

Running unit tests for asfquart

To run manually, use the following commands from the root dir of this repo:

poetry run pytest

Metadata

Release files for asfquart 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asfquart 0.1.9
File Size Uploaded Provenance Actions
asfquart-0.1.9.tar.gz 21.4 kB Without provenance Details for asfquart-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asfquart 0.1.9
File Interpreter ABI Platform Actions
asfquart-0.1.9-py3-none-any.whl Python 3 none any Details for asfquart-0.1.9-py3-none-any.whl

Total release size: 44.9 kB

Release files / asfquart-0.1.9.tar.gz

Download URL asfquart-0.1.9.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
97636ac6aeae607fa2f51603731765a4ea72efd254c968f04e57990e47e656d7
BLAKE2b-256 checksum
How to use checksums
619ead7d7b72c6b775e1ea1b0b916410d3e6bde8d3f56beec716046ffdc1ad2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-52-generic

Release files / asfquart-0.1.9-py3-none-any.whl

Download URL asfquart-0.1.9-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc5477c3a0cd7ef607a61f5f2679cbd194a884825801631cb6b5bed4d9731735
BLAKE2b-256 checksum
How to use checksums
0072690d6d040930c5486f9482b58fedc5a975c7b0ff0b7c5534831f5805fb30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-52-generic

Security for asfquart 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page