Python Microcontrollers, Databases, and Modern Tools

·39m 18s
Shared point

The Expanding World of Microcontrollers

The episode kicks off with an exciting development in hardware: the Raspberry Pi Pico. This $4 microcontroller marks a significant milestone as the first Raspberry Pi product featuring a chip (RP2040) designed entirely by the Raspberry Pi Foundation.

Low Power Efficiency: Ideal for IoT sensors and long-term unattended tasks.
Analog Capability: It is the first Pi product to include an Analog-to-Digital Converter (ADC).
Ecosystem Integration: The editor Mu (version 1.1 beta) now supports the Pico, making it highly accessible for students and hardware tinkering.

Modernizing Data Access with Beanie and Neo-model

The hosts discuss the shifting landscape of database interaction in the Python ecosystem, specifically the move toward async-friendly patterns.

"I really like getting a class back... be able to do queries with the class have the class have types and constraints and whatnot."

Document Data with Beanie

Beanie is an Object Document Mapper (ODM) for MongoDB that leverages Pydantic models. It allows developers to interact with the database using asynchronous syntax, bringing type safety and structured data handling to the document-centric world.

Graph Databases with Neo-model

For complex, relationship-heavy data, Neo-model provides an Object Graph Mapper (OGM) for Neo4j. It enables a programming model similar to the Django ORM, allowing developers to traverse relationships as first-class objects.

Tools for Code Quality and Development

Refactoring with Sorcery

Sorcery is showcased as a powerful tool that goes beyond traditional linters. It provides real-time refactoring suggestions, such as simplifying complex if statements or converting loops into list comprehensions directly within the editor.

Conference Tracking with Conference Radar

Sebastian introduces Conference Radar, a CLI-based tool for tracking upcoming Python conferences and Call for Proposals (CFP) deadlines, offering a efficient way to stay updated on community events.

Software Testing Best Practices

Brian dives into the nuances of mocking in tests. The primary recommendation is to always use autospec to ensure that mock objects strictly follow the interface of the original objects they are replacing. This prevents tests from passing when APIs have changed or functions have been renamed.

Topics

Chapters

6 chapters
Python Bytes
AI chat — answers grounded in episodes