Python Bytes Episode 297: Data Modeling and Packaging

·22m 36s
Shared point

Overview of Python Development Tools and Trends

This episode of Python Bytes focuses on streamlining Python workflows, from database modeling to modern dependency management. The hosts, Brian Aukin and Michael Kennedy, explore new tools that reduce manual configuration and improve application performance.

Database Modeling with SQLA Code Gen

For developers dealing with complex, legacy databases, SQLA Code Gen acts as an automatic model generator for SQLAlchemy. The tool allows developers to:
* Point directly to a database connection string.
* Generate Python classes that resemble manual code.
* Support multiple flavors, including the ORM, DataClasses, and SQLModel.

"Whenever you've got a database, they're so hard to model because you've got to get the SQLAlchemy code to match it just right or it won't work at all."

Modern Packaging Standards

Significant progress has been made in the Python packaging ecosystem, specifically regarding PEP 660 and the removal of legacy files:
* Setup tools 664.00 now allows for the removal of setup.py and setup.cfg.
* Everything can reside in pyproject.toml, which is now the recommended standard for Python projects.
* New build systems like Hatch offer a modern, extensible approach with faster CLI speeds compared to traditional methods.

Async Caching and Performance

For high-performance web applications using asyncio, AIO Cache provides a robust way to handle distributed caching. It supports backends like Redis and Memcached, enabling a common API for sharing data across multiple worker processes or machines.

M1/Apple Silicon Updates

Users of Apple Silicon (M1/M2) can now enjoy native support for PyPy, the high-performance JIT-compiled interpreter. This update, based on ARM64 architecture, provides significant speed improvements for Python applications running on macOS.

Topics

Chapters

5 chapters
Python Bytes
AI chat — answers grounded in episodes