Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

Episode #297: I AM the documentation

Published Tue, Aug 16, 2022, recorded Tue, Aug 16, 2022.

Watch the live stream:

About the show

Sponsored by the IRL Podcast from Mozilla

Michael #1: SQLCodeGen

  • via Josh Thurston
  • This is a tool that reads the structure of an existing database and generates the appropriate SQLAlchemy model code, using the declarative style if possible.
  • This tool was written as a replacement for sqlautocode, which was suffering from several issues (including, but not limited to, incompatibility with Python 3 and the latest SQLAlchemy version).
  • Features:
    • Supports SQLAlchemy 1.4.x
    • Produces declarative code that almost looks like it was hand written
    • Produces PEP 8 compliant code
    • Accurately determines relationships, including many-to-many, one-to-one
    • Automatically detects joined table inheritance
    • Excellent test coverage

Brian #2: The death of*, long live pyproject.toml

Michael #3: aiocache

  • via Owen Lamont
  • In the same vein as async-cache you might also be interested in aiocache.
  • It has some cool functionality like an optional Redis backend for multi process caching.
  • his library aims for simplicity over specialization. All caches contain the same minimum interface which consists on the following functions:
    • add: Only adds key/value if key does not exist.
    • get: Retrieve value identified by key.
    • set: Sets key/value.
    • multi_get: Retrieves multiple key/values.
    • multi_set: Sets multiple key/values.
    • exists: Returns True if key exists False otherwise.
    • increment: Increment the value stored in the given key.
    • delete: Deletes key and returns number of deleted items.
    • clear: Clears the items stored.
    • raw: Executes the specified command using the underlying client.

Brian #4: Hatch : a modern, extensible Python project manager

  • Another flit contender?
  • While reading Packaging Python Projects tutorial update, I noticed some examples for hatchling, as an alternative to setuptools, flit-core, and pdm.
  • Played with it some, but still have some exploring to do.
  • features
    • Standardized build system with reproducible builds by default
    • Robust environment management with support for custom scripts
    • Easy publishing to PyPI or other sources
      • includes --repo flag to be able to publish to alternative indices.
      • Awesome for internal systems.
    • Version management
    • Configurable project generation with sane defaults
    • Responsive CLI, ~2-3x faster than equivalent tools
      • This sounds great. I haven’t verified this
  • Commentary:
    • Good to see more packaging tools and user workflow explorations around packaging.



Joke: I am the docs

Want to go deeper? Check our projects