Python Bytes 325

Python Bytes 325

Published on in know-notes, python-bytes & python.

Python Bytes 325

Parquet and PyArrow

We use a lot of Parquet at CloudZero. I never thought of PyArrow as a replacement for pandas DataFrames, just as a replacement for CSV.
However, there are some places we may be able to benefit from Polars.

FastAPI-Filter

We don't use FastAPI, but I did spearhead the design and implementation of CloudZero's Resource-Oriented Programmatic APIs. We do think a lot about how to filter the GET endpoints.

I do like the declarative style of this library and will try to steal something from it. I do NOT like ORMs or tying external data models to internal ones. So I think the option to apply a FastAPI-Filter to a SQLAlchemy model, while convenient, is a mistake in the long term for most applications.

Avoid Leaking Implementation Details at All Costs

12 Python Decorators to Take Your Code to the Next Level

Decorators are the best part of Python. I love decorators. There are some useful Retry and Rate Limiting PyPI Packages that provide nice decorators.

PyHamcrest

Ooooh. Reminding me of my Java days. For those who don't know, this was born out a Java Library and is now available in many languages I do like improving readability.

Extras

  • Python 3.11.2 ... arrgghhh ... AWS Lambda is still on 3.9!
  • I wonder how much imageoptim.com would help with this website
  • pytest tips and tricks
    • OOOOh ... I did not know about pytestmark = pytest.mark.foo