Skip to main content

Commandfile

PyPI version Build status Coverage Status License

Purpose and scope

Commandfile defines a file format to pass arguments and runtime metadata to executables. Its intended use case is to simplify and harmonize the calling convention of scientific modules in the LISA Scientific Ground Segment.

Usage

This project provides a drop-in replacement for the ArgumentParser provided by argparse.

# example.py
from commandfile.argparse import CommandfileArgumentParser as ArgumentParser

parser = ArgumentParser()
parser.add_argument("--some-value", type=int, required=True)
args = parser.parse_args()
print(args.some_value)

When using this parser, your program can either be executed by passing arguments on the command-line, or by providing a single --commandfile argument compliant with the file format specification. When developing locally, both approaches can be combined, the command-line arguments overriding the arguments specified in the commandfile.

$ cat example-cmdfile.yaml
header:
  version: 1.21.4
parameters:
  - key: some-value
    value: '42'
inputs: []
outputs: []
$ example.py --commandfile example-cmdfile.yaml
42
$ example.py --commandfile example-cmdfile.yaml --some-value 24
24

Metadata

Release files for commandfile 0.2.0

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

Source distribution (sdist)

Source distribution for commandfile 0.2.0
File Size Uploaded Provenance Actions
commandfile-0.2.0.tar.gz 42.9 kB Without provenance Details for commandfile-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 52.2 kB

Release files / commandfile-0.2.0.tar.gz

Download URL commandfile-0.2.0.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3c92193ff3ffac440c73cda94e84cd9278370659fd23d247a08a1070a6f61192
BLAKE2b-256 checksum
How to use checksums
5d0e6074f9c5aa0f8ef8b9cd2e666fceef0d7d9b948ba7029e853fdfb4ed3d8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.9

Release files / commandfile-0.2.0-py3-none-any.whl

Download URL commandfile-0.2.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac5c2c329426a0db333e34892acf103f4ed61df843105cfa46b279cd2ffc0d9d
BLAKE2b-256 checksum
How to use checksums
d2893b9b3272104ac9a82c15356770874d60a34775da774c987e740d27e421b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.9

Security for commandfile 0.2.0

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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