PythonHub
2.53K subscribers
2.35K photos
50.1K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Bridging Python's Logging Module to OpenTelemetry (Complete Guide)

This guide walks through using the OpenTelemetry Python SDK's LoggingHandler to bridge Python's built-in logging module with an OpenTelemetry-compliant pipeline without changing your existing log statements. It demonstrates how to configure the handler (via dictConfig), map standard log records into structured OTel fields, and automatically correlate logs with active traces to route them...

https://www.dash0.com/guides/opentelemetry-logging-python
Shrink Your Python Container in One Command with SlimToolkit

Use SlimToolkit to shrink a Python container by half in one command. No Dockerfile changes. Walkthrough on a chatbot with common edge cases and fixes.

https://codecut.ai/shrink-python-container-slimtoolkit/
When Python manual wiring turns into copy-paste architecture

A small typed dependency injection approach for apps that outgrow copy-pasted constructors but do not need a full DI framework.

https://vshulcz.hashnode.dev/when-python-manual-wiring-turns-into-copy-paste-architecture
What types of exceptions should you catch?

The trickiest programming bugs are often caused by catching exceptions that you didn't mean to catch or handling exceptions in ways that obfuscate the actual error that's occurring. Which exceptions should you catch and which should you leave unhandled?

https://www.pythonmorsels.com/what-types-of-exceptions-should-you-catch/