Python Validation

Open-source Python projects categorized as Validation

Top 23 Python Validation Projects

  • pydantic

    Data validation using Python type hints

    Project mention: Introducing FastStream: the easiest way to write microservices for Apache Kafka and RabbitMQ in Python | /r/opensource | 2023-09-29

    Pydantic Validation: Leverage Pydantic's validation capabilities to serialize and validate incoming messages

  • marshmallow

    A lightweight library for converting complex objects to and from simple Python datatypes.

    Project mention: Help making draggable items for Flask app. | /r/flask | 2023-08-21

    Somehow get a serializer going for your database models. I used marshmallow and flask-marshmallow

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • jsonschema

    An implementation of the JSON Schema specification for Python

  • pandera

    A light-weight, flexible, and expressive statistical data testing library

    Project mention: Unit testing functions that input/output dataframes? | /r/datascience | 2023-03-05

    I use Pandera, so I just need to define the expected input/output schemas (i.e. column names, types, and constraints on them), and Pandera automatically generates fake data for the unit tests, and validates the result:

  • Schematics

    Python Data Structures for Humans™.

  • WTForms

    A flexible forms validation and rendering library for Python.

  • webargs

    A friendly library for parsing HTTP request arguments, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.

  • Mergify

    Updating dependencies is time-consuming.. Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free.

  • strictyaml

    Type-safe YAML parser and validator.

    Project mention: StrictYAML | | 2023-09-29
  • msgspec

    A fast serialization and validation library, with builtin support for JSON, MessagePack, YAML, and TOML

    Project mention: Litestar 2.0 | /r/Python | 2023-08-29

    Full support for validation and serialisation of attrs classes and msgspec Structs. Where previously only Pydantic models and types where supported, you can now mix and match any of these three libraries. In addition to this, adding support for another modelling library has been greatly simplified with the new plugin architecture

  • pydantic-core

    Core validation logic for pydantic written in rust

    Project mention: Is there a pydantic.BaseSettings equivalent in rust? | /r/rust | 2023-06-05

    Funny that you ask... Unfortunately it seems that the functionality you ask for is not (yet) part of this ...

  • python-email-validator

    A robust email syntax and deliverability validation library for Python.

    Project mention: Robust Email Validator | | 2023-09-06
  • Deal

    🤝 Design by contract for Python. Write bug-free code. Add a few decorators, get static analysis and tests for free.

    Project mention: What features would you want in a new programming language? | /r/ProgrammingLanguages | 2023-01-03

    I started using a design by contract library for a Python project this year and it made my code safer and easier to use.

  • enforce

    Python 3.5+ runtime type checking for integration testing and data validation

  • colander

    A serialization/deserialization/validation library for strings, mappings and lists.

  • flask-pydantic

    flask extension for integration with the awesome pydantic package

    Project mention: Validating JSON | /r/flask | 2022-11-14

    Hi, depending on what kind of programming you do (i.e. use lots of type annotation) I'd recommend either Pydantic or Marshmallow. First comes usually paired with FastAPI, but both do a phantastic job. There's also an extension for Flask + Marshmallow as well for Flask + Pydantic. Personally I see Pydantic as the more modern one.

  • openapi-spec-validator

    OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification.

    Project mention: How I start every new Python backend API project | | 2023-01-19


  • aiohttp-apispec

    Build and document REST APIs with aiohttp and apispec

  • pydantic-to-typescript

    CLI Tool for converting pydantic models into typescript definitions

  • apischema

    JSON (de)serialization, GraphQL and JSON schema generation using Python typing.

  • phantom-types

    Phantom types for Python.

    Project mention: Sunday Daily Thread: What's everyone working on this week? | /r/Python | 2022-10-09

    I've written and published about a static type checking technique and a library of mine that implements it: phantom-types.

  • awesome-pattern-matching

    Pattern Matching for Python 3.7+ in a simple, yet powerful, extensible manner.

  • gjf

    A tool in Python to fix invalid GeoJSON objects and files

  • openapi-schema-validator

    OpenAPI schema validator is a Python library that validates schema against OpenAPI Schema Specification v3.0 and v3.1

  • Sonar

    Write Clean Python Code. Always.. Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-09-29.

Python Validation related posts


What are some of the best open-source Validation projects in Python? This list will help you:

Project Stars
1 pydantic 15,806
2 marshmallow 6,680
3 jsonschema 4,247
4 pandera 2,598
5 Schematics 2,562
6 WTForms 1,415
7 webargs 1,343
8 strictyaml 1,324
9 msgspec 1,310
10 pydantic-core 1,095
11 python-email-validator 860
12 Deal 594
13 enforce 541
14 colander 440
15 flask-pydantic 301
16 openapi-spec-validator 281
17 aiohttp-apispec 214
18 pydantic-to-typescript 205
19 apischema 202
20 phantom-types 162
21 awesome-pattern-matching 106
22 gjf 97
23 openapi-schema-validator 70
Write Clean Python Code. Always.
Sonar helps you commit clean code every time. With over 225 unique rules to find Python bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.