Skip to main content

Cloup

Master branch

Tests status Coverage Status Documentation Status (master branch)

Latest release

Latest release on PyPI Supported versions Documentation Status (latest release)

Cloup (= Click + groups) contains a set of Click extensions that enable you to:

  • define option groups with a clean API;

  • define constraints, including conditional constraints, on any group of parameters (e.g. mutually_exclusive, RequireAtLeast(1) etc.);

  • (optionally) show an auto-generated description of defined constraints in the command help;

  • organize the subcommands of a MultiCommand in multiple help sections.

These features are implemented in three mixins following the same pattern of click-contrib extensions. For ease of use, Cloup also provides:

  • its own versions of Click commands, obtained by mixing Click classes with the mixins mentioned above;

  • its own versions of Click decorators, for creating such commands.

Documentation

Read more in the documentation:

Change Log

V0.5.0 (2021-02-10)

Requirements

  • Drop support to Python 3.5.

Deprecated

  • GroupSection was renamed as Section.

Compatible changes and features

  • Added a subpackage for defining constraints on parameters groups (including OptionGroup’s).

  • The code for adding support to option groups was extracted to OptionGroupMixin.

  • Most of the code for adding support to subcommand sections was extracted to SectionMixin.

Project changes

  • Migrated from TravisCI to GitHub Actions.

v0.4.0 (2020-01-10)

Requirements

  • This is the last release officially supporting Python 3.5.

Compatible changes and features

  • Changed the internal (non-public) structure of the package.

  • Minor code improvements.

Repository-wise:

  • New documentation (hosted by ReadTheDocs)

  • Tox, TravisCI, Makefile completely rewritten.

v0.3.0 (2020-03-26)

Backward incompatible API changes

  • option_groups decorator now takes options as positional arguments *options;

  • Group.section decorator now takes sections as positional arguments *sections;

  • align_sections_help was renamed to align_sections;

  • GroupSection.__init__() sorted_ argument was renamed to sorted.

Other changes

  • Additional signature for option_group: you can pass the help argument as 2nd positional argument.

  • Aligned option groups (option align_option_groups with default True).

  • More refactoring and testing.

v0.2.0 (2020-03-11)

  • [Feature] Add possibility of organizing subcommands of a cloup.Group in multiple help sections.

  • Various code improvements.

  • Backward incompatible change:
    • rename CloupCommand and CloupGroup resp. to just Command and Group.

v0.1.0 (2020-02-25)

  • First release on PyPI.

Metadata

Release files for cloup 0.5.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 cloup 0.5.0
File Size Uploaded
cloup-0.5.0.tar.gz 65.6 kB Details

Built distribution (wheel)

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

Total release size: 87.4 kB

Release files / cloup-0.5.0.tar.gz

Download URL cloup-0.5.0.tar.gz
Size 65.6 kB
Tags Source
SHA-256 checksum
How to use checksums
af736527166a322cb6e1e97b334fa7c937b621b93a0d640ffca2db72af06df2d
BLAKE2b-256 checksum
How to use checksums
af467f3dc0a949418dccbdb16ab3289423fd656f223aac5367c1dac0b50dfd70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.2

Release files / cloup-0.5.0-py2.py3-none-any.whl

Download URL cloup-0.5.0-py2.py3-none-any.whl
Size 21.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ab9a2baf0215e22e3b8e9f82328cd9ea5b103a327554047dd797c4594b55a90d
BLAKE2b-256 checksum
How to use checksums
5603e4d45d9e78687b29a8190deea33d57b74a31e47ed5b3e494b677c302fd5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.2

Release history Release notifications | RSS feed

4.0.0

2 release files

3.1.0

2 release files

3.0.9

2 release files

3.0.8

2 release files

3.0.7

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

This release

0.5.0 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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