Cyclopts

Latest version: v3.11.2

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 12

3.1.2

What's Changed
* Fix `NewType` token count for python >=3.10. by BrianPugh in https://github.com/BrianPugh/cyclopts/pull/265


**Full Changelog**: https://github.com/BrianPugh/cyclopts/compare/v3.1.1...v3.1.2

3.1.1

Bug Fixes
* Correctly handle `NewType` type annotations by BrianPugh in https://github.com/BrianPugh/cyclopts/pull/263


**Full Changelog**: https://github.com/BrianPugh/cyclopts/compare/v3.1.0...v3.1.1

3.1.0

What's Changed
* New attribute `App.sort_key` that controls command-order in the help page. by BrianPugh in https://github.com/BrianPugh/cyclopts/pull/258


**Full Changelog**: https://github.com/BrianPugh/cyclopts/compare/v3.0.1...v3.1.0

3.0.1

Bug Fixes
* Allow for `list[bool]` and similar (list of flags). by BrianPugh in https://github.com/BrianPugh/cyclopts/pull/251


**Full Changelog**: https://github.com/BrianPugh/cyclopts/compare/v3.0.0...v3.0.1

3.0.0

Features
* **Advanced parsing of user-defined classes (including pydantic/attrs/dataclasses/namedtuple).**
* **Support parsing of typeddict/dict.**
* Improved error message precision/accuracy/helpfulness.
* New [convenience types](https://cyclopts.readthedocs.io/en/v3.0.0/api.html#types): `UInt8`, `Int8`, `UInt16`, `Int16`, `Uint32`, `Int32`, `Json`.
* `Number` and `Path` validators now work with sequences (e.g. `list[Path]`).
* Additional `POSITIONAL_ONLY` parameters may follow an iterable `POSITIONAL_ONLY` parameter. This allows for programs like:
python
app.default
def foo(inputs: list[Path], output: Path, /):
pass

bash
$ python my-program.py input_files/*.txt output.txt

* Now supports the bare `--` special token for forcing all subsequent CLI tokens to be parsed as positional argument. This mimics [getopt](https://www.man7.org/linux/man-pages/man3/getopt.3.html) behavior.
* Add "new" group validator `cyclopts.validators.MutuallyExclusive`. Performs same action as the default `LimitedChoice()`, but may be more intuitive/obvious for developers reading application code.
* Improved help-page formatting.
* Various minor bug fixes.

Breaking Changes/Features
* Drop python3.8 support; add python3.13 support.
* Remove `Group.converter` and `App.converter`. Their use-cases are a bit contrived, don't provide much value, and increase the maintenance burden of the Cyclopts codebase.
* Change in custom `Parameter.converter`. Previously, the converter had signature:
python
def converter(type_, *values: str): ...

The new signature is:
python
def converter(type_, tokens: Sequence[Token]): ...

See the new [`Token` class](https://cyclopts.readthedocs.io/en/v3.0.0/api.html#cyclopts.Token). This allows for raising a `CoercionError` for the particular offending token, which will result in a more helpful error message for the user.
* `App.parse_args` and `App.parse_known_args` now return an additional value, `ignored`, which is a dictionary mapping python-variable-names to their type annotation of parameters with `parse=False`.
* Different CLI parsing scheme that is more directly similar to python's function rules. If a python variable is `POSITIONAL_OR_KEYWORD`, and a value is specified by keyword, subsequent `POSITIONAL_OR_KEYWORD` parameters in the function signature must be specified by keyword.

* When an iterable-like datatype is specified by keyword, only a single element's worth of tokens will be consumed. To restore the old behavior where tokens are consumed until an option-like argument is reached, set `Parameter.consume_multiple = True`.
* `Parameter.negative_bool` values must no longer start with `--`. E.g. if it was previously `--no-`, it should now be `no-`. A `ValueError` is raised if it starts with a hyphen.
* `Parameter.negative_iterable` values must no longer start with `--`. E.g. if it was previously `--empty-`, it should now be `empty-`. A `ValueError` is raised if it starts with a hyphen.
* `Parameter.required` field actually impacts whether or not the Parameter is mandatory. Previously it was only reflected in the help page.

2.9.9

What's Changed
* Improve program load-time and `--help` performance. by BrianPugh in https://github.com/BrianPugh/cyclopts/pull/223


**Full Changelog**: https://github.com/BrianPugh/cyclopts/compare/v2.9.8...v2.9.9

Page 5 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.