Goodbye Messy Data! And say Yes to "Pydantic "

hemi s.k (~hemi)


1

Vote

Description:

When processing data, validating its structure and type is crucial. Bad record types or changes in structure can often result in processing errors or in wrong data output. Yet, solving this problem cleanly and efficiently can be challenging. It often results in complicated code logic and increases complexity; consequently decreasing code readability. Pydantic is an efficient and elegant answer to these challenges. The data validation we require in Python is Pydantic. It enables us to establish a model and specify the data types for each field, making it simpler to work with in our IDE and enabling runtime type checking, which is not standard in Python. Also, this talk will leave one with a clear understanding of Pydantic, how it works, and when to choose Pydantic over dataclasses .

This talk will provide a solid comprehension of:

  • Current issues with data validation
  • An explanation of Pydantic Models, Validators, and Convertors
  • Practical applications of Pydantic
  • How to generate Pydantic Models using code generation from any data sources
  • How to define nested Pydantic models, forming parent-child relationships to model complex data.
  • Using typing - Literal to constrain values on a field
  • Defining default values for fields
  • Generating JSON Schema from Pydantic models
  • Auto-generating Pydantic models from JSON Schema definitions

Pydantic is the Python Package I Wish I'd Learned Earlier, and I think you will love it too!

Prerequisites:

Basic understanding of python, classes (OOP Python)

Content URLs:

Presentation link

Speaker Info:

I’m Hemangi Karchalkar and I’m a senior software developer working at Epam systems. I’ve been programming as a professional for 5 years and as an amateur for about half my life. In my current role I wear multiple hats. I love teaching and have worked as a mentor in my past organizations and guided people who are new to python.

Section: Core Python
Type: Talks
Target Audience: Beginner
Last Updated: