v3.2.0
Features
- Allow Parameter to be used as a decorator. by @BrianPugh in #295
See docs example for more information.
from cyclopts import App, Parameter from dataclasses import dataclass app = App(name="movie-maintainer") @Parameter(name="*") @dataclass class Movie: title: str year: int @app.command def add(movie: Movie): print(f"Adding movie: {movie}") app()
Internal
- To allow the
@Parameterdecorator, we Introduce a hidden__cyclopts__attribute that gets attached to decorated objects. Currently only created/used when@Parameteris used.
Full Changelog: v3.1.5...v3.2.0