We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Type Check your Django app

Formal Metadata

Title
Type Check your Django app
Title of Series
Number of Parts
115
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Python 3 introduced type hints and it's optional to use. The decision to use the type-hints in the python community is in two different camps - Embrace and skeptical. Adding type-hints has practical problems. One such example is the working of type-checker, mypy, and CPython interpreter. mypy behaves like a statically typed language (strict with type declaration and modification) whereas Python run-time is lenient. Example a: int = 23 a = 'Django' Mypy will complain about the above code whereas Python run-time will not complain. In this talk, I'll cover the following topics: - how to add type-hints to Django project - views, models, and queryset. - Tools to help to add type-hints. - Adding type-hints to user-defined code. - Current limitation of the type-hints. - Tuning mypy to suit your needs - strict and lenient checking. All the example code snippets will run on Python 3.9.4+.