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

Sanic and Data Validation using Pydantic

blogs.mausamadhikari.com.np

2 ideas

·

33 reads

2

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

Machine Learning With Google

Discover 95 similar ideas in

It takes just

14 mins to read

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

20 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

Other curated ideas on this topic:

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