Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #4326

[Python-announce] ANN: func-validator 1.2.0 release

From Patrick Boateng <patrickboateng@patrickboateng.tech>
Newsgroups comp.lang.python.announce
Subject [Python-announce] ANN: func-validator 1.2.0 release
Date 2025-10-31 15:34 -0500
Message-ID <7f26ff7c-239e-421a-a342-79b23bd7068f@patrickboateng.tech> (permalink)

Show all headers | View raw


Hi All,

I am happy to announce **func-validator 1.2.0** release, this version 
provides custom error messages for validators via the "err_msg" optional 
keyword argument.

This package was inspired by MATLAB’s argument validation framework, 
bringing a similar level of clarity and structure to Python function 
definitions.

Below is a quick example:

```python
from typing import Annotated
from func_validator import validate_params, MustBePositive, MustBeNegative

@validate_params
def func(a: Annotated[int, MustBePositive(err_msg="a must be greater 
than 0")], b: Annotated[float, MustBeNegative(err_msg="b must be less 
than 0")]):
    ...
```

**Links**

  * PYPI: https://pypi.org/project/func-validator/
  * GitHub: https://github.com/patrickboateng/func-validator
  * Docs: https://func-validator.readthedocs.io/en/latest/


**Install**
pip install func-validator

Compatible with Python 3.11 - 3.13. Licensed under MIT

Best,
Patrick Boateng
patrickboateng@patrickboateng.tech



Back to comp.lang.python.announce | Previous | Next | Find similar


Thread

[Python-announce] ANN: func-validator 1.2.0 release Patrick Boateng <patrickboateng@patrickboateng.tech> - 2025-10-31 15:34 -0500

csiph-web