Skip to main content

CruxPy

The package contain classes helpful in dealing with Crux ports. At the moment the main usage is for creation of the ports collection website.

Classes

page

The class to prepare a website for a Crux ports repository.

The constructor takes 4 parameters:

  • the path to a directory with a collection (defaults to './')
  • name of the header file to use. (defaults to the 'header.html' from module 'files' folder) Header is content of the page over the table.
  • style name, where the style is the name of one the style from the 'files' folder of the module. (The default is 'original').
  • if the page should use git information to define the update date (default is true)

Methods

  • read_repo(): read ports information for the repo

  • generate_page(): creates HTML page

  • write(): saves the page to a file (default is 'index.html')

  • write_style(): saves css style file. It's going to be called 'style.css' and save to a given path (default is './')

  • content of a page 'header', which is a html code over the table containing port informations. By default it looks for a collection in current folder ., and html from the files/header.html file. It can also copy the style file from the project repo to the selected location. This method requires a style name as an argument, but save the css file into the current location by default.

port

The class to get information from a Crux port. The constructor requires the path to the port as the input. Additionally, boolean to control if git information should be use to populate update files is optional.

Methods:

  • last_update(): get git information about the latest update to the port
  • expose_pkgfile(): expose metadata from the Pkgfile

Examples

There a few examples of usages in the examples folder.

Development

It is fine to commit changes directly to the repo trunk branch. The python package changes will be only visible if the version is changed in the pyproject.toml configuration file.

Tests

Basic pytest are located in the tests folder

GitHub action

There are a few GitHub Action workflows.

  • commit: On every commit, GHA checks if there is a new version in pyproject.toml file. If there is one the new tag is created.
  • release: Every new tag triggers a release workflow, which generate a GitHub release
  • publish: The release workflow triggers another one which builds and publishes python package to the pypi

Metadata

Release files for cruxpy 0.2.4

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

Source distribution (sdist)

Source distribution for cruxpy 0.2.4
File Size Uploaded
cruxpy-0.2.4.tar.gz 18.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cruxpy 0.2.4
File Interpreter ABI Platform
cruxpy-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 36.7 kB

Release files / cruxpy-0.2.4.tar.gz

Download URL cruxpy-0.2.4.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
917a3bb0a5666c5e799871285c285ada4a37a05acef1a1a3d10fbadcd957caff
BLAKE2b-256 checksum
How to use checksums
6604d6daeaa6d0d456e4ef483bd521975afca9a558ee349250aac9b28dc6589f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 28, 2026.

Transparency log

Release files / cruxpy-0.2.4-py3-none-any.whl

Download URL cruxpy-0.2.4-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
908cbd374cff3b4391216ec736a5ab1aa21eb81b4019d73f34be4092526c41e8
BLAKE2b-256 checksum
How to use checksums
de904653fab25fd1e19f2fe363d7c0e4359887ec0302974418389b9ce162d0ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.3

2 release files

0.0.2

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