Enriches Click with option groups, constraints, command aliases, help sections for subcommands, themes for --help and other stuff.

Overview

Click + option groups + constraints + aliases + help themes + ...

https://cloup.readthedocs.io/


Overview

Latest release on PyPI Supported versions Tests status Coverage Status Documentation Status (master branch) Donate with PayPal

Cloup — originally from "Click + option groups" — enriches Click with several features that make it more expressive and configurable:

  • option groups
  • constraints, like mutually_exclusive, that can be applied to any group of parameters, even conditionally
  • subcommand aliases
  • subcommands sections, i.e. the possibility to organize the subcommands of a Group in multiple help sections
  • a themeable HelpFormatter that:
    • has more parameters for adjusting widths and spacing, which can be provided at the context and command level
    • use a different layout when the terminal width is below a certain threshold in order to improve readability
  • suggestions like "did you mean ?" when you mistype a subcommand.

Moreover, Cloup improves on IDE support providing decorators with detailed type hints and adding the static methods Context.settings() and HelpFormatter.settings() for creating dictionaries of settings.

Cloup is extensively tested and documented. Tests are run against multiple versions of Python (>=3.6) and Click (>=7.2).

A simple example

from cloup import (
    HelpFormatter, HelpTheme, Style,
    command, option, option_group
)
from cloup.constraints import RequireAtLeast, mutually_exclusive

# Check the docs for all available arguments of HelpFormatter and HelpTheme.
formatter_settings = HelpFormatter.settings(
    theme=HelpTheme(
        invoked_command=Style(fg='bright_yellow'),
        heading=Style(fg='bright_white', bold=True),
        constraint=Style(fg='magenta'),
        col1=Style(fg='bright_yellow'),
    )
)

# In a multi-command app, you can pass formatter_settings as part
# of your context_settings so that they are propagated to subcommands.
@command(formatter_settings=formatter_settings)
@option_group(
    "Cool options",
    option('--foo', help='This text should describe the option --foo.'),
    option('--bar', help='This text should describe the option --bar.'),
    constraint=mutually_exclusive,
)
@option_group(
    "Other cool options",
    "This is the optional description of this option group.",
    option('--pippo', help='This text should describe the option --pippo.'),
    option('--pluto', help='This text should describe the option --pluto.'),
    constraint=RequireAtLeast(1),
)
def cmd(**kwargs):
    """This is the command description."""
    pass

if __name__ == '__main__':
    cmd(prog_name='invoked-command')

Basic example --help screenshot

If you don't provide --pippo or --pluto:

Usage: invoked-command [OPTIONS]
Try 'invoked-command --help' for help.

Error: at least 1 of the following parameters must be set:
  --pippo
  --pluto

Supporting the project

Designing, testing and documenting a library takes a lot of time. The most concrete way to show your appreciation and to support future development is by donating. Any amount is appreciated.

Donate with PayPal

Apart from that, you can help the project by starring it on GitHub, reporting issues, proposing improvements and contributing with your code!

Links

Comments
  • Nested option groups with constraints

    Nested option groups with constraints

    • cloup version: 0.7 (or latest)
    • Python version: 3.7
    • Operating System: OS X

    Description

    I am trying to create a group of options with a seemingly complex, but perhaps not, constraint system. I basically have 5 parameters that I want to house in one group, that are a combination of required and mutually exclusive, and at least x. For example, options: A, B, C, D, and E. D and E are an "all_or_none" group. C and D+E are "mutually_exclusive" group, but at least one is required. B is required with one of (C,D+E). And either A or group (B + (C or D+E)) is required. Is this possible? It's not clear to me if nested option groups are possible, i.e. if I can create one option_group with a constraint and apply a constraint on top of it as part of another option_group.

    I just discovered this code and am digging into the docs, so perhaps the answer is buried in there.

    something like the following...

    OptionGroup(
      A,
      OptionGroup(
        B, required=True,
        OptionGroup(
          C,
          OptionGroup(
            D,
            E
            constraint=all_or_none),
        constraint=mutually_exclusive
        ),
      constraint=RequireAtLeast(1)
      ),
    constraint=RequireAtLeast(1)
    )
    

    or would I do something like

    OptionGroup(
      A,
      B,
      C,
      D,
      E,
      constraint="some defined complex conditional constraint"
    )
    
    opened by havok2063 10
  • Add support for option groups on `cloup.Group`

    Add support for option groups on `cloup.Group`

    This is explicitly mentioned in the documentation as not supported on purpose. But the documentation also ask for feedbacks on potential use-cases. Here is mine.

    My mpm CLI has a total of 15 common options shared by 10 sub-commands. To reduce code duplication, I naturally used a cloup.group decorator, and it works great.

    Now, To make things easier to apprehend to users, I'd like to group some of these common options by family. I'd like for instance to regroup --manager, --exclude, --all-managers and --xkcd options under the "Package manager selection options" banner. Unfortunately I can't because cloup.group does't support option groups.

    Is this a valid case for considering adding this feature? Note that I do not need to apply any constraint (yet?), so implementation can exclude constraints.

    enhancement 
    opened by kdeldycke 8
  • Add loading of options from a TOML configuration file

    Add loading of options from a TOML configuration file

    I'd like to propose the addition of a feature that will add some configuration file loading facilities.

    I developed some reusable generic code for my meta-package-manager CLI that parse a TOML file and load up its content right into the structure defined by the CLI option schema.

    This code is available at: https://github.com/kdeldycke/meta-package-manager/blob/develop/meta_package_manager/config.py

    With some effort I'm pretty sure it can be added as a generic feature to cloup. What's your opinion @janluke?

    enhancement 
    opened by kdeldycke 8
  • Case-insensitive command names/aliases

    Case-insensitive command names/aliases

    It would be nice to have an option to make command names and aliases case-insensitive. For now, I implemented this in my code by stealing CaseInsensitiveDict from requests, but it can probably be implemented natively without that dependency.

    from requests.utils import CaseInsensitiveDict
    
    
    class CaseInsensitiveGroup(cloup.Group):
        def __init__(self, *args, **kwargs):
            super().__init__(*args, **kwargs)
            self.alias2name = CaseInsensitiveDict()
    
    enhancement 
    opened by 0xallie 7
  • Predicate operators (& and |) raising AttributeError

    Predicate operators (& and |) raising AttributeError

    • cloup version: 0.7
    • Python version: 3.9
    • Operating System: mac arm64

    Description

    Dear @janLuke ,

    I am currently working on a switchover for our library wetterdienst [1]. Therewith I'm currently moving our client accessor to click, however as we have certain mixing arguments for some functions I was happy to find that you are working on making this easier allowing to check for conditions. First of all thanks for your much needed work!

    I'd like to add the following condition where the user can either supply rank or distance which in combination with provided longitude and latitude is used for geo filtering of some weather stations.

    @cloup.option_group(
        "Latitude-Longitude rank filtering",
        cloup.option("--latitude", type=click.FLOAT),
        cloup.option("--longitude", type=click.FLOAT),
        cloup.option("--rank", type=click.INT),
        cloup.option("--distance", type=click.FLOAT),
        constraint=If(
            IsSet("latitude") & IsSet("longitude"),
            then=RequireExactly(3),
            else_=cloup.constraints.accept_none),
    )
    

    However as far as it goes it would only give me a nice help text but when running the command with arguments it ends up with

    Traceback (most recent call last):
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/wetterdienst/ui/cli.py", line 736, in <module>
        wetterdienst()
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/click/core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/click/core.py", line 782, in main
        rv = self.invoke(ctx)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/click/core.py", line 1257, in invoke
        sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/click/core.py", line 700, in make_context
        self.parse_args(ctx, args)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/cloup/constraints/_support.py", line 104, in parse_args
        constr.check_values(ctx)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/cloup/constraints/_support.py", line 49, in check_values
        self.constraint.check_values(self.params, ctx)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/cloup/constraints/_conditional.py", line 49, in check_values
        condition_is_true = condition(ctx)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/cloup/constraints/conditions.py", line 104, in __call__
        return all(c(ctx.params) for c in self.predicates)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/cloup/constraints/conditions.py", line 104, in <genexpr>
        return all(c(ctx.params) for c in self.predicates)
      File "/Users/benjamin/DEV/earth_observations/sources/wetterdienst/.venv/lib/python3.9/site-packages/cloup/constraints/conditions.py", line 136, in __call__
        if not isinstance(ctx.command, ConstraintMixin):
    AttributeError: 'dict' object has no attribute 'command'
    

    Is there a way to achieve what I'm planning with the current status of the library?

    Again, thanks a lot for your work here! Much appreciated!

    [1] https://github.com/earthobservations/wetterdienst

    Edit Got it working by making the first two arguments required like

    @cloup.option_group(
        "Latitude-Longitude rank filtering",
        cloup.option("--latitude", type=click.FLOAT, required=True),
        cloup.option("--longitude", type=click.FLOAT, required=True),
        cloup.option("--rank", type=click.INT),
        cloup.option("--distance", type=click.FLOAT),
        constraint=RequireExactly(3)
    )
    

    Is this the recommend way of setting the constraints?

    bug 
    opened by gutzbenj 7
  • Rename `sorted` attribute of `Section` to `is_sorted` to solve conflict with `Section.sorted` static method

    Rename `sorted` attribute of `Section` to `is_sorted` to solve conflict with `Section.sorted` static method

    Mypy seems to give one type-checking error (on the master branch).

    cloup/_sections.py:68: error: Function "Callable[[str, Union[Iterable[Command], Dict[str, Command]]], Section]" could always be true in boolean context  [truthy-function]
    

    This evidently arises because Section has both an instance variable named sorted (a bool) and a class method named sorted too. I very much think it would be worth renaming one of these variables, since it's only going to create confusion and type-checking complications. (You're already having to use type: ignore marker in the constructor.)

    typing breaking change 
    opened by alexreg 6
  • Require one constraint prevents subcommand help from working

    Require one constraint prevents subcommand help from working

    Bug description

    If I create a command group that has an option group with the require_one constraint, and then add a subcommand to that group, I am unable to run --help on the subcommand without passing one of the required options at the group level.

    To Reproduce

    # test.py
    import cloup
    from cloup.constraints import require_one
    
    
    @cloup.group()
    @cloup.option_group(
        "credentials",
        cloup.option("--foo", help="foo"),
        cloup.option("--bar", help="bar"),
        constraint=require_one,
    )
    def cli(foo, bar):
        "Top level group text."
    
    
    @cli.command()
    def subcommand():
        """Subcommand help text."""
    
    
    if __name__ == "__main__":
        cli()
    
    python test.py subcommand --help
    

    Expected behavior

    Help text of subcommand is printed:

    python test.py subcommand --help
    Usage: test.py subcommand [OPTIONS]
    
      Subcommand help text.
    
    Options:
      --help  Show this message and exit.
    

    Actual behavior

    An error is printed due to one of the required group options not being specified.

    python test.py subcommand --help
    Usage: test.py [OPTIONS] COMMAND [ARGS]...
    Try 'test.py --help' for help.
    
    Error: exactly 1 of the following parameters must be set:
      --foo
      --bar
    
    bug 
    opened by ryancausey 5
  • `SectionMixin`: `super().__init__` should be called at the beginning of `__init__`

    `SectionMixin`: `super().__init__` should be called at the beginning of `__init__`

    ... it's necessary to set self.chain before the rest of the code runs — otherwise you can get an error about the chain attribute not existing, in some cases.

    Originally posted by @alexreg in https://github.com/janluke/cloup/pull/116#discussion_r873250465

    opened by janluke 5
  • Mypy fails in strict mode

    Mypy fails in strict mode

    Bug description

    Mypy fails to type-check code that uses Cloup, when in strict mode. (Note, this is in contrast with Click, which Mypy has no problem with.)

    To Reproduce

    Steps to reproduce the behavior:

    1. Install Cloup, e.g., using pip3 install cloup.
    2. Create file foo.py with the following contents.
    import cloup
    
    class Context(cloup.Context):
        pass
    
    1. Run mypy --strict foo.py.
    2. Observe errors in output.5.
    foo.py:4: error: Name "cloup.Context" is not defined
    foo.py:4: error: Class cannot subclass "Context" (has type "Any")
    Found 2 errors in 1 file (checked 1 source file)
    

    Expected behavior

    Mypy should not give any errors.

    Versions

    macOS 12.3.1 Python 3.9.12 Cloup 0.14.0

    opened by alexreg 5
  • Rename `Argument.help_record` to `get_help_record` + fix typos

    Rename `Argument.help_record` to `get_help_record` + fix typos

    • Rename Argument.help_record to Argument.get_help_record, to bring the name into line with Option.get_help_record (in Click).
    • Typos.
    • Handle None returned by Argument.get_help_record.
    • Handle case of empty sequence passed to text_rows param of HelpFormatter._get_row_sep_for.

    Edited by @janluke

    opened by alexreg 5
  • AnySet/AllSet throws AttributeError

    AnySet/AllSet throws AttributeError

    Thanks for this awesome package!

    Bug description

    I get a …

      File "cloup/_commands.py", line 87, in make_context
        self.parse_args(ctx, args)
      File "cloup/constraints/_support.py", line 178, in parse_args
        constr.check_consistency()
      File "cloup/constraints/_support.py", line 108, in check_consistency
        self.constraint.check_consistency(self.params)
    AttributeError: 'AnySet' object has no attribute 'check_consistency'
    

    … whenever I try to use the AnySet or AllSet constraint.

    My env:

    • Python==3.6.9
    • cloup==0.14.0
    • click==8.0.4 (latest for Python 3.6)

    To Reproduce

    Minimal example:

    @cloup.constraint(
        cloup.constraints.AnySet('files1', 'filelist1'),
        ['strings1', 'files1', 'filelist1'])
    

    What I need AnySet for:

    @cloup.option('-f', '--show-files', is_flag=True, help='print file names themselves instead of indices')
    @cloup.option_group(
        'list to be replaced',
        cloup.option('--strings1', cls=OptionEatAll, type=tuple, help='as strings'),
        cloup.option('--files1', cls=OptionEatAll, type=tuple, help='as file paths of strings'),
        cloup.option('--filelist1', type=cloup.File('r'), help='as text file with file paths of strings'),
        constraint=cloup.constraints.If('show_files',
                                        then=cloup.constraints.AnySet('files1', 'filelist1'),
                                        else_=cloup.constraints.require_one)
    )
    
    opened by bertsky 5
  • Use isort and a code formatter

    Use isort and a code formatter

    black is the obvious choice but I tend to dislike it, especially for CLI code, which tends to take too much vertical space when formatted with black.

    The tools should be integrated with tox and github actions.

    chore 
    opened by janluke 1
  • Optional parenthesis for `@command` and `@option`

    Optional parenthesis for `@command` and `@option`

    Since Click 8.1.0, we can use command and group decorators without parenthesis. See:

    • https://github.com/pallets/click/pull/1896
    • https://github.com/pallets/click/issues/1359

    Nothing important here but a nice little nitpick. Not certain if it is worth considering for integration in cloup.

    enhancement 
    opened by kdeldycke 4
  • Lazy loading of commands

    Lazy loading of commands

    Inspired by

    • https://github.com/janluke/cloup/discussions/102

    In this answer, I propose a possible solution:

    Give a look to this example: https://github.com/janluke/cloup/tree/lazy-loading-example/examples/lazy_loading.

    The idea is that rather than extending a MultiCommand, I define proxies (LazyCommand and LazyGroup) for lazy-loaded commands. Then I use those lazy commands as if they were normal commands.

    Nonetheless, I've never used lazy loading in my programs, so I'd appreciate feedback on this. Also, if you are interested in this feature, please let me know with a thumb up.

    under consideration feedback appreciated feature 
    opened by janluke 0
  • Styling metavars, default values, env var, choices...

    Styling metavars, default values, env var, choices...

    This feature can be implemented in multiple PRs but it's likely that the required changes for styling one of the elements will make easy to style the others. In that case, a single PR will probably be enough.

    • [ ] metavars (including choices)
    • [ ] default values
    • [ ] environmnent variables.

    Originally proposed in #95. Closed that one because it proposes a specific regex-based approach that I think it's not suitable for Cloup. This issue is for discussing different approaches, just in case anyone would like to.

    Questions:

    • is the needed work worth it or the current theming is good enough?
    • given that, in theory, Click will have a new formatting system soon or later, is this the right time to implement this feature?
    • wouldn't be better to change approach completely and show a web page when the user type --help and there's a browser available (similarly to git)? Command line will never be more readable :)
    enhancement low priority 
    opened by janluke 0
  • Typing workarounds and list of relevant mypy issues

    Typing workarounds and list of relevant mypy issues

    Cloup currently uses overloading (and a lot of ugly signature replication) to work around mypy limitations These are a couple of relevant MyPy issues that when solved may improve the situation:

    • https://github.com/python/mypy/issues/3737 This would make overloading unneded

    • https://github.com/python/mypy/issues/4441 This would allow me to avoid replication of kwargs annotations

    typing 
    opened by janluke 0
Releases(v2.0.0)
  • v2.0.0(Nov 13, 2022)

    What's Changed

    Breaking Changes

    • Rename sorted attribute of Section to is_sorted by @alexreg in https://github.com/janluke/cloup/pull/142
    • (Not really a breaking change but some people may consider it one) Rename __constraints attribute to __cloup_constraints__ by @pocek in https://github.com/janluke/cloup/pull/132

    New features and enhancements

    • Rename __constraints attribute to __cloup_constraints__ by @pocek in https://github.com/janluke/cloup/pull/132
    • Standardize formats of error messages by @alexreg in https://github.com/janluke/cloup/pull/141
    • Rename sorted attribute of Section to is_sorted by @alexreg in https://github.com/janluke/cloup/pull/142

    Other Changes

    • Start testing against python 3.11 by @janluke in https://github.com/janluke/cloup/pull/134
    • Stop using deprecated pytest.warns(None) by @janluke in https://github.com/janluke/cloup/pull/136
    • Other project improvements.

    New Contributors

    • @pocek made their first contribution in https://github.com/janluke/cloup/pull/132

    Full Changelog: https://github.com/janluke/cloup/compare/v1.0.2...v2.0.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Nov 4, 2022)

    What's Changed

    • Skip constraints checking when --help is passed by @janluke in https://github.com/janluke/cloup/pull/130

    Full Changelog: https://github.com/janluke/cloup/compare/v1.0.1...v1.0.2

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Sep 21, 2022)

    What's Changed

    • Show a helpful error message when trying to use command decorators without parenthesis by @janluke in https://github.com/janluke/cloup/pull/128
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Jul 17, 2022)

    What's Changed

    • Drop support for Python 3.6. Python 3.6 ha reached end-of-life in Dec 2021 and it’s not officially supported by Click 8. From https://pypistats.org/packages/cloup, I can see that about 37% of people are still using Python 3.6. If you can’t easily upgrade, you can either pin cloup version to 0.15.1 or, going on, you may still be able to use Cloup by installing the dataclasses backport package and using a compatible version of Click.
    • Drop support for Click 7.
    • Start running tests on Python 3.10.
    • Upgrade dev dependencies by @janluke in https://github.com/janluke/cloup/pull/125

    Full Changelog: https://github.com/janluke/cloup/compare/v0.15.1...v1.0.0

    Source code(tar.gz)
    Source code(zip)
  • v0.15.1(Jun 26, 2022)

    What's Changed

    • Work around Click bug: make decorators returned by @argument reusable (and more) by @janluke in https://github.com/janluke/cloup/pull/124
    • Fix some type annotations, e.g. ParamTypeLike (https://github.com/janluke/cloup/commit/cecc0961e049577a035b5edab254801adf8ff0ce)

    Full Changelog: https://github.com/janluke/cloup/compare/v0.15.0...v0.15.1

    Source code(tar.gz)
    Source code(zip)
  • v0.15.0(Jun 16, 2022)

    What's Changed

    • Rename Argument.help_record to get_help_record + fix typos by @alexreg in https://github.com/janluke/cloup/pull/116
    • Move calls to super().__init__ forward by @alexreg in https://github.com/janluke/cloup/pull/119
    • Fix title of default option group when the only other visible section is "Positional arguments" by @janluke in https://github.com/janluke/cloup/pull/120
    • Make cloup pass mypy --strict by @janluke in https://github.com/janluke/cloup/pull/122

    New Contributors

    • @alexreg made their first contribution in https://github.com/janluke/cloup/pull/116

    Full Changelog: https://github.com/janluke/cloup/compare/v0.14.0...v0.15.0

    Source code(tar.gz)
    Source code(zip)
  • v0.14.0(May 9, 2022)

    New features and enhancements

    • You can show a "Positional arguments" help section by passing a non-empty help description for at least one of the arguments of a command/group. #113
    • cloup.Group now extends cloup.Command and, as a consequence, supports option groups and constraints. #113
    • GroupedOption is now an alias of cloup.Option.
    • Add the new params Click argument to @command and @group signatures. This argument is supported only for click >= 8.1.0. See https://github.com/pallets/click/pull/2203.

    Breaking changes

    This release introduces some breaking changes, but nothing relevant for most users. You'll need to make changes if you've imported and used Cloup mixins directly, for example in order to add support for option groups and constraints to Group (now you can just use cloup.Group).

    • BaseCommand was removed. This shouldn't cause any issue to anybody.
    • cloup.Group extends cloup.Command, similarly as click.Group extends click.Command.
    • OptionGroupMixin.format_options was renamed to format_params. This means you can't just mix it with click.Command to print help sections for option groups, you have to override format_help and call format_params.
    • The new format_params doesn't call super().format_commands as format_options did: that's what Click does and Cloup (reluctantly) did. Now, instead, cloup.Command calls format_params in format_help and then, for multi-commands, calls format_commands directly.
    • ConstraintMixin.format_help was removed. This means you can't just mix it with a click.Command to make it print the "Constraints" help section, you need to call format_constraints explicitly in your command format_help.

    On the website: https://cloup.readthedocs.io/en/v0.14.0/pages/changelog.html#v0-14-0-2022-05-09 All commits: https://github.com/janluke/cloup/compare/v0.13.1...v0.14.0

    Source code(tar.gz)
    Source code(zip)
  • v0.13.1(May 8, 2022)

    What's Changed

    • Fix: non normalized help and epilog text when using click 8.1.0 by @janluke in https://github.com/janluke/cloup/pull/110

    Full Changelog: https://github.com/janluke/cloup/compare/v0.13.0...v0.13.1

    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(Mar 28, 2022)

    What's Changed

    • Add utility functions for creating click.Path (using pathlib by default) by @janluke in https://github.com/janluke/cloup/pull/104

    Full Changelog: https://github.com/janluke/cloup/compare/v0.12.1...v0.13.0

    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Sep 17, 2021)

  • v0.11.0(Aug 5, 2021)

    No major changes in this release, just refinements.

    • Attributes of parametric constraints are now public. #82
    • Slightly changed the repr() of RequireExactly(3): from RequireExactly(n=3) to RequireExactly(3).
    • Minor code refactoring.
    • Docs fixes and improvements.

    This is probably going to be the last release before v1.0.0.

    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Jul 13, 2021)

  • v0.9.1(Jul 3, 2021)

    • Fixed bug: shell completion breaking because Cloup checking constraints despite ctx.resilient_parsing=True
    • Added public attributes to ConstraintMixin: optgroup_constraints, param_constraints and all_constraints.
    • Cleaned up code and added other type hints (to internal code).
    • Fixed and improved docs. Fixed dark theme styling.
    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Jun 30, 2021)

    Summary

    • Enhanced IDE experience thanks to the detailed type hints for @command, @group, @argument and @option. #47, #50
    • You can now use constraints as decorators to avoid specifying parameters by name. [Breaking change]. #8
    • The formatter setting row_sep can now take a RowSepPolicy that decides whether to use a row separator (e.g. an empty line) for each definition list independently, e.g. based on the number of definitions taking multiple lines. #37
    • Added the require_any and require_one constraints (as aliases). #57
    • Simplified and improved the error argument of Rephraser. Reusing the original error message to add extra info is easy now. #54
    • A few minor bugs were fixed.
    • Made the docs more readable.

    Details

    You can find a much more detailed changelog on the website: https://cloup.readthedocs.io/en/stable/pages/changelog.html#v0-9-0-2021-06-30

    Source code(tar.gz)
    Source code(zip)
    cloup-0.9.0-py2.py3-none-any.whl(45.42 KB)
  • v0.3.0(Mar 26, 2020)

    Backwards incompatible API changes

    • option_groups decorator now takes the list of options as positional arguments *options;
    • Group.section decorator now takes the list of sections as positional arguments *sections;
    • The argument align_sections_help of Group (and group()) was renamed to align_sections;
    • The argument sorted_ of GroupSection.__init__() 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.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Mar 13, 2020)

    New features

    • Add possibility of organizing subcommands of a cloup.Group in multiple help sections (#1).
    • Various code improvements.

    Backward incompatible changes

    • Rename CloupCommand and CloupGroup resp. to just Command and Group.
    Source code(tar.gz)
    Source code(zip)
Python command line tool and python engine to label table fields and fields in data files.

Python command line tool and python engine to label table fields and fields in data files. It could help to find meaningful data in your tables and data files or to find Personal identifable informat

APICrafter 22 Dec 05, 2022
A Python-based command prompt concept which includes windows command emulation.

PythonCMD A Python-based command prompt concept which includes windows command emulation. Current features: echo: Input your message and it will be cl

1 Feb 05, 2022
Autosub - Command-line utility for auto-generating subtitles for any video file

Auto-generated subtitles for any video Autosub is a utility for automatic speech recognition and subtitle generation. It takes a video or an a

Anastasis Germanidis 3.9k Jan 05, 2023
Pynavt is a cli tool to create clean architecture app for you including Fastapi, bcrypt and jwt.

Pynavt _____ _ | __ \ | | | |__) | _ _ __ __ ___ _| |_ | ___/ | | | '_ \ / _` \ \ / /

Alejandro Castillo 1 Dec 13, 2021
Key-control - A tool for add keys to your Termux app

Key-Control Is a tool for add keys to your Termux app. Cara Penginstalan $ pkg u

Beereva.id 1 Feb 14, 2022
Easy-to-use terminal program that can compile your code.

Description Easy-to-use terminal program that can compile your code. Installition 1. Cloning repository $ git clone https://github.com/DarkJoij/Compil

DarkJoij 1 Oct 21, 2021
Phishing-Detective is a command line application for Windows 10 built to detect a phishing site from two url's

Phishing-Detective Phishing-Detective is a command line application for Windows 10 built to detect a phishing site from two url's How it works A simpl

2 Jun 23, 2022
PdpCLI is a pandas DataFrame processing CLI tool which enables you to build a pandas pipeline from a configuration file.

PdpCLI Quick Links Introduction Installation Tutorial Basic Usage Data Reader / Writer Plugins Introduction PdpCLI is a pandas DataFrame processing CL

Yasuhiro Yamaguchi 15 Jan 07, 2022
inklayers is a command line program that exports layers from an SVG file.

inklayers is a command line program that exports layers from an SVG file. It can be used to create slide shows by editing a single SVG file.

11 Mar 29, 2022
Unpacks things.

$ unp_ unp is a command line tool that can unpack archives easily. It mainly acts as a wrapper around other shell tools that you can find on v

Armin Ronacher 405 Jan 03, 2023
Generate folder trees directly from the terminal.

Dir Tree Artist 🎨 🌲 Intro Easily view folder structure, with parameters to sieve out what you want. Choose to exclude files from being viewed (.git,

Glenda T 0 May 17, 2022
This is a simple Termo application in command line style

my-termo This is a simple Termo application in command line style. This app run a Linux crontab task every day to get a new word. Type termo in your t

Gustavo Soares 1 Feb 14, 2022
CLI Utility to encode and recursively recreate directories with ffmpeg.

FFenmass CLI Utility to encode and recursively recreate directories with ffmpeg. Report Bug · Request Feature Table of Contents Getting Started Prereq

George Av. 8 May 06, 2022
Convert markdown to HTML using the GitHub API and some additional tweaks with Python.

Convert markdown to HTML using the GitHub API and some additional tweaks with Python. Comes with full formula support and image compression.

phseiff 70 Dec 23, 2022
MsfMania is a command line tool developed in Python that is designed to bypass antivirus software on Windows and Linux/Mac in the future

MsfMania MsfMania is a command line tool developed in Python that is designed to bypass antivirus software on Windows and Linux/Mac in the future. Sum

446 Dec 21, 2022
A simple command line tool for changing the icons of folders or files on MacOS.

Mac OS File Icon Changer Description A small and simple script to quickly change large amounts or a few files and folders icons to easily customize th

Eroxl 3 Jan 02, 2023
A powerful, colorful, beautiful command-line-interface for pypi.org

pypi-command-line pypi-command-line is a colorful, powerful, and beautiful command line interface for pypi.org that is actively maintained Detailed Do

Wasi Master 32 Jun 23, 2022
Sebuah tools agar tydak menjadi sider :v vrohh

Sebuah tools agar tydak menjadi sider :v vrohh

xN7-SEVEN 1 Mar 27, 2022
Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer or phone

Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer

LightYagami17 5 Nov 22, 2022
👻 Ghoul is an easy to use information service, allowing you to get/add information on someone or something directly from your terminal.

👻 Ghoul is an easy to use information service, allowing you to get/add information on someone or something directly from your terminal. It c

Billy 11 Nov 10, 2021