Skip to main content
ansible-collections.python.dist.boo @ PyPI GitHub Actions CI/CD build status — Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

ansible-collections.python.dist.boo: an Ansible Collection containing a boo module

This is a demo of an Ansible Collection python.dist packaged as a Python distribution package. It contains only one Ansible module called boo. Given that this dist and Ansible are installed into the same (virtual)env, it’s accessible from Ansible by FQDN python.dist.boo. Here’s how you can call it adhoc-style:

$ PYTHONPATH=`pwd` ansible -m python.dist.boo -a name=Bob localhost
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | SUCCESS => {
    "changed": false,
    "greeting": "Hello, Bob!",
    "msg": "Greeting Bob completed."
}

Alternatively, install it, instead of mangling with PYTHONPATH:

$ pip install ansible-collections.python.dist.boo
$ ansible -m python.dist.boo -a name=Bob localhost
[WARNING]: No inventory was parsed, only implicit localhost is available
localhost | SUCCESS => {
    "changed": false,
    "greeting": "Hello, Bob!",
    "msg": "Greeting Bob completed."
}

Purpose

At the moment of publishing this project, this demo only works with the code supplied by Ansible PR #67093. One can test it by installing Ansible from that PR-branch:

$ pip install git+https://github.com/sivel/ansible@acd-content-dir

Publishing to PyPI

This project implements automatic building and publishing of a Python distribution package to PyPI for tagged commits and to TestPyPI for every push to master. All the heavy lifting is done by the combination of GitHub Actions CI/CD workflows, pep517 CLI tool and setuptools-scm.

The published dists are then installable by:

$ pip install ansible-collections.python.dist.boo  # for PyPI

and

$ pip install ansible-collections.python.dist.boo \
      -i https://test.pypi.org/simple/ --pre  # for TestPyPI

If you’re learning by example, take a look at the following files:

  • pyproject.toml

  • setup.cfg

  • .github/workflows/publish-to-test-pypi.yml

Besides, you can follow a PyPA guide about publishing packages via GitHub Actions that will walk you through the process.

Prerequisites

Python 3.7+

License

The source code and the documentation in this project are released under the GPL v3 license.

Release files for ansible-collections.python.dist.boo 0.1.2

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

Source distribution (sdist)

Source distribution for ansible-collections.python.dist.boo 0.1.2
File Size Uploaded Provenance Actions
ansible-collections.python.dist.boo-0.1.2.tar.gz 20.9 kB Without provenance Details for ansible-collections.python.dist.boo-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ansible-collections.python.dist.boo 0.1.2
File Interpreter ABI Platform Actions
ansible_collections.python.dist.boo-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for ansible_collections.python.dist.boo-0.1.2-py2.py3-none-any.whl

Total release size: 38.1 kB

Release files / ansible-collections.python.dist.boo-0.1.2.tar.gz

Download URL ansible-collections.python.dist.boo-0.1.2.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
07ed37ce773b1fd6cec1a600f96b009e989d90b972a21084fc3131d4217e408d
BLAKE2b-256 checksum
How to use checksums
bc859a9b3a2ae86f0e6a7b568a95e7d6d43fd1586104d4d05fdd571cf1fb17f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

Release files / ansible_collections.python.dist.boo-0.1.2-py2.py3-none-any.whl

Download URL ansible_collections.python.dist.boo-0.1.2-py2.py3-none-any.whl
Size 17.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6f46cbcc0ab166991f69ce95a662b33f306212c2c7f3c320c60861059b4083e0
BLAKE2b-256 checksum
How to use checksums
6ea318f63aae170c6566f76067c2fc3350388f2105007eeadbad0ee68de6b400
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

Security for ansible-collections.python.dist.boo 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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