Best of Pydantic2024

  1. 1
    Article
    Avatar of planetpythonPlanet Python·2y

    On FastAPI

    FastAPI is a Python web framework that builds on the strengths of Django and Flask while feeling more modern and adhering to certain opinionated principles. It has excellent documentation, includes Swagger UI and Redoc out-of-the-box, and heavily depends on Pydantic for data schemas and validation.

  2. 2
    Article
    Avatar of kdnuggetsKDnuggets·2y

    Pydantic Tutorial: Data Validation in Python Made Simple

    Learn how to use Pydantic, a popular data validation library, to model and validate your data in Python. This tutorial covers the installation process, creating a basic Pydantic model, and loading and parsing JSON data using Pydantic models.

  3. 3
    Article
    Avatar of rpythonReal Python·2y

    Using Pydantic to Simplify Python Data Validation – Real Python

    Pydantic is a Python library designed to simplify data validation and settings management, enhancing code robustness. Learn to work with data schemas, create custom validators, validate function arguments, and configure applications using Pydantic through a comprehensive video course, which includes lessons, subtitles, downloadable resources, a text-based tutorial, Q&A with experts, and a certificate of completion.

  4. 4
    Article
    Avatar of hnHacker News·2y

    TypedDicts are better than you think

    TypedDict, introduced in PEP-589 for Python 3.8, is a tool for adding type annotations to dictionaries. It addresses limitations of dataclasses, particularly in scenarios like HTTP PATCH operations and handling optional fields. Enhancements like non-totality and individual field requirements improve its flexibility. PEP-692 expanded its application to type keyword arguments, proving useful in functions with numerous optional parameters. TypedDict also aids in dependency injection by defining shared dependencies in one place. Future PEPs aim to introduce features like extra item types and readonly items for even more control.

  5. 5
    Article
    Avatar of communityCommunity Picks·2y

    Building a High-Performance API with FastAPI, Pydantic, and Neon Postgres

    Learn to create a high-performance API for managing a tech conference system using FastAPI, Pydantic for data validation, and Neon's serverless Postgres. The guide walks through setting up the project, connecting to Neon Postgres, defining models and schemas, creating API endpoints, running and testing the API, and Dockerizing the application. It also covers performance optimization techniques such as database indexing, pagination, dependency injection, and efficient data handling.

  6. 6
    Article
    Avatar of communityCommunity Picks·2y

    Building an Async Product Management API with FastAPI, Pydantic, and PostgreSQL

    Learn to build an asynchronous product management API using FastAPI, Pydantic for data validation, and PostgreSQL with connection pooling. This guide covers setting up your project, managing database connections with asyncpg, defining Pydantic models, creating API endpoints, and running and testing your application using various tools.