Skip to main content

ASF Common Python Methods

Project description

asfpy - ASF Infrastructure Common Library for Python functions

PyPI PyPI - Python Versions Unit Tests Apache License

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

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

Package Documention

  • 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 documentation
  • syslog: redirect print() 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)

Building asfpy package

Prerequisites:

Setting up the development environment:

$ uv sync --all-extras

Building the package:

$ uv build

Running the tests:

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

Set your token via the environment:

$ export UV_PUBLISH_TOKEN=<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.

Set your token via the environment:

$ export UV_PUBLISH_TOKEN=<your-token>

Finally publish to test.pypi.org:

$ make publish-test

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asfpy-0.58.tar.gz (176.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asfpy-0.58-py3-none-any.whl (38.8 kB view details)

Uploaded Python 3

File details

Details for the file asfpy-0.58.tar.gz.

File metadata

  • Download URL: asfpy-0.58.tar.gz
  • Upload date:
  • Size: 176.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for asfpy-0.58.tar.gz
Algorithm Hash digest
SHA256 f057d503e6754fda0f74a7e5aef2f979184f6dda0b393fd70a0bed89d31030b3
MD5 6c99dc88364a521f5cf3a9e0c4802fe3
BLAKE2b-256 a0fc2c161243955e3f8ebd9ac200e1b4f45db0f7e4dead88380765827d38682c

See more details on using hashes here.

File details

Details for the file asfpy-0.58-py3-none-any.whl.

File metadata

  • Download URL: asfpy-0.58-py3-none-any.whl
  • Upload date:
  • Size: 38.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for asfpy-0.58-py3-none-any.whl
Algorithm Hash digest
SHA256 a94b3da5c673c6dd43d3c4e54317096f50236e47a8242f31f0f8b291a9184679
MD5 eb987600f3ce481159d417cab6be1ad2
BLAKE2b-256 93a2d8177d6ff5302bebf508247d9252e5a51e6168e72352616ff3ad1f1a0294

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page