This repo contains some code to show off how to use Python's dataclasses.
- The basics of how and why of dataclasses are in basics/
- How to write an API client using dataclasses is in api_client/
- How to write a REST API for people with dataclasses using either Flask or FastAPI is in api_server/
- Examples of GADTs using dataclasses and pattern matching (optional/experimental requires Python 3.10b2)
- https://docs.python.org/3/library/dataclasses.html
- https://www.youtube.com/watch?v=T-TwcmT6Rcw
- https://glyph.twistedmatrix.com/2016/08/attrs.html
- https://www.attrs.org/en/stable/overview.html
- https://fastapi.tiangolo.com/advanced/
- https://stribny.name/blog/fastapi-asyncalchemy/
- https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html
- https://ahmed-nafies.medium.com/sqlalchemy-async-orm-is-finally-here-d560dfaa335d
- https://stackoverflow.com/questions/19464410/what-are-gadts
- https://github.com/gvanrossum/patma