This Python library contains features commonly used at the Apache Software Foundation.
(For asfpy 0.37 and below, look at our old Subversion repository)
aioldap: asynchronous LDAP client (documentation TBD)clitools: LDAP work via command line tooling (documentation TBD)crypto: helper for ED25519 work (documentation TBD)db: high performance simplified SQLite client (documentation TBD)justone: helper to ensure only one long-running process is operating (documentation TBD)messaging: helpers to send email (documentation TBD)pubsub: client for subscribing to the ASF pubsub service (documentation TBD)sqlite: document-based CRUD using SQLite (documentation TBD)stopwatch: debug/logging timing for Python code. See documentationsyslog: redirectprint()to syslog (documentation TBD)twatcher: watch EZT emplates for edits, then reload (documentation TBD)whoami: fetch hostname of box (documentation TBD)
--
daemon: DEPRECATED old code to spawn a daemon (obsoleted by pipservice)ldapadmin: DEPRECATED internal ASF infra tooling (moved to internal infra)
Prerequisites:
uv: install as per https://docs.astral.sh/uv/getting-started/installation/
Setting up the development environment:
$ uv sync --all-extrasBuilding the package:
$ uv buildRunning the tests:
$ uv run pytestCreate and activate a virtual environment and then install asfpy using pip:
$ pip install "asfpy"Note: Adding [ldap] or [aioldap] extras will install optional dependencies for LDAP support that will
require additional system dependencies:
$ pip install "asfpy[aioldap]"Create an account on https://pypi.org/, then add a token with an "all projects" scope.
Set your token via the environment:
$ export UV_PUBLISH_TOKEN=<your-token>Finally publish to pypi.org:
$ make publishSee this guide for more details on working with PyPi.
Please also create a tag for the release.
Create an account on https://test.pypi.org/, then add a token with an "all projects" scope.
Set your token via the environment:
$ export UV_PUBLISH_TOKEN=<your-token>Finally publish to test.pypi.org:
$ make publish-testThe package should upload to the test.pypi.org service.