Sanic and Data Validation using Pydantic - Deepstash
Sanic and Data Validation using Pydantic

Sanic and Data Validation using Pydantic

Curated from: blogs.mausamadhikari.com.np

Ideas, facts & insights covering these topics:

2 ideas

·

34 reads

2

Explore the World's Best Ideas

Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.

Data Validator

Data Validator

  • pydantic class allows custom data types to be defined or we can extend validation with methods on a model decorated with the validator decorator
  • Here, The datatype of name, grade, roll, email, phone, subjects, friends must be as mentioned in pydantic class else it will raise an error (pydantic validation error)

2

21 reads

Seriali

  • Serialization means to convert an object into that string , and deserialization is its inverse operation (convert string -> object) .
  • When transmitting a student in a file, the student is required to be byte strings, but Pydntic(here Student) objects are seldom in this format. Serialization can convert these Pydantic objects into byte strings for such use. After the byte strings are transmitted, the receiver will have to recover the original object from the byte string. ref
  • We need JSON Serializable objects to provide HTTP Response.

2

13 reads

IDEAS CURATED BY

Mausam Adhikari's ideas are part of this journey:

Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Related collections

Similar ideas

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates