Since its inception in 1989, Python has evolved from a dynamic and typeless language to one that embraces type hints, starting with the introduction in Python 3.5.This change sparked the development of powerful, type-safe frameworks such as Pydantic, FastAPI, Beanie, SQLModel, and more. In this course, you will master Python typing, explore various frameworks utilizing types, and gain valuable advice on implementing types in your projects.
Course Highlights
Throughout this course, you will:
- Compare Python with popular static languages like Swift, C#, and TypeScript.
- Analyze a dynamic Python codebase versus its typed counterpart to understand differences and benefits.
- Learn to create typed variables effectively and understand when to apply them.
- Explore Python's strict nullability within its type system.
- Specify constant variables and values to ensure immutability.
- Reduce SQL injection risks using
LiteralString. - Utilize typing with Python functions and methods for clearer code.
- Implement typing in classes and with class variables for better design.
- Navigate Python's numerical type hierarchy to manage multiple numerical types.
- Use Pydantic for modeling and parsing complex data with strict type enforcement.
- Create APIs using FastAPI to maintain type integrity during data exchange.
- Query databases efficiently by leveraging Pydantic and Beanie ODM.
- Develop CLI applications using type information for defining interfaces.
- Enhance codebase integrity with mypy during CI/CD pipelines.
- Add runtime type safety to boost application reliability.
- Integrate duck typing with static typing using Python's novel Protocol construct.
- Acquire design patterns and guidance for proficient use of types in Python development.