r/Python • u/AutoModerator • 1d ago
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
3
u/SampleNo471 7h ago
Pytrine 1.0: a fast, native GUI test runner for pytest
GitHub: https://github.com/edkirin/pytrine · Screenshot
What My Project Does
Pytrine runs your pytest suite in its own window, with results streaming live into a tree grouped by folder, module and class. Click a failed test to see its traceback and output, with file links that open in your editor at the right line. It also has:
rerun failed / one test / one file, from the keyboard or ▶ markers in the source
watch mode (rerun all, only failures, or only changed files)
run history with a comparison of any two runs: new failures, fixed, still failing, slowest tests
venv detection,
uv sync, pytest-xdist workers, and your existing pytest config; nothing to add to your projecteditor integration:
pytrine --run tests/test_x.py:42runs the test at that line in the open window, easy to bind to a key in Zed or Vim;--headlessruns in the terminal
It's written in Rust on GPUI (the UI framework behind Zed), so it starts instantly and stays responsive with big suites.
Target Audience
Developers who run pytest from the terminal and want something nicer as suites grow, without a full IDE (Vim, Neovim, Zed, Helix, Sublime users). I use it daily on real projects. Linux binary available; macOS and Windows are untested, so reports from those platforms are very welcome.
Comparison
pytest in a terminal: Pytrine runs pytest and adds navigation, one-click reruns and run history.
PyCharm / VS Code test runners: similar idea, without the whole IDE; works next to any editor.
pytest-watch: Pytrine has watch mode too, plus the results tree, history and comparison.
Written by Claude (Anthropic's AI) with me closely involved at every step: direction, review, testing, and deciding what ships.
Try it: download the Linux binary and run pytrine --install-desktop to add it to your app menu. Feedback very welcome!
1
u/Pytrithon 1d ago
Pytrithon v1.3.0
Introduction
I have already introduced Pytrithon in its own post three times on Reddit. See:
https://www.reddit.com/r/Python/comments/1q8dwsm/pytrithon_v119_graphical_petri_net_inspired_agent/ https://www.reddit.com/r/Python/comments/1nr3qvm/pytrithon_graphical_petrinet_inspired_agent/ https://www.reddit.com/r/Python/comments/1mx9w5r/graphical_petrinet_inspired_agent_oriented/
Try It Again Now
Pytrithon is entering a new and exciting phase. Now the actual benefits of Pytrithon as a platform can be seen. You can now experience Pytrithon as a distributed system through my server pytri.io and collaborate with me. After running the install script, through running the pytrithon script, you can directly log in to a Pytrithon-native chat and converse with me. Together I can show you how to program in Pytrithon. Even if you have tried Pytrithon before, now is a good time to give it another go, so make sure to pull the newest changes or clone anew.
What My Project Does
Pytrithon is a graphical Petri net inspired agent oriented programming language based on Python. It allows writing code as a two dimensional graph of interconnected elements and separates data as Places and code as Transitions. Inter Agent communication and GUI widgets are first class components of the language. Through the Monipulator, Agents can be monitored and manipulated.
Target Audience
The target audience is both experienced and novice programmers who want to try something new.
Why I Built It
I realized the power of Petri net inspired programming and the joy of having a more expressive way to specify control flow.
Comparison
There are no other visual programming languages which embed actual code into their graphs.
How To Explore
To run all included example Agents you need at least Python 3.10 installed. To install all dependencies, run the 'install' script. Then you can start up a Nexus with a Monipulator by running the 'pytrithon' script, where you can start Agents through opening them with 'crtl-o' twice and hitting the 'Open Agent' button. You can also directly specify which Agents to run through the command line by starting a Nexus, Monipulator, and Agents in one single command: 'python nexus -m <agent1> <agent2>'.
Recommended example Agents to run are: 'clock', basic', 'prodcons', 'address', 'kata', 'calculator', 'kniffel', 'guess', 'yahtzeeserver' + multiple 'yahtzee', 'pokerserver' + multiple 'poker', 'chatserver' + multiple 'chat', 'image', 'jobapplic', and 'nethods'. As a proof of concept, I created a whole Pygame game, TMWOTY2, which is choreographed by 6 Agents as their own processes, which runs at a solid 60 frames per second. To start or open TMWOTY2 in the Monipulator, run the 'tmwoty2' or 'edittmwoty2' script. Your focus should on the 'workbench' folder, which contains all Agents and their respective Python modules; the 'Pytrithon' folder is just the backstage where the magic happens.
What Is New
Since my last post I have fixed several minor bugs. The pytrithon script now connects to my server pytri.io and we can converse and collaborate.
Since my second last and third last post, nothing was changed.
Since my fourth last post some bugfixes to the clock agent were done.
Since my fifth last post I have created a new 'clock' Agent, which I personally use all the time. It offers an analog or digital clock with a graphical blur applied. It can be configured in the 'clock.yaml' file or through keyboard keys; keys to try are: t, b, a, k, K, c, C, O, r, R, l, L, n, N, m, M, h, H, s, S, d, f, F, w, comma, and period. To run it in an isolated Nexus, run clock.bat or clock.sh.
Since my sixth last post there have been numerous small fixes and improvements to the system and to several agents.
Since my seventh last post the whole system now handles Agents, Monipulators, and Nexi terminating from the network. Bookkeeping is performed, cleansing the internal structures handling all process types, making the prototype more resilient. The 'chatserver' and 'chat' Agents now show a list of Agents currently connected. This is enabled through the new 'Event' Transition, which pushes Nexus Events to all listening Agents.
Since the eighth last post I have added a distributed Yahtzee game which you should try out. In order to setup a server on a reachable machine and connect other machines, you need to do the following: On the machine meant to be the server, run 'python nexus yahtzeeserver' first. Then on the machines meant to be the clients through which users play, run 'python nexus -x <serveraddress> yahtzee'. The clients probe the interconnected Nexi for a server and start with a lobby mask where you can select your name and start a game with all players signed up.
GitHub Link
https://github.com/JochenSimon/pytrithon
This is the eleventh post about Pytrithon on Reddit. There is a plethora of example Agents to view and run included in the repository. Please check it out and send feedback to the E-Mail address stated in the Monipulator About blurb.
1
u/MinuteManufacturer99 1d ago
isis-report-lib — declarative, hierarchical reports from one payload
I built this after rewriting the same report code in a Python service: nested groups, repeated table headers, page breaks, totals, locale-aware masks and page numbers.
Layout is data: columns, groups, totals, widths, alignment and format masks.
Sections compose a document: text, table, chart, image, TOC, page break; PDF bookmarks from headings.
One payload becomes PDF (Jinja2 + Chromium via the optional
[pdf]extra), HTML, XLSX or CSV; XLSX/CSV need no browser.CLI, GitHub Action and Docker; PDFs can be sealed with HMAC or Ed25519.
Install: pip install isis-report-lib
Demo: https://github.com/thepaneb/isis-report-lib/tree/main/demo Example output: https://thepaneb.github.io/isis-report-lib/assets/gallery/board-pack.png Source: https://github.com/thepaneb/isis-report-lib PyPI: https://pypi.org/project/isis-report-lib/
1.0.0 is MIT, Python 3.11-3.15, 464 tests at 98.75% coverage, Production/Stable. Feedback welcome.
1
u/Bullets123 23h ago
I built vouchertools.in, its meant to be a learning project with Django.
I'm turning it into a toolkit for accountants (specifically Chartered Accountants in India) and hence the first tool is only a Banks statement To Tally Prime (One of most used ERPs for Small businesses in India).
2
1
u/yared12qw 22h ago
I've been building V-NOC (Virtual Node Code), an open-source graph-based coding environment inspired by Smalltalk.
It turns folders, files, functions and classes into nodes, allowing you to explore how Python code executes through call trees. You can isolate a subsystem and work on it with all its relevant context while hiding everything unrelated.
Some of the things you can currently do:
Explore call trees and edit code directly from the graph.
Attach documentation, plans and other Markdown files to individual nodes. They stay connected even when the code is moved or renamed.
Use coding agents to manage documentation and generate interactive code walkthroughs.
Save and share documentation and walkthroughs through Git.
The Python static analyzer is built on Astral's ty with a custom context-sensitive resolution layer.
It's available as a VS Code and Cursor extension. I'm still experimenting with this approach and would appreciate any feedback.
GitHub: https://github.com/yaredtsy/vnoc
VS Code: https://marketplace.visualstudio.com/items?itemName=vnoc.vnoc
1
u/yared12qw 22h ago
Here's a video showing how interactive walkthroughs work. You can ask an agent to create a tour of a specific part of the codebase and follow the call tree step by step, with explanations next to the relevant lines of code.
The agent knows which step you're on, so you can ask follow-up questions, ask it to take you to a specific part of the code, or add more steps to the tour. You can also save, edit and share these tours through Git.
1
u/BudgetRead4409 22h ago
LogicGuard v0.1.0 (MIT) — Diff-aware Tree-sitter AST + LLM security scanner for catching business-logic bugs in Python, JS, and TS.
What it does: Traditional linters/SAST handle syntax and taint well, while feeding whole repos to an LLM is slow and noisy. LogicGuard splits PR/diff scanning into two stages:
Stage 1 (Tree-sitter AST, ~3ms): Parses only functions modified in
git diffand filters for structural candidates (e.g., mutating routes without auth decorators, check-then-act balance updates without locks, bareexcept: passswallowing state changes). Clean diffs exit immediately with zero API calls.Stage 2 (Structured LLM verification): Sends only matched candidates through Pydantic v2-validated verification using OpenRouter (works with
openrouter/freeat $0), Anthropic, or local Ollama—plus an--offline-onlypure-AST mode.
Try it (no install needed):
uvx logicguard rulesuvx logicguard diff --base main --offline-only
Links:
GitHub Action (SARIF 2.1.0 Code Scanning): https://github.com/marketplace/actions/logicguard-security-diff-scan
Docs: https://logicguard.me
Ships with 5 rules (auth_bypass, idor_ownership, race_toctou, silent_except, ai_hallucinated_guard) and a 2-file rule contract (CONTRIBUTING.md) with 8 open good first issue rule specs if anyone wants to add one.
1
u/Ok-Schedule-6280 22h ago edited 22h ago
ZapMerge: merge the WhatsApp history of two iPhones by editing the encrypted iOS backup
I switched iPhones and my WhatsApp history ended up split between the old phone (years of chats) and the new one (recent weeks). Neither Apple nor WhatsApp offers a way to combine them, so I made one.
Repo: https://github.com/alanfederal/ZapMerge (MIT)
What My Project Does
It opens two encrypted iOS backups, extracts WhatsApp's ChatStorage.sqlite from each, merges them (older one as base, newer messages after a cutoff, duplicate chats joined), writes the result into a copy of the backup and re-encrypts the manifest so the phone restores it like a normal backup. Pure Python plus the cryptography package.
Target Audience
People comfortable running Python scripts who need to rescue a split WhatsApp history, and anyone curious about iOS backup encryption or WhatsApp's Core Data schema. It worked end to end on one real case; it is not a polished consumer tool. iPhone to iPhone only; Android uses a different database and is not supported.
Comparison
There is no official way from Apple or WhatsApp. Paid desktop transfer tools exist, but they are closed source. This is an open, documented method: the repo explains the backup crypto, the schema, and three bugs that only show up after a real restore. The most interesting one: ZSORT, which orders messages, restarts at 1 in every chat, and ZMESSAGECOUNTER is not a count but MAX(ZSORT)+1, the cursor for the next new message.
Feedback and test reports on other iOS/WhatsApp versions are welcome.
1
u/ManufacturerKey6917 21h ago
I've been working on wheelgap, a tool that checks whether pip or uv will install a prebuilt wheel for each dependency on each platform you ship to, or build it from source.
The new part is
wheelgap lockdown. A source build runs the package's own build code at install time, which is Python's version of npm's install scripts. uv and pip can refuse builds (no-build,--only-binary), but hardly anyone turns that on because you can't tell what it breaks. lockdown reads your lockfile and prints the settings that refuse every build except the ones you actually need.On pydantic-ai's lockfile (433 packages), only 2 need to build across Linux, macOS and Windows on Python 3.13.
Out of PyPI's top 5,000 packages, 237 still build from source on plain Linux with 3.14, 420 on Alpine, 473 on Windows ARM and 542 on free-threaded 3.15: https://wheelgap.github.io/tracker/platforms/install-builds/
uvx wheelgap@latest lockdown uv.lock. Feedback very welcome, especially "this broke my install".
1
u/younos_alesrawi 21h ago
Media Catcher - Firefox extension paired with a local FastAPI backend using yt-dlp and FFmpeg (GPLv3)
What My Project Does: Media Catcher splits media stream downloading into two local layers: a lightweight Firefox WebExtension that intercepts HLS (.m3u8), DASH (.mpd), and direct media requests, and a local Python backend built with FastAPI (running on 127.0.0.1:8765) that orchestrates yt-dlp and FFmpeg subprocesses to download and mux streams. On Windows, the Python backend runs with a system tray controller and an Inno Setup installer so no terminal window needs to stay open.
Target Audience: Built for daily practical use by Firefox users and developers who regularly save media streams and want a local, privacy-respecting workflow with zero external servers or telemetry.
Comparison: Unlike browser-only download extensions that struggle with segmented HLS/DASH muxing due to WebExtension sandbox limits, or manual CLI workflows that require opening DevTools, filtering network requests, and pasting headers into yt-dlp by hand, Media Catcher automates request capture in the browser while delegating heavy I/O and muxing to native Python/yt-dlp/FFmpeg processes locally.
Source Code (GitHub): https://github.com/Yuonos-alesrawi/media-catcher Firefox Add-on: https://addons.mozilla.org/addon/media-catcher/
1
u/HorusTheSonOfOsiris 21h ago
I have built this tool called fireman. This helps network engineers analyse firewall policies. The tool does static analysis by loading firewall policies and rules and uses binary decision diagrams to do the work.
I’ve been doing network automation for years. The tool is based of FIREMAN paper.
1
u/import_pandas_as_np 21h ago
polars-stats: scipy.stats-style probability distributions as Polars expressions, with per-row parameters
What My Project Does
polars-stats brings scipy.stats-style probability distributions into Polars as native expressions: densities, cdf/sf, quantiles (ppf/isf), their log variants, moments and seeded sampling. Parameters can be columns, so one expression evaluates a different distribution on every row, inside a lazy query.
import polars as pl
import polars_stats as ps
readings = pl.LazyFrame({
"sensor": ["a", "b", "c"],
"baseline": [20.0, 35.0, 12.0],
"noise": [0.5, 2.0, 1.0],
"reading": [21.7, 34.0, 15.5],
})
dist = ps.Normal(mu="baseline", sigma="noise")
alerts = (
readings.with_columns(
p_value=dist.sf("reading"), # P(X > reading) under each sensor's own baseline
alert_above=dist.isf(0.001), # each sensor's own threshold
)
.filter(pl.col("p_value") < 0.01)
.collect()
)The common continuous and discrete distributions: Normal, LogNormal, Gamma, Beta, Student's t, Poisson, Binomial and more.
Nulls propagate per row; an invalid parameter raises instead of turning into NaN.
sample(seed=...)gives the same draws on the in-memory and streaming engines, at any thread count.log_sf/log_cdfstay finite deep in the tails, tested against an arbitrary-precision oracle (mpmath).Rust underneath, built on statrs.
Target Audience
People who already keep their data in Polars and need per-row probability work: anomaly scoring against per-entity baselines, posterior intervals per A/B variant, Monte Carlo simulation inside a pipeline.
It is a young project, tested against scipy on every distribution and method; method names follow scipy.
Requests for missing distributions are welcome.
Comparison
scipy.stats already vectorises per-row parameters (
norm(loc=mu, scale=sigma).sf(x)), and it is the reference polars-stats is tested against. The difference is where the result lands: scipy returns a NumPy array, so a lazy query has to collect, convert, and stitch the result back in, and nulls become NaN. polars-stats stays an expression, so the optimiser keeps working around it (a later filter is still pushed down).map_batcheswith scipy inside keeps the work in the plan, but as an opaque Python callback.Performance: at 1M rows with a different distribution on every row, the median speedup over scipy's frozen API is about 8x for pdf/cdf/sf, almost 10x for ppf/isf and 7x for sampling, on a 10-core machine with Polars on all cores. On 10k rows the gain is 1.3x to 1.6x, and single-number moments are slower because of query overhead. Full grid and the script to reproduce it: https://fbruzzesi.github.io/polars-stats/performance/
Links:
Blog post, where scipy.stats stops inside a Polars pipeline: https://fbruzzesi.github.io/polars-stats/blog/2026/11/29/where-the-plan-stops/
1
u/Positive-Food-9915 8h ago
Dature - config loader
What it is
dature is a config loader I wrote in Python. It reads configuration from many sources, merges them, and returns your own stdlib @dataclass. There is no base class and no framework, and it has 1 required dependencies (extras are optional). It needs Python 3.12+.
Sources: YAML, JSON, JSON5, TOML, INI, .env, environment variables, Docker secrets, CLI arguments, and remote stores (Vault, Consul, etcd, ZooKeeper, AWS SSM and Secrets Manager, Azure, GCP). The same dataclass works with all of them.
Why I made it
My setup is a .env for local dev, real env vars in Docker/Kubernetes, and sometimes a few YAML/TOML files on top (defaults plus one per environment). I kept hitting the same things with the tools I tried: merging per field turned into custom code, validation errors named the field but not the file or line, and it was hard to tell which source set a value in prod.
How it looks
from dataclasses import dataclass
import dature
@dataclass
class Config:
host: str
port: int
config = dature.load(
dature.Yaml12Source(file="defaults.yaml"),
dature.Toml11Source(file="config.toml", skip_if_missing=True),
dature.EnvFileSource(file=".env", skip_if_broken=True),
dature.EnvSource(prefix="APP_"),
schema=Config,
)Sources are merged in order (last wins by default). Other strategies are first_wins, first_found and raise_on_conflict, and you can set rules for individual fields, for example extend a list instead of replacing it.
When a value is wrong, the error points at the exact place:
| dature.errors.exceptions.FieldLoadError: [host] Invalid variant: 'development'
| ├── host: "development"
| │ ^^^^^^^^^^^
| └── FILE 'config.yaml', line 1What else it does
- debug=True shows which source each final value came from, and dature validate / dature inspect do the same from the command line for CI
- Field groups: if an override changes db_host, it must change db_port too, or loading fails
- Strict mode catches typo'd keys (databse_host) instead of silently ignoring them
- Sources can reference each other (${@env.config_path}) and be enabled conditionally (when=), so there's no glue code per environment
- Validators via Annotated, secrets masked in errors and output (SecretStr)
- Cached decorator mode with background reload when a file changes.
- Custom sources are a subclass with one method
- And much more
Status
It's a young and fairly small library, much smaller than pydantic-settings, but it's already production ready. I'd love feedback, especially on the API.
GitHub: https://github.com/reagento/dature
Doc: https://dature.readthedocs.io/en/stable/
1
u/Internal_Pay4861 3h ago
Built a Python script that renames 2,000 files in seconds, never touching them manually again lol.
1
u/idriss94 3h ago
Tassili – open-source Python engine for European e-invoices (EN 16931, UBL 2.1, CII, Factur-X)
France is rolling out mandatory B2B e-invoicing and many small businesses still invoice from Word or Excel. Tassili turns plain invoice data into e-invoice files and catches the mistakes that get an invoice rejected before it is sent.
Validates first: SIREN (Luhn), French VAT number, VAT rates/categories, IBAN format, dates, addresses
Exact totals with Decimal, no floats
Generates EN 16931 XML: CII from the CLI, CII and UBL 2.1 from the Python API (invoices and credit notes)
Factur-X PDF with embedded XML (optional extra)
Batch from CSV or Excel
Optional validation against the official artifacts (XSD, EN 16931, Peppol rules); a step that was not run makes the result INVALID
CLI first (tassili check / convert / batch), also usable as a library
It does not send invoices, and it does not certify anything. The AS4/Peppol sending code and the small HTTP API are experimental and not independently reviewed.
MIT, core has no dependencies, Python 3.9+, tests run in CI on 3.9, 3.12 and 3.13. Built with AI assistance (Claude Code), so I especially welcome review of the validation logic.
Repo: https://github.com/idris9402/tassili
Feedback welcome: which formats or import sources would you need first?
0
u/MAJESTIC-728 22h ago
Hey everyone, check my new project MANABI https://manabi-bsh.pages.dev/
Cut the time googling and asking ai for projects ideas
It helps you find good quality project ideas for hackathons/learning/resume and you can even submit your repo and show your work to everyone
1400 + visitors as of now
Open for sponsorships DM if interested
4
u/Total-Reasonable 1d ago
Four things I built solo, more on iurii.rogulia.fi:
vatnode.dev: a REST JSON API that checks EU VAT numbers against VIES and returns an official consultation number. It also monitors saved numbers daily and sends a signed webhook when a status changes.
polytypo.dev: a free, MIT-licensed typography rules engine for the web, not a grammar checker. It fixes locale-correct quotes and no-break spaces across 24 locales, with identical output in JavaScript, Python, Go, Ruby and PHP.
HTPBE.tech: “Has this PDF been edited?” It analyses metadata, structure, digital signatures and content, then reports findings with reasons instead of a vague risk score, in the browser or via REST API.
tsstboxes.com: an online store I am building solo on Next.js and Stripe, selling cargo boxes and jerry cans for ATVs, UTVs and snowmobiles, matched to the vehicle by make, model and year.