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)
Arithmos cipher on CLI based

Arithmos Cipher CLI This is the CLI version of Arithmos Cipher. Install pip inst

LyQuid :3 1 Jan 16, 2022
Python implementation of SSH file transfer across servers.

SSH Transfer Python implementation of SSH file transfer across servers. Requirements paramiko=2.7.2 Usage Config Preparation Configure some informatio

Zhe Kong 1 Nov 23, 2021
A supercharged AWS command line interface (CLI).

SAWS Motivation AWS CLI Although the AWS CLI is a great resource to manage your AWS-powered services, it's tough to remember usage of: 70+ top-level c

Donne Martin 5.1k Jan 05, 2023
Wordle helper: help you print posible 5-character words based on you input

Wordle Helper This program help you print posible 5-character words based on you

Gwan Thanakrit Juthamongkhon 4 Jan 19, 2022
A command-line utility that, given a markdown file, checks whether all its links work.

A command-line utility written in Python that checks validity of links in a markdown file.

Teclado 2 Dec 08, 2021
gget is a free and open-source command-line tool and Python package that enables efficient querying of genomic databases.

gget is a free and open-source command-line tool and Python package that enables efficient querying of genomic databases. gget consists of a collection of separate but interoperable modules, each des

Pachter Lab 570 Dec 29, 2022
tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI.

Tox Server tox-server is a command line tool which runs tox in a loop and calls it with commands from a remote CLI. It responds to commands via ZeroMQ

Alexander Rudy 3 Jan 10, 2022
Simple Terminal Styling for Python

escape Escape is a very simple terminal styling library largely inspired by the excellent javascript chalk library. There are other terminal styling l

Syed Abbas 8 Sep 03, 2019
Darkdump - Search The Deep Web Straight From Your Terminal

Darkdump - Search The Deep Web Straight From Your Terminal About Darkdump Darkdump is a simple script written in Python3.9 in which it allows users to

Josh Schiavone 264 Dec 30, 2022
CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM

AWS SAM The AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications. It provides shorthand syntax to e

Amazon Web Services 6.2k Jan 08, 2023
Salesforce object access auditor

Salesforce object access auditor Released as open source by NCC Group Plc - https://www.nccgroup.com/ Developed by Jerome Smith @exploresecurity (with

NCC Group Plc 90 Sep 19, 2022
A command line tool to hide and reveal information inside images (works for both PNGs and JPGs)

ImgReRite A command line tool to hide and reveal information inside images (work

Jigyasu 10 Jul 27, 2022
Squirrel - A cli program to track writing progress

Squirrel Very much a WIP project squirrel is a command line program that tracks you writing progress and gives you useful information and cute and pic

3 Mar 23, 2022
A terminal slots programme in PY

PYSlots PyPI and Test PyPI External Links PyPI Test PyPI Install Look directly at the bugs! Version pip install pyslots "Don't look directly at the bu

Luke Batema 4 Nov 30, 2022
grungegirl is the hacker's drug encyclopedia. programmed in python for maximum modularity and ease of configuration.

grungegirl. cli-based drug search for girls. welcome. grungegirl is aiming to be the premier drug culture application. it is the hacker's encyclopedia

Eristava 10 Oct 02, 2022
Wappalyzer CLI tool to find Web Technologies

Wappalyzer CLI tool to find Web Technologies

GOKUL A.P 17 Dec 15, 2022
A Terminal UI for Discord

ToastCord ToastCord is a Discord Terminal UI. At the moment you can only look at Direct messages. TODO: - Add support for guilds - Message sending sup

toast 82 Dec 18, 2022
Command-line tool to use LNURL with your LND instance

Sprint planner Sprint planner is a Python script for planning your Jira tasks based on your calendar availability. Installation Use the package manage

Djuri Baars 6 Jan 14, 2022
Container images for portable development environments

Docker Dev Spin up a container to develop from anywhere! To run, just: docker run -ti aghost7/nodejs-dev:boron tmux new Alternatively, if on Linux: p

Jonathan Boudreau 163 Dec 22, 2022
Free and Open-Source Command Line tool for Text Replacement

Sniplet Free and Open Source Text Replacement Tool Description: Sniplet is a work in progress CLI tool which can do text replacement globally in Linux

Veeraraghavan Narasimhan 13 Nov 28, 2022