asfpy - ASF Infrastructure common Python tools library

Clone this repo:
  1. 545a605 crypt code due to be removed by Sebb · 5 weeks ago main
  2. 4da0cec Python 3.8 is still in general use by Sebb · 5 weeks ago
  3. 11949ae Update pyproject.toml, 0.55 published, we are now on 0.56 in main by Daniel Gruno · 5 weeks ago
  4. c90b8bb Add Makefile to simplify publishing, update README with latest publishing instructions (#28) by Thomas Neidhart · 5 weeks ago v0.55
  5. b4c5f35 fix badge link by Thomas Neidhart · 6 weeks ago

asfpy - ASF Infrastructure Common Library for Python functions

This Python library contains features commonly used at the Apache Software Foundation.

(For asfpy 0.37 and below, look at our old Subversion repository)

Building asfpy package

Prerequisites:

  • poetry: install e.g. with pipx pipx install poetry

Building the package:

$ poetry build

Running the tests:

$ poetry run pytest

Installation

Create 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]"

Publishing a new asfpy package

Create an account on https://pypi.org/, then add a token with an “all projects” scope.

Configure your credentials for the pypi repository:

$ poetry config pypi-token.pypi <your-token>

Finally publish to pypi.org:

$ make publish

See this guide for more details on working with PyPi.

Please also create a tag for the release.

Publishing to test.pypi.org

Create an account on https://test.pypi.org/, then add a token with an “all projects” scope.

Add a testpypi repository to your poetry config:

$ poetry config repositories.testpypi https://test.pypi.org/legacy/

Configure your credentials for the testpypi repository:

$ poetry config pypi-token.testpypi <your-token>

Finally publish to test.pypi.org:

$ make publish-test

The package should upload to the test.pypi.org service.