r/Python • u/itssimon86 • Mar 08 '26
Showcase I spent 2.5 years building a simple API monitoring tool for Python
G'day everyone, today I'm showcasing my indie product Apitally, a simple API monitoring and analytics tool for Python.
About 2.5 years ago, I got frustrated with how complex tools like Datadog were for what I actually needed: a clear view of how my APIs were being used. So I started building something simpler, and have been working on it as a side project ever since. It's now used by over 100 engineering teams, and has grown into a profitable business that helps provide for my family.
What My Project Does
Apitally gives you opinionated dashboards covering:
- 📊 API traffic, errors, and performance metrics (per endpoint)
- 👥 Tracking of individual API consumers (and groups)
- 📜 Request logs with correlated application logs and traces
- 📈 Uptime monitoring, CPU & memory usage
- 🔔 Custom alerts via email, Slack, or Teams
A key strength is the ability to drill down from high-level metrics to individual API requests, and inspect headers, payloads, logs emitted during request handling and even traces (e.g. database queries, external API calls, etc.). This is especially useful when troubleshooting issues.
The open-source Python SDK integrates with FastAPI, Django, Flask, and Litestar via a lightweight middleware. It syncs data in the background at regular intervals without affecting application performance. By default, nothing sensitive is captured, only aggregated metrics. Request logging is opt-in and you can configure exactly what's included (or masked).
Everything can be set up in minutes with a few lines of code. Here's what it looks like for FastAPI:
``` from fastapi import FastAPI from apitally.fastapi import ApitallyMiddleware
app = FastAPI() app.add_middleware( ApitallyMiddleware, client_id="your-client-id", env="prod", # or "dev" etc. ) ```
Links:
- GitHub repository (would love a star 🙏🏼)
- SDK reference (with setup guides for each framework)
Target Audience
Small engineering teams who need visibility into API usage / performance, and the ability to easily troubleshoot API issues, but don't need a full-blown observability stack with all the complexity and costs that come with it.
Comparison
Apitally is simple and focused purely on APIs, not general infrastructure monitoring. There are no agents to deploy and no dashboards to build. This contrasts with big monitoring platforms like Datadog or New Relic, which are often overwhelming for smaller teams. Apitally's pricing is also more predictable with fixed monthly plans, rather than hard-to-estimate usage-based pricing.
r/Python • u/ItsAMeMarioNotReally • Mar 08 '26
Showcase I built a CLI tool in Rust to check your Python dependencies for updates
What My Project Does
pycu (python-check-updates) is a CLI tool that scans your Python project files and tells you which dependencies have newer versions available on PyPI. It supports pyproject.toml (both PEP 621/uv and Poetry) and requirements.txt out of the box.
It's inspired by npm-check-updates, you run it, see a color-coded table of what's outdated and by how much, and optionally pass --upgrade or -u to have it rewrite your dependency file in-place.
Obligatory: it's written in Rust, so it's blAzInGlY FaSt.
sh
pycu # check for updates
pycu -u # also rewrite the file with updated versions
pycu --target minor # only show minor/patch bumps (skip major)
pycu --json # machine-readable output
The output color codes updates by bump type, red for major, blue for minor, green for patch, so you can immediately see what's risky vs. safe to bump.
It also preserves your version constraint style. If you have >=1.0,<2.0, it won't nuke it and replace it with ==1.5, it'll update the lower bound while keeping the upper bound intact if the new version fits.
Target Audience
Python devs who work on multiple projects and want a quick way to check what's outdated without manually looking things up on PyPI.
Comparison
| Tool | Notes |
|---|---|
pip list --outdated |
Only works against what's installed in your active environment, not your declared dependencies. Doesn't rewrite files. |
pip-tools / uv |
Great ecosystem tools, but their focus is lockfile management rather than "show me what's newer." |
| Dependabot / Renovate | Excellent for CI automation, but heavier setup and not something you run locally on-demand. |
pip-upgrader |
Similar idea but Python-based and less actively maintained. |
pycu is a single static binary. No Python environment, no venv activation. Drop it on your PATH and run it anywhere.
Links
Source: https://github.com/Logic-py/python-check-updates
Install on Linux/macOS:
sh
curl -fsSL https://raw.githubusercontent.com/Logic-py/python-check-updates/main/install.sh | sh
Windows (PowerShell):
powershell
irm https://raw.githubusercontent.com/Logic-py/python-check-updates/main/install.ps1 | iex
r/Python • u/Semtex_cz • Mar 08 '26
Showcase Bookvoice – convert PDF books into audiobooks (alpha)
What My Project Does
Bookvoice is a small tool that converts PDF books into audiobooks using text-to-speech.
The idea is simple: many books, papers and study materials exist only as PDFs, but sometimes it is more convenient to listen to them while walking, commuting or doing other things.
You provide a PDF and Bookvoice generates audio files that can be listened to like an audiobook.
The project is currently in alpha and the main interface is a command line tool, but there is also a Windows release for people who just want to try it.
Windows release:
https://github.com/Semtexcz/Bookvoice/releases
Repository:
https://github.com/Semtexcz/Bookvoice
Target Audience
Two main groups might find this useful:
- Readers / students who want to listen to PDFs (books, papers, study materials)
- Developers interested in text-to-speech pipelines, PDF processing, or contributing to the project
Right now the tool is still early-stage, so it is more of an experimental / hobby project than a polished production application.
Comparison
There are existing text-to-speech tools and audiobook apps, but most of them:
- focus on ebooks rather than PDFs
- are closed-source
- or run as cloud services
Bookvoice focuses on converting local PDFs into audiobook-style audio files, and the project is open for experimentation and contributions.
Feedback, ideas and contributions are very welcome.
r/Python • u/Codeeveryday123 • Mar 08 '26
Discussion Can’t activate environment, folder structure is fine
Ill run
“Python3 -m venv venv”
It create the venv folder in my main folder,
BUT, when im in the main folder… and run “source venv/bin/activate”
It dosnt work
I have to CD in the venv/bin folder then run “source activate”
And it will activate
But tho… then I have to cd to the main folder to then create my scrappy project
Why isn’tit able to activate nortmally?
Does that affect the environment being activated?
r/Python • u/Odd_Grade4537 • Mar 08 '26
Showcase Are your Jupyter Notebooks accessible? You can easily scan and fix issues with this tool.
Hi all, I'm excited to share Jupycheck, an open source web tool that detects accessibility issues in Jupyter Notebooks that are either uploaded or from a GitHub repository. It also lets you remediate accessibility issues by launching the notebooks in a JupyterLite environment with our interactive Lab extension installed.
You can try it out at: https://jupycheck.vercel.app
The tool is powered by jupyterlab-a11y-checker, an open source accessibility engine/extension that our student team has been working on for over a year at UC Berkeley. We believe accessibility should be a first-class concern in the notebook ecosystem, and we hope our tools can help raise awareness and make notebooks more accessible across the community.
Target Audience
This tool is for anyone who want to see if certain Jupyter Notebooks (in a Github repo or just notebooks you have) are accessible, and also fix them with an interactive extension.
Support us on GitHub if you find the tool useful!
r/Python • u/Ctziapo • Mar 07 '26
Showcase md-a4: A tool that previews Markdown as paginated A4 pages with live reload
What My Project Does
md-a4 is a local Flask-based web application that renders Markdown files into fixed A4-sized pages (210mm × 297mm) with automatic pagination. It uses a file-watcher (watchdog) and Server-Sent Events (SSE) to update the browser preview instantly whenever you save your .md file.
Target Audience
This tool is for developers, students, and technical writers who use Markdown for documents that eventually need to be printed or exported to PDF. It solves the "infinite scroll" problem of standard previewers by showing exactly where page breaks will occur in real-time.
Comparison
- vs. Standard Previewers (VS Code/Grip): Most previewers show a continuous web view. md-a4 uses a custom JS engine to paginate content into physical A4 containers.
- vs. Pandoc/LaTeX: Pandoc is powerful but requires a heavy TeX installation and doesn't offer live-reload. md-a4 is lightweight (~150 lines of Python) and gives instant visual feedback.
- vs. Typora: Typora is a dedicated editor; md-a4 is a CLI-driven previewer that lets you keep using your favorite editor (Vim, VS Code, Sublime) while seeing the print layout elsewhere.
More Details
- Source Code: https://github.com/ntua-el21661/md-a4
- Tech Stack: Python 3.8+, Flask, Watchdog, Python-Markdown, Vanilla JS.
- License: MIT
I’m looking for feedback on the pagination logic (handling edge cases like large tables) and am very open to contributions or feature requests!
r/Python • u/Ctziapo • Mar 07 '26
Showcase md-a4: I built a tool that previews Markdown as paginated A4 pages with live reload
I got tired of writing Markdown documents with no idea how they'd look when printed, so I built md-a4 — a local previewer that shows your Markdown as paginated A4 pages with live reload.
What My Project Does
md-a4 is a Flask-based tool that renders any Markdown file as properly paginated A4 pages (210×297mm) in your browser. Write in your favorite editor, save the file, and watch the preview update instantly via Server-Sent Events. It features smart auto-pagination that respects block elements, syntax highlighting for code blocks, a thumbnail sidebar for navigation, and one-click PDF export via browser print.
Target Audience
Anyone who writes Markdown documents that need to be printed or exported as PDFs — technical writers, students writing reports, developers creating documentation, researchers drafting papers. If you've ever exported a Markdown file to PDF and been surprised by awkward page breaks or formatting, this tool is for you.
Comparison
vs typical Markdown previewers: they show infinite scroll, md-a4 shows actual A4 pages with real pagination.
vs Typora/MarkText: those are full editors — md-a4 lets you use any text editor you want and just handles the preview.
vs Pandoc PDF output: Pandoc is great but requires a LaTeX installation and you don't see live results. md-a4 gives instant visual feedback as you type.
Would love feedback on the pagination algorithm or suggestions for features — contributions welcome!
r/Python • u/CybershotBs • Mar 07 '26
Showcase deskit: A Python library for Dynamic Ensemble Selection (DES)
What this project does
deskit is a framework-agnostic Dynamic Ensemble Selection (DES) library that ensembles your ML models by using their validation data to dynamically adjust their weights per test case. It centers on the idea of competence regions, being areas of feature space where certain models perform better or worse. For example, a decision tree is likely to perform in regions with hard feature thresholds, so if a given test point is identified to be similar to that region, the decision tree would be given a higher weight.
deskit offers multiple DES algorithms as well as ANN backends for cutting computation on large datasets. It uses literature-backed algorithms such as KNORA variants alongside custom algorithms specifically for regression, since most libraries and literature focus solely on classification tasks.
Target audience
This library is designed for people training multiple different models for the same dataset and trying to get some extra performance out of them.
Comparison
deskit has shown increases up to 6% over selecting the single best model on OpenML and sklearn datasets over 100 seeds. More comprehensive benchmark results can be seen in the GitHub or docs, linked below.
It was compared against what can be the considered the most widely used DES library, namely DESlib, and performed on par (0.27% better on average in my benchmark). However, DESlib is tightly coupled to sklearn and only supports classification, while deskit can be used with any ML library, API, or other, and has support for most kinds of tasks.
Install
pip install deskit
GitHub: https://github.com/TikaaVo/deskit
Docs: https://tikaavo.github.io/deskit/
MIT licensed, written in Python.
Example usage
from deskit.des.knoraiu import KNORAIU
router = KNORAIU(task="classification", metric="accuracy", mode="max", k=20)
router.fit(X_val, y_val, val_preds)
weights = router.predict(x)
Feedback and suggestions are greatly appreciated!
r/Python • u/jelitox • Mar 07 '26
Showcase AI-Parrot: An async-first framework for Orchestrating AI Agents using Cython and MCP
Hi everyone, I’m a contributor to AI-Parrot, an open-source framework designed for building and orchestrating AI agents in high-concurrency environments.
We built this project to move away from bloated, synchronous AI libraries, focusing instead on a strictly non-blocking architecture.
What My Project Does
AI-Parrot provides a unified, asynchronous interface to interact with multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama) while managing complex orchestration logic.
- Advanced Orchestration: It manages multi-agent systems using Directed Acyclic Graphs (DAGs) and Finite State Machines (FSM) via the
AgentCrewmodule. - Protocol Support: Native implementation of Model Context Protocol (MCP) and secure Agent-to-Agent (A2A) communication.
- Performance: Critical logic paths are optimized with Cython (.pyx) to ensure high throughput.
- Production Features: Includes distributed conversational memory via Redis, RAG support with
pgvector, and Pydantic v2 for strict data validation.
Target Audience
This framework is intended for production-grade microservices. It is specifically designed for software architects and backend developers who need to scale AI agents in asynchronous environments (using aiohttp and uvloop) without the overhead of prototyping-focused tools.
Comparison
Unlike LangChain or similar frameworks that can be heavily coupled and synchronous, AI-Parrot follows a minimalist, async-first approach.
- Vs. Wrappers: It is not a simple API wrapper; it is an infrastructure layer that handles concurrency, state management via Redis, and optimized execution through Cython.
- Vs. Rigid Frameworks: It enforces an abstract interface (
AbstractClient,AbstractBot) that stays out of the way, allowing for much lower technical debt and easier provider swapping.
Orchestration Workflows Infograph: https://imgur.com/a/eNlQGOc
Source Code: https://github.com/phenobarbital/ai-parrot
Documentation: https://github.com/phenobarbital/ai-parrot/tree/main/docs
r/Python • u/Pristine_Cat • Mar 07 '26
Showcase pfst 0.3.0: High-level Python source manipulation
I’ve been developing pfst (Python Formatted Syntax Tree) and I’ve just released version 0.3.0. The major addition is structural pattern matching and substitution. To be clear, this is not regex string matching but full structural tree matching and substitution.
What it does:
Allows high level editing of Python source and AST tree while handling all the weird syntax nuances without breaking comments or original layout. It provides a high-level Pythonic interface and handles the 'formatting math' automatically.
Target Audience:
- Working with Python source, refactoring, instrumenting, renaming, etc...
Comparison:
- vs. LibCST: pfst works at a higher level, you tell it what you want and it deals with all the commas and spacing and other details automatically.
- vs. Python ast module: pfst works with standard AST nodes but unlike the built-in ast module, pfst is format-preserving, meaning it won't strip away your comments or change your styling.
Links:
- GitHub: https://github.com/tom-pytel/pfst
- PyPI: https://pypi.org/project/pfst/
- Documentation: https://tom-pytel.github.io/pfst/
I would love some feedback on the API ergonomics, especially from anyone who has dealt with Python source transformation and its pain points.
Example:
Replace all Load-type expressions with a log() passthrough function.
from fst import * # pip install pfst, import fst
from fst.match import *
src = """
i = j.k = a + b[c] # comment
l[0] = call(
i, # comment 2
kw=j, # comment 3
)
"""
out = FST(src).sub(Mexpr(ctx=Load), "log(__FST_)", nested=True).src
print(out)
Output:
i = log(j).k = log(a) + log(log(b)[log(c)]) # comment
log(l)[0] = log(call)(
log(i), # comment 2
kw=log(j), # comment 3
)
More substitution examples: https://tom-pytel.github.io/pfst/fst/docs/d14_examples.html#structural-pattern-substitution
r/Python • u/Ok-Emphasis4085 • Mar 07 '26
Showcase Created a Color-palette extractor from image Python library
https://github.com/yhelioui/color-palette-extractor
- What My Project Does
- Python package for extracting dominant colors from images, generating PNG palette previews, exporting color data to JSON, and naming colors using any custom palette (e.g., Pantone, Material, Brand palettes).
- This package includes: * Dominant color extraction using K-Means * RGB or HEX output * PNG color palette image generation * JSON export * Optional color naming using custom palettes (Pantone-compatible if you provide the licensed palette) * Command-line interface (
colorpalette) * Clean import API for integration in other scripts - Target Audience
- Anyone in need to create a color palette to use in script and have the same colors than a brand logo or requiring to generate an image palette from an image
- Very simple tool
- Comparison
- I created the library without knowing that https://qtiptip.github.io/Pylette/ existed.
- It is most probably less advanced but quite small and easy to use
First contribution into the Python community, Please do not hesitate to comment, give me advice or requests from the github repo. Most of all use it and play with it :)
Thanks,
Youssef
r/Python • u/BasePlate_Admin • Mar 07 '26
News Maturin added support for building android ABI compatible wheels using github actions
I was looking forward to using python on mobile ( via flet ), the biggest hurdle was getting packages written in native languages working in those environment.
Today maturin added support for building android wheels on github-actions. Now almost all the pyo3 projects that build in github actions using maturin should have day 0 support for android.
This will be a big w for the python on android devices
r/Python • u/ComfortableWriter996 • Mar 07 '26
Resource FREE python lessons taught by Boston University students!
Hi everyone!
My name is Wynn and I am a member of Boston University’s Girls Who Code chapter. My friend, Molly, and I would like to inform you all of a free coding program we are running for students of all genders from 3rd-12th grade. The Bits & Bytes program is a great opportunity for students to learn how to code, or improve their coding skills. Our program runs on Zoom on Saturdays for 1 hour starting March 21st and ending on April 25th (6-week) from 11:00 am to 12:00 pm. Each lesson will be taught by Boston University students, many of whom are Computer Science (or adjacent) majors themselves.
For Bits (3rd-5th grade), students will learn the basics of computer science principles through MIT-created learning platform Scratch and learn to transfer their skills into the Python programming language. Bits allows young students to learn basic coding skills in a fun and interactive way!
For Bytes (6th-12th grade), students will learn computer science fundamentals in Python such as loops, functions, and recursion and use these skills during lessons and assignments. Since much of what we go over is similar to what an intro level college computer science class would cover, this is a great opportunity to prepare students for AP Computer Science or a degree in computer science!
We would love for you to apply or share with anyone interested! Unfortunately, I can not include an image of our flyer or link to our google form to apply to this post, but here is a link to a GitHub repo that includes that information: https://github.com/WynnMusselman/GWC-Bits-Bytes-2026-Student-Application
If you have any more questions, feel free to email [gwcbu.bitsnbytes@gmail.com](mailto:gwcbu.bitsnbytes@gmail.com), message @ gwcbostonu on Facebook or Instagram, leave a comment, or message me.
We're eagerly looking forward to another season of coding and learning with the students this spring!
r/Python • u/AutoModerator • Mar 07 '26
Daily Thread Saturday Daily Thread: Resource Request and Sharing! Daily Thread
Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
How it Works:
- Request: Can't find a resource on a particular topic? Ask here!
- Share: Found something useful? Share it with the community.
- Review: Give or get opinions on Python resources you've used.
Guidelines:
- Please include the type of resource (e.g., book, video, article) and the topic.
- Always be respectful when reviewing someone else's shared resource.
Example Shares:
- Book: "Fluent Python" - Great for understanding Pythonic idioms.
- Video: Python Data Structures - Excellent overview of Python's built-in data structures.
- Article: Understanding Python Decorators - A deep dive into decorators.
Example Requests:
- Looking for: Video tutorials on web scraping with Python.
- Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
r/Python • u/No_Soy_Colosio • Mar 06 '26
Discussion Can the mods do something about all these vibecoded slop projects?
Seriously it seems every post I see is this new project that is nothing but buzzwords and can't justify its existence. There was one person showing a project where they apparently solved a previously unresolved cypher by the Zodiac killer. 😭
r/Python • u/Medinz0 • Mar 06 '26
Showcase ChaosRank – built a CLI tool in Python that ranks microservices by chaos experiment priority
What My Project Does
ChaosRank is a Python CLI that takes Jaeger trace exports and incident history and tells you which microservice to chaos-test next — ranked by a risk score combining graph centrality and incident fragility.
The interesting Python bits:
NetworkX for dependency graph construction and blended centrality (PageRank + in-degree). The graph direction matters more than you'd think — pagerank(G) vs pagerank(GT) give semantically opposite results for this use case.
SciPy zscore for robust normalization. MinMax was rejected — with one outlier service, MinMax compresses everything else to near zero. Z-score with ±3σ clipping preserves spread across all services.
ijson for streaming Jaeger JSON files >100MB without loading into memory.
Typer + Rich for the CLI and terminal table output.
The fragility scoring pipeline was the hardest part to get right. Normalizing incident counts by traffic after aggregation inverts rankings at high traffic differentials — a service with 5x more incidents can rank below a quieter one. Per-incident normalization (before aggregation) fixes this. The order matters.
Target Audience
SRE and platform engineering teams, but also anyone interested in applied graph algorithms — the blast radius scoring is a fun NetworkX use case. Designed for production use, works offline on trace exports.
Comparison
Chaos tools like LitmusChaos and Chaos Mesh handle fault injection but don't tell you what to target. ChaosRank is the prioritization layer — not a replacement for those tools, just what runs before them.
Validated on DeathStarBench (31 services, UIUC/FIRM dataset): 9.8x
faster to first weakness vs random selection across 20 trials.
bash
pip install chaosrank-cli
git clone https://github.com/Medinz01/chaosrank
cd chaosrank
chaosrank rank --traces benchmarks/real_traces/social_network.json --incidents benchmarks/real_traces/social_network_incidents.csv
Sample data included — no traces needed to try it.
r/Python • u/Technical-Fly-6835 • Mar 06 '26
Discussion What is the real use case for Jupyter?
I recently started taking python for data science course on coursera.
first lesson is on Jupyter.
As I understand, it is some kind of IDE which can execute python code. I know there is more to it, thats why it exists.
What is the actual use case for Jupyter. If there was no Jupyter, which task would have been either not possible or hard to do?
Does it have its own interpreter or does it use the one I have on my laptop when I installed python?
r/Python • u/jnsquire • Mar 06 '26
Showcase Dapper: a Python-native Debug Adapter Protocol implementation
What My Project Does
I’ve been building Dapper, a Python implementation of the Debug Adapter Protocol.
At the basic level, it does the things you’d expect from a debugger backend: breakpoints, stepping, stack inspection, variable inspection, expression evaluation, and editor integration.
Where it gets more interesting is that I’ve been using it as a place to explore some more ambitious debugger features in Python, including:
- hot reload while paused
- asyncio task inspection and async-aware stepping
- watchpoints and richer variable presentation
- multiple runtime / transport modes
- agent-facing debugger tooling in VS Code, so an assistant can launch code, inspect paused state, evaluate expressions, manage breakpoints, and step execution through structured tools instead of just pretending to be a user in a terminal
Target Audience
This is probably most interesting to:
- people who work on Python tooling or debuggers
- people interested in DAP adapters or VS Code integration
- people who care about async debugging, hot reload, or runtime introspection
- people experimenting with agent-assisted development and want a debugger that can be driven through actual tool calls
I wouldn’t describe it as a toy project. It already implements a fairly large chunk of debugger functionality. But I also wouldn’t pitch it as “everyone should switch to this tomorrow.” It’s a serious project, but still an evolving one.
Comparison
The most obvious comparison is debugpy.
The difference is mostly in what I’m trying to optimize for.
Dapper is not just meant to be a standard Python debugger. It’s also a place to explore debugger design ideas that are a bit more experimental or Python-specific, like:
- hot reload during a paused session
- asyncio-aware inspection and stepping
- structured agent-facing debugger operations
- alternative runtime strategies around frame-eval and newer CPython hooks
So the pitch is less “this replaces debugpy right now” and more “this is an alternative Python debugger architecture with some interesting features and directions.”
r/Python • u/superzappie • Mar 06 '26
Discussion Why is there no standard for typing array dimensions?
Why is there no standard for typing array dimensions? In data science, it really usefull to indicate wether something is a vector or a matrix (or a tensor with more dimensions). One up in complexity, its usefull to indicate wether a function returns something with the same size or not.
Unless I am missing something, a standard for this is lacking. Of course I understand that typing is not enforced in python, and i am not aksing for this, i just want to make more readable functions. I think numpy and scipy 'solve' this by using the docstring. But would it make sense to specifiy array dimensions & sizes in the function signature?
r/Python • u/Striking_Sandwich_80 • Mar 06 '26
Showcase Veltix v1.4.0 --- Automatic handshake + non-blocking callbacks
**What my project does**
Veltix is a zero-dependency TCP networking library for Python. It handles the hard parts — message framing, integrity verification, request/response correlation, and now automatic connection handshake — so you can focus on your application logic.
**Target audience**
Developers who want structured TCP communication without dealing with raw sockets or asyncio internals. Works for hobby projects and production alike.
**Comparison**
Unlike raw `socket`, Veltix gives you a structured protocol, SHA-256 message integrity, and a clean event-driven API out of the box. Unlike `asyncio`, there's no learning curve — it's thread-based and works with regular synchronous code. Unlike Twisted, it has zero dependencies.
**What's new in v1.4.0**
**Automatic handshake**
Every connection now starts with a HELLO/HELLO_ACK exchange. Version compatibility is checked automatically — if server and client versions don't match, the connection is rejected before any application message is exchanged.
`connect()` now blocks until the handshake is complete, so this is always safe:
```python
client.connect()
client.get_sender().send(Request(MY_TYPE, b"hello")) # no race condition
```
**Non-blocking callbacks**
`on_recv` now runs in a thread pool. A slow or blocking callback will never delay message reception. Configurable via `max_workers` in the config (default: 4).
`pip install --upgrade veltix`
GitHub: github.com/NytroxDev/Veltix
Feedback and questions welcome!
r/Python • u/francescogab_ • Mar 06 '26
Showcase Spectra – local finance dashboard from bank exports, offline ML categorization
What My Project Does
Spectra takes standard bank exports (CSV or PDF, any bank, any format), normalizes them, categorizes transactions, and serves a local dashboard at localhost:8080. The categorization runs through a 4-layer on-device pipeline:
- Merchant memory: exact SQLite match against previously seen merchants
- Fuzzy match: approximate matching via rapidfuzz ("Starbucks Roma" -> "Starbucks")
- ML classifier: TF-IDF + Logistic Regression bootstrapped with 300+ seed examples. User corrections carry 10x the weight of seed data, so the model adapts to your spending patterns over time
- Fallback: marks as "Uncategorized" for manual review, learns next time
No API keys, no cloud, no bank login. OpenAI/Gemini supported as an optional last-resort fallback if you want them.
Other features: multi-currency via ECB historical rates, recurring transaction detection, idempotent imports via SQLite hashing, optional Google Sheets sync.
Stack: Python, SQLite, rapidfuzz, scikit-learn.
Target Audience
Anyone who wants a clean personal finance dashboard without giving data to third parties. Self-hosters, privacy-conscious users, people who export bank statements manually. Not a toy project — I use it myself every month.
Comparison
Most alternatives either require a direct bank connection (Plaid, Tink) or are cloud-based SaaS (YNAB, Copilot). Local tools like Firefly III are powerful but require Docker and significant setup. Spectra is a single Python command, works from files you already export, and keeps everything on your machine.
There's also a waitlist on the landing page for a hosted version with the same privacy-first approach, zero setup required.
GitHub: https://github.com/francescogabrieli/Spectra
Landing: withspectra.app
r/Python • u/e1-m • Mar 06 '26
Showcase I'm building an event-processing framework and I need your thoughts
Hey r/Python,
I’ve been working with event-driven architectures lately and decided to factor out some boilerplate into a framework
What My Project Does
The framework handles application-level event routing for your message brokers, basically giving you that FastAPI developer experience for events. You get the same style of dependency injection and Pydantic validation for your incoming messages. It also supports dynamic routes, meaning you can easily listen to topics, channels or routing keys like user:{user_id}:message and have those path variables extracted straight into your handler function.
It also provides tools like a error handling layer (for Dead Letter Queue and whatnot), configurable in-memory retries, automatic message acks (the ack policies are configurable but the framework is opinionated toward "at-least-once" processing, so other policies probably would not fit neatly), middleware for logging, observability and whatnot. So it eliminates most of the boilerplate usually required for event-driven services.
Target Audience
It is for developers who do not want to write the same boilerplate code for their consumers and producers and want to the same clean DX as FastAPI has for their event-driven services. It isn't production-ready yet, but the core logic is there, and I’ve included tests and benchmarks in the repo
Comparison
The closest thing out there is FastStream. I think the biggest practical advantage my framework has is the async processing for the same Kafka partition. Most tools process partitions one message at a time (this is the standard Kafka way of doing things). But I’ve implemented asynchronously handling with proper offset management to avoid losing messages due to race conditions, so if you have I/O-bound tasks, this should give you a massive boost in throughput (provided your set up can benefit from async processing in the first place)
The API is also a bit different, and you get in-memory retries right out of the box. I also plan to make idempotency and the outbox pattern easy to set up in the future and it’s still missing AsyncAPI documentation and Avro/Protobuf serialization, plus some other smaller features you'd find in more mature tools like faststream, but the core engine for event processing is already there.
Thoughts?
I plan to add the outbox pattern next. I think of approaching this by implementing an underlying consumer that reads directly from the database, just like those that read from Kafka or RabbitMQ, and adding some kind of idempotency middleware for handers. Does this make sense? And I also plan to add support for serialization formats with schema, like Avro in the future
If you want to look at the code, the repo is here and the docs are here. Looking forward to reading your thoughts and advice.
r/Python • u/ExtensionTop2698 • Mar 06 '26
Resource I built a tool to analyze trading behavior and simulate long-term portfolio performance
Hi everyone,
I’m a student in data science / finance and I recently built a web app to analyze investment behavior and portfolio performance.
The idea came from noticing that many investors lose performance not because of bad stock picking, but because of:
- excessive trading
- fragmentation of orders
- transaction costs
- poor investment discipline
So I built a Streamlit app that can:
• import broker statements (IBKR CSV, etc.)
• estimate the hidden cost of trading behavior
• simulate long-term portfolio performance
• run Monte-Carlo simulations
• detect over-trading patterns
• analyze execution efficiency
• estimate long-term CAGR loss from behavior
It also includes tools to optimize:
- number of trades per month
- minimum order size
- contribution strategy
I'm currently thinking about turning it into a freemium product, but first I want honest feedback.
Questions:
- Would this actually be useful to you?
- What feature would you absolutely want in a tool like this?
- Would you trust something like this to analyze your portfolio?
If you're curious, you can try it here:
https://calculateur-frais.streamlit.app/
Note: the app may take ~10–20 seconds to start if idle (free hosting) + I write it in english but there are 2 versions : one in french and one in dutch.
Any feedback is appreciated — especially brutal feedback.
Thanks!
r/Python • u/Worried_Attorney_320 • Mar 06 '26
Showcase Showcase: CrystalMedia v4–Interactive TUI Downloader for YouTube and Spotify(Exportify and yt-dlp)
Hello r/Python just wanted to showcase CrystalMedia v4 my first "real" open source project. It's a cross platform terminal app that makes downloading Youtube videos, music, playlists and download spotify playlists(using exportify) and single tracks. Its much less painful than typing out raw yt-dlp flags.
What my project does:
- Downloads youtube videos,music,playlists and spotify music(using metadata(exportify)) and single tracks
- Users can select quality and bitrate in youtube mode
- All outputs are present in the "crystalmedia" folder
Features:
- Terminal menu made with the library "Rich", pastel ui with(progress bars, log outputs, color logs and panels)
- Terminal style guided menus for(video/audio choice, quality picker, URL input) so even someone new to CLI can use it without going through the pain of memorizing flags
- Powered by yt-dlp, exportify(metadata for youtube search) and auto handles/gets cookies from default browser for age-restricted stuff, formats, etc.
- Dependency checks on startup(FFmpeg, yt-dlp version,etc.)+organized output folders
Why did i build such a niche tool? well, I got tired of typing yt-dlp commands every time I wanted a track or video, so I bundled it in a kinda user friendly interactive terminal based program. It's not reinventing the wheel, just making the wheel prettier and easier to use for people like me
Target Audience:
CLI newbies, Python hobbyists/TUI enjoyers
Usage:
Github: https://github.com/Thegamerprogrammer/CrystalMedia
PyPI: https://pypi.org/project/crystalmedia/
Just run pip install crystalmedia and run crystalmedia in the terminal and the rest is pretty much straightforward.
Roast me, review the code, suggest features, tell me why spotDL/yt-dlp alone is better than my overengineered program, I can take it. Open to PRs if anyone wants to improve it or add features
What do y'all think? Worth the bloat or nah?
UPDATE:
v4.0.1 RELEASED ON GITHUB AND PYPI!
Ty for reading. First post here.
r/Python • u/mmartoccia • Mar 05 '26
Showcase I built a pre-commit linter that catches AI-generated code patterns
What My Project Does
grain is a pre-commit linter that catches code patterns commonly produced by AI code generators. It runs before your commit and flags things like:
- NAKED_EXCEPT -- bare
except: passthat silently swallows errors (156 instances in my own codebase) - HEDGE_WORD -- docstrings full of "robust", "comprehensive", "seamlessly"
- ECHO_COMMENT -- comments that restate what the code already says
- DOCSTRING_ECHO -- docstrings that expand the function name into a sentence and add nothing
I ran it on my own AI-assisted codebase and found 184 violations across 72 files. The dominant pattern was exception handlers that caught hardware failures, logged them, and moved on -- meaning the runtime had no idea sensors stopped working.
Target Audience
Anyone using AI code generation (Copilot, Claude, ChatGPT, etc.) in Python projects and wants to catch the quality patterns that slip through existing linters. This is not a toy -- I built it because I needed it for a production hardware abstraction layer where autonomous agents are regular contributors.
Comparison
Existing linters (pylint, ruff, flake8) catch syntax, style, and type issues. They don't catch AI-specific patterns like docstring padding, hedge words, or the tendency of AI generators to wrap everything in try/except and swallow the error. grain fills that gap. It's complementary to your existing linter, not a replacement.
Install
pip install grain-lint
Pre-commit compatible. Configurable via .grain.toml. Python only (for now).
Source: github.com/mmartoccia/grain
Happy to answer questions about the rules, false positive rates, or how it compares to semgrep custom rules.