PythonHub
2.49K subscribers
2.35K photos
49.9K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
MedKit

MedKit is a high-performance, unified SDK that transforms fragmented medical APIs into a single, programmable platform. It provides a clean interface for OpenFDA, PubMed, and ClinicalTrials.gov, augmented with a clinical intelligence layer and relationship mapping.

https://github.com/interestng/medkit
Serving Private Files with Django and S3

The article shows how to securely serve private user files stored in Amazon S3 from a Django app by keeping the bucket private and generating time-limited pre-signed URLs when a user is authorized to access a file. This approach lets S3 handle file delivery directly while Django controls access, avoiding slow proxying through the app server and making the system more scalable.

https://lincolnloop.com/blog/serving-private-files-with-django-and-s3/
Unit testing your code’s performance, part 2: Catching speed changes

Got benchmarks in CI? You can (maybe) use tests to catch performance changes even earlier.

https://pythonspeed.com/articles/speed-unit-tests/
hermes-agent

Hermes Agent is an open-source autonomous AI agent that you install on your own server or machine, where it lives persistently, learns over time, and builds reusable skills and memory across sessions instead of resetting like typical chatbots.

https://github.com/NousResearch/hermes-agent
MicroGPT explained interactively

Walk through Karpathy's 200-line GPT from scratch. Tokenize names into integers, watch softmax convert scores to probabilities, step through backpropagation on a computation graph, explore attention heatmaps, and see a tiny model learn to generate plausible names.

https://growingswe.com/blog/microgpt
Using tox to Test a Django App Across Multiple Django Versions

The article shows how to use tox to test a Django app across multiple Python and Django versions by creating isolated environments that install specific dependency combinations and run the same test suite. By defining a version matrix in tox.ini, developers can automatically verify compatibility across many Django releases and catch packaging or environment issues before users encounter them.

https://www.djangotricks.com/blog/2026/02/using-tox-to-test-a-django-app-across-multiple-django-versions/
FastAPI error handling: types, methods, and best practices

Learn FastAPI error handling with different types, methods, and best practices. Build robust APIs using custom exception handlers and practical examples.

https://www.honeybadger.io/blog/fastapi-error-handling/
1
Designing for Model Swaps

When LLM providers ship breaking changes, a poor architecture turns a config tweak into a 400-line PR. This post introduces seam-driven design - five narrow interfaces (provider, prompt, tools, config, observability) each independently swappable - illustrated with a working FastAPI + LangChain reference app, a practical checklist, and two hands-on drills readers can run immediate

https://garybake.com/seams1.html
Validating data with pointblank in python

One of the most common tasks of any organization is reviewing data to ensure that it is accurate and does not contain errors. Commonly, this is done by producing graphs or summary information like a median or mean and confirming that it looks reasonable. Pointblank is a newer tool that allows you to really dig into a dataset and task assumptions in a robust and reproducible manner.

https://www.markpitblado.me/blog/validating-data-with-pointblank-in-python
You’ve Been Underusing Dataclasses (These Tricks Are Wild)

The video demonstrates seven powerful, lesser-known techniques using Python dataclasses, including automatic class registration, lightweight validation, cached derived values, and context manager patterns. It also shows practical uses such as CLI generation and explains advanced features like InitVar, highlighting how dataclasses can enable cleaner and more expressive Python designs.

https://www.youtube.com/watch?v=Y9_h7ehjhO4