Python Developer Survey, FastAPI, and Django Ninja Insights
Python Developer Survey 2020 Analysis
The episode kicks off by discussing the 2020 Python Developer Survey results, highlighting:
• Python 3 adoption has reached 94%.
• Usage is diversifying into education, desktop applications, and mobile.
• The prevalence of different isolation tools, including virtualenv, Conda, and an unexpected growth in Docker for dependency isolation.
Web Framework Developments
The Rise of FastAPI
For the first time on the survey, FastAPI appears at number three among web frameworks with 12% adoption. Sebastian Ramirez, the creator of FastAPI, notes that the framework's success highlights the power of combining standard type annotations with modern asynchronous capabilities.
Django Ninja
Brian introduces Django Ninja, a framework designed to bring FastAPI-like syntax, validation using Pydantic, and async support to the Django ecosystem. This offers a middle ground for developers who want to modernize their APIs without leaving Django.
Pydantic 1.8 and Modern Practices
Sebastian details the latest features in Pydantic 1.8:
• Hypothesis plugin for property-based testing.
• TypedDict support for better editor completion and schema definition.
• Annotated type support for cleaner, more explicit metadata without cluttering function signatures with default values.
Runtime Validation
The hosts discuss the importance of validation and how FastAPI leverages Pydantic to ensure that data remains consistent from the request level down to deep, nested structures, providing clear error reporting.
Industry Support and Versioning
"If we had 20 companies each donate a million dollars, I bet we could get a pretty awesome JIT build."
• Corporate Sponsorship: Google and Microsoft are noted for their financial support of the Python and Rust ecosystems, respectively.
• Semantic Versioning: The discussion shifts to the limitations of SemVer and the reality of 0ver, emphasizing that developers should prioritize robust testing over strict adherence to version signals.
Final Notes
• OpenAPI 3.1.0 has been released, improving compatibility with the latest JSON Schema standards.
• The show concludes with a segment on funny code comments, highlighting the quirks and humor that developers often embed in their projects.