Skip to main content

COLT: COmmand Line Tool

Simple, extensible tool to create out of the box input files and commandline interfaces for Python, that are type validated. For the input file the ini file-format is used around Python’s configparser.

PyPI version fury.io PyPI download month PyPI license PyPI implementation

Features

  1. Build simple commandline interfaces using the FromCommandline-decorator

# examples/commandline_xrange.py
from colt import from_commandline


@from_commandline("""
# start of the range
xstart = :: int :: >0
# end of the range
xstop = :: int :: >1
# step size
step = 1 :: int
""")
def x_range(xstart, xstop, step):
   for i in range(xstart, xstop, step):
      print(i)

if __name__ == '__main__':
   x_range()
usage: commandline_xrange.py [-h] [-step step] xstart xstop

positional arguments:
   xstart      int, Range(>0)
               start of the range
   xstop       int, Range(>1)
               end of the range

optional arguments:
   -h, --help  show this help message and exit
   -step step  int,
               step size

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.4.0 (2021-6-9)

  • New commandline parser instead of argparse:
    • correct handling of multiple subparser

    • correct parsing of infinit arguments using the list(typ) syntax

    • fully customizable help settings

0.1.0 (2020-8-1)

  • First release on PyPI.

Metadata

Release files for pycolt 0.6.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 pycolt 0.6.0
File Size Uploaded
pycolt-0.6.0.tar.gz 69.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycolt 0.6.0
File Interpreter ABI Platform
pycolt-0.6.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 135.8 kB

Release files / pycolt-0.6.0.tar.gz

Download URL pycolt-0.6.0.tar.gz
Size 69.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0baf234160e65556477207cad09000bf360694470de1ca2aad4065aa569ef57a
BLAKE2b-256 checksum
How to use checksums
5956c491c8b7ab8268eade6b4c272f3db9b8f7a8231a935958c8e9c0f220bbe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.12

Release files / pycolt-0.6.0-py2.py3-none-any.whl

Download URL pycolt-0.6.0-py2.py3-none-any.whl
Size 66.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
40ece25771876d9d3123c45adf87959cbe6fa54a9b083989a7e66d2edbc34f95
BLAKE2b-256 checksum
How to use checksums
47e2286575ddf339d8fbcf5729fbc4f34c65abdf8cd3b63dac5fa456e238a7c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.3

1 release file

0.5.1

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

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

1 release file

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