Python Bytes
#248 while True: stand up, sit down
- Autor: Vários
- Narrador: Vários
- Editor: Podcast
- Duración: 0:52:09
- Mas informaciones
Informações:
Sinopsis
Watch the live stream: Watch on YouTube About the show Sponsored by us: Check out the courses over at Talk Python And Brian’s book too! Special guest: Paul Everitt Brian #1: Why I use attrs instead of pydantic Tin Tvrtković, @tintvrtkovic attrs vs dataclasses Since dataclasses are a strict subset of attrs functionality. Recommend using attrs in most cases over dataclasses attrs is faster, has more features, releases more frequently, offers over a wider range of Python versions. attrs vs Pydantic attrs is a library for generating the boring parts of writing classes; Pydantic is that but also a complex validation library. a structuring/unstructuring library, ex converting to json and back attrs has opt-in validation that you have more control over cattrs can be used for structuring/unstructuring converters are opt-in for attrs, built into Pydantic, and can be wrong. example using Pendulum that Pydantic mishandles Summary attrs + cattrs + validators where necessary, converters where necessa