Python Updates: PyPI, CircuitPython, Data Classes & ORMs
The New Python Package Index
The Python community is transitioning to a new infrastructure for PyPI known as Warehouse. This project represents a significant modernization of the package index, featuring:
• pypi.org as the new central hub for all Python packages
• Deprecation of the old pypi.python.org interface, which is now largely read-only
• A robust, open-source codebase built with PyTest and modern practices
• A massive scale serving over a petabyte of bandwidth per month
Advancements in Embedded Python
CircuitPython is making strides in the hardware hacker community, providing an approachable way to program microcontrollers. Key highlights include:
• Support for affordable hardware like the Gemma M0
• A design that makes the device appear as a storage drive, allowing for instant editing of main.py
• Excellent resources for creating and sharing CircuitPython libraries
Modern Class Definitions and Data Handling
The podcast touches on the evolution of data structures in Python, highlighting a shift toward more concise code:
"The core Python devs sat up, took some notice and said, maybe we have been neglecting a higher level interface for quickly defining classes."
• Data Classes: An ongoing effort by core developers to create a built-in, idiomatic way to define structured classes, frequently compared to the popular attrs library.
• Pandas: A critical look at using Series and DataFrames for data science, emphasizing the paradigm shift required when moving from traditional Python lists to vector-based data manipulation.
Static Typing and ORMs
Discussions on software architecture covered the ongoing debate surrounding static typing in Python, particularly its utility for human readability and documentation rather than pure performance. Furthermore, the hosts explored the trade-offs of Object Relational Mappers (ORMs), noting that while tools like SQLAlchemy add complexity, they offer significant benefits in transaction safety and maintainability compared to manual database management.