decorator VS pydantic

Compare decorator vs pydantic and see what are their differences.

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
decorator pydantic
1 167
813 18,942
- 3.8%
3.5 9.8
2 months ago 6 days ago
Python Python
BSD 2-clause "Simplified" License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

decorator

Posts with mentions or reviews of decorator. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-23.
  • Python Malware Starting to Employ Anti-Debug Techniques
    7 projects | news.ycombinator.com | 23 Dec 2022
    that doesn't make much sense and there are necessary uses for eval() /exec(), mostly for dynamic creation of code:

    For example here's Python dataclasses in the standard library using exec() to create the `__init__` and other methods that go on your dataclass:

    https://github.com/python/cpython/blob/main/Lib/dataclasses....

    Here's Pydantic using it for a jupyter notebook check:

    https://github.com/pydantic/pydantic/blob/594effa279668bd955...

    here's Pytest using it to rewrite modules so that functions like assert etc. are instrumented by pytest:

    https://github.com/pytest-dev/pytest/blob/eca93db05b6c5ec101...

    Here's the decorator module using it (as is the only way to do this in Python) to create a signature matching decorator for an arbitrary function:

    https://github.com/micheles/decorator/blob/ad013a2c1ad796996...

    All of these libraries are completely secure as eval/exec are used with code fragments that are generated by the libraries, not based on untrusted input.

    eval() /exec() are not running executable files, just Python code, the same way all the rest of the package is already doing.

pydantic

Posts with mentions or reviews of pydantic. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-18.

What are some alternatives?

When comparing decorator and pydantic you can also consider the following projects:

CPython - The Python programming language

Cerberus - Lightweight, extensible data validation library for Python

pytest - The pytest framework makes it easy to write small tests, yet scales to support complex functional testing

nexe - 🎉 create a single executable out of your node.js apps

thonny - Python IDE for beginners

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

act - Run your GitHub Actions locally 🚀

SQLAlchemy - The Database Toolkit for Python

sqlmodel - SQL databases in Python, designed for simplicity, compatibility, and robustness.

mypy - Optional static typing for Python

pyparsing - Python library for creating PEG parsers [Moved to: https://github.com/pyparsing/pyparsing]

phonenumbers - Python port of Google's libphonenumber