A wrapper for the REST API of mail transfer agent (MTA) Halon
Project description
halon-api
A Python wrapper for the API for Mail Transport Agent Halon. The functions in the wrapper are described in doc/functions.md.
Please read the original 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())
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
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
Built Distribution
Hashes for halon_api-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a3f7f4b3a2feae970a6212247750f6cd80c6875f6be985ec412af3b91d19fc5 |
|
MD5 | c5e073fa05b0b2ed9d7b6b5d7f73b8da |
|
BLAKE2b-256 | 89f2f89291c445334c61895c8b44fb9b543e79c9df1465ec390d7ffa2510c268 |