Skip to main content

halon-api

A Python wrapper for the API for Mail Transport Agent Halon build with the requests library. The functions in the wrapper are described in doc/functions.md in the project repository.

Please read the original Halon documentation for complete in depth documentation on function arguments and the data returned by the API.

The wrapper is available as a PyPI package halon-api.

Install

Install the PyPI package using pip: pip install halon-api

How to use

from halon_api import HalonAPI

h = HalonAPI(
    "halon.example.com",
    "halon-user",
    "secret-password",
)

print("Halon software version:", h.get_software_version())

If you want to use your own CA (certificate authority), you can set the environment variable REQUESTS_CA_BUNDLE to hold the path to a CA_BUNDLE. You can also pass the pass the path to the HalonAPI object with the argument verify. Read more in the requests documentation.

Development

How to set up development environment.

Setup virtual environment

  • Make virtual python environment: python -m venv .venv
  • Activate environment: source .venv/bin/activate
  • Deactivate virtual environment (When done): deactivate

Install software

  • Install required packages: pip install requirements.txt
  • Install required packages for development: pip install requirements-dev.txt
  • Use pre-commit to install git hook scripts: pre-commit install

Build the PyPI package

How to build and install the PyPI package locally.

  • Build the package: python -m build
  • Install the package: pip install dist/halon-api-x.y.z.tar.gz

Generate documentation

Automated documentation of API functions can be generated by pydoc-markdown. It will update the file doc/functions.md.

  • Generate markdown (from repo root): pydoc-markdown doc/pydoc-markdown.yaml

Release files for halon-api 0.0.6

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

Source distribution (sdist)

Source distribution for halon-api 0.0.6
File Size Uploaded
halon-api-0.0.6.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for halon-api 0.0.6
File Interpreter ABI Platform
halon_api-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 35.1 kB

Release files / halon-api-0.0.6.tar.gz

Download URL halon-api-0.0.6.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
54b909aec2d0fbb8a85e9f2eeaa2577eba53597d9c432369b9cbbcf189fdce73
BLAKE2b-256 checksum
How to use checksums
85290c0c2bc4b9bb01539b259a3d732947ee5dae456b0c529ff764d68ee9ca91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / halon_api-0.0.6-py3-none-any.whl

Download URL halon_api-0.0.6-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ca1b9fbda42a6a5d417656a4a290200d5836540d6a26be4fdf5c7d07e895a84
BLAKE2b-256 checksum
How to use checksums
9c2a2833cf8f503ce009bf7bbca2d46e29871aa09ea73edbb17249e32013b013
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.1

2 release files

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