
Research
/Security News
Intercom’s npm Package Compromised in Ongoing Mini Shai-Hulud Worm Attack
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.
fluent-validator
Advanced tools
\n
Validate Your Data with Ease!
fluent_validator is a Python package that makes data validation a breeze! Say goodbye to complex, nested if statements and hello to a fluent and expressive way to validate your data. With fluent_validator, you can easily define and execute validation rules for your data in a clean and readable manner.
fluent_validator is lightweight and doesn't require any additional packages.You can install fluent_validator using pip:
pip install fluent-validator
Here's a quick example of how to use fluent_validator:
from fluent_validator import validate, validate_all
# Validate a single value
validate(10).not_is_none().greater_than(5).not_equal(40)
# Or validate multiple values
validate_all(10, 100).not_is_none().greater_than(5).not_equal(40)
fluent_validator offers a wide range of validations to suit your needs.
Notably, all validations have a corresponding negative form. Simply prefix the method with not_.
For example, the negative of is_none() is not_is_none().
| Validation | Description |
|---|---|
between(min_vl, max_vl) | Check if the object is within the specified range. |
contains_at_least(value) | Check if the object (assumed to be iterable) contains at least the specified number of elements. |
contains_at_most(value) | Check if the object (assumed to be iterable) contains at most the specified number of elements. |
contains_exactly(value) | Check if the object (assumed to be iterable) contains exactly the specified number of elements. |
equal(value) | Check if the object is equal to the specified value. |
greater_or_equal_than(value) | Check if the object is greater than or equal to the specified value. |
greater_than(value) | Check if the object is greater than the specified value. |
has_unique_values() | Check if the object (assumed to be iterable) contains unique values. Note: This function assumes that the object's elements are hashable. |
is_bool() | Check if the object is a boolean. |
is_callable() | Check if the object is callable (e.g., a function or method). |
is_false() | Check if the object is a boolean and has a value of False. |
is_in() | Check if the object is in a collection of values. |
is_instance() | Check if the object is an instance of one or more specified types. |
is_iterable() | Check if the object is iterable. |
is_none() | Check if the object is None. |
is_number() | Check if the object is a number (int or float). |
is_string() | Check if the object is a string. |
is_true() | Check if the object is a boolean and has a value of True. |
less_or_equal_than(value) | Check if the object is less than or equal to the specified value. |
less_than(value) | Check if the object is less than the specified value. |
max(value) | Check if the object is less than or equal to the specified maximum value. |
min(value) | Check if the object is greater than or equal to the specified minimum value. |
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or have questions about fluent_validator, please feel free to open an issue. We're here to help!
Happy Validating! 🚀
FAQs
Package to validate data in a fluent way
We found that fluent-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.