Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
PyDataValidator is a powerful and flexible Python library designed to streamline data validation processes. Whether you're building data pipelines, developing web applications, or handling complex datasets, PyDataValidator offers a comprehensive suite of tools to ensure your data is clean, consistent, and reliable.
Required
, Min
, and Email
in a single, readable chain to enforce multiple conditions on a single field.pip install py_data_validator
from py_data_validator.validator import Validator
# Define the data to be validated
data = {"name": "John Doe", "email": "johndoe@example.com"}
# Define the validation rules
rules = {
"name": ["required"],
"email": ["required", "email"],
}
# Create a Validator instance
validator = Validator(data,rules)
# Perform the validation
response = validator.validate()
# Check if validation failed and print the errors if any
if response.validated:
print("Validation passed!", response.data)
else:
print("Validation failed with errors:", response.errors)
After installing the PyDataValidator
package, providing a list of available validation rules is a great way to help users quickly understand the capabilities of the library..
Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request on GitHub.
This project is licensed under the MIT License - see the LICENSE file for details.
For more information, visit the documentation or view the package on PyPI.
FAQs
Python data validation library
We found that py-data-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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.