Bump astral-sh/setup-uv from 7.6.0 to 9.0.0 (#114) Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 7.6.0 to 9.0.0. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/37802adc94f370d6bfd71619e3f0bf239e1f3b78...c771a70e6277c0a99b617c7a806ffedaca235ff9) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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:
APPconfig.yamlCurrent (known, public) users of asfquart:
Future users of asfquart:
See the documentation page for more information.
import asfquart from asfquart.auth import Requirements as R def my_app() -> asfquart.base.QuartApp: # 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!" return app if __name__ == "__main__": app = my_app() # Run the application in an extended debug mode: # - reload the app when any source / config file get changed app.runx(port=8000) else: # Serve the application via an ASGI server, e.g. hypercorn app = my_app()
Create and activate a virtual environment and then install asfquart using uv or pip:
# With uv uv add asfquart # With uv pip-compatible interface uv pip install asfquart # With standard pip pip install asfquart
Note: Adding the [aioldap] extra will install optional dependencies for LDAP support that will require additional system dependencies:
# With uv uv add asfquart --extra aioldap # With uv pip-compatible interface uv pip install "asfquart[aioldap]" # With standard pip pip install "asfquart[aioldap]"
Install the required dependencies for development:
uv sync
Install the optional dependencies for development:
uv sync --extra aioldap
Running the tests:
uv sync --all-extras --group test uv run pytest
Building the package:
uv build
There is a simple test application included (./examples/snippets/simple_app.py) to outline the basic setup. To run the application in development mode, type:
make example-dev
to run it with an ASGI server for production, type:
make example-run