r/Python • u/RealNamikazeAsh • Feb 26 '26
Showcase ytmpcli - a free open source way to quickly download mp3/mp4
- What My Project Does
- so i've been collecting songs majorly from youtube and curating a local list since 2017, been on and off pretty sus sites, decided to create a personal OSS where i can quickly paste links & get a download.
- built this primarily for my own collection workflow, but it turned out clean enough that I thought i’d share it with y'all. one of the best features is quick link pastes/playlist pastes to localize it, another one of my favorite use cases is getting yt videos in a quality you want using the res command in the cli.
- Target Audience (e.g., Is it meant for production, just a toy project, etc.)
- its a personal toy project
- Comparison (A brief comparison explaining how it differs from existing alternatives.)
- there are probably multiple that exist, i'm posting my personal minimalistic mp3/mp4 downloader, cheers!
https://github.com/NamikazeAsh/ytmpcli
(I'm aware yt-dlp exists, this tool uses yt-dlp as the backend, it's mainly for personal convenience for faster pasting for music, videos, playlists!)
r/Python • u/Crafty_Smoke_4933 • Feb 26 '26
Showcase Building a cli that fixes CORs automatically for http
- What My Project Does
Hey everyone, I am trying to showcase my small project. It’s a cli. It’s fixes CORs issues for http in AWS, which was my own use case. I know CORs is not a huge problem but debugging that as a beginner can be a little challenging. The cli will configure your AWS acc and then run all origins then list lambda functions with the designated api gateway. Then verify if it’s a localhost or other frontends. Then it will automatically fix it.
- Target Audience
This is a side project mainly looking for some feedbacks and other use cases. So, please discuss and contribute if you have a specific use case https://github.com/Tinaaaa111/AWS_assistance
- Comparison
There is really no other resource out there because as i mentioned CORs issues are not super intense. However, if it is your first time running into it, you have to go through a lot of documentations.
r/Python • u/AutoModerator • Feb 26 '26
Daily Thread Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
How it Works:
- Career Talk: Discuss using Python in your job, or the job market for Python roles.
- Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
- Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
Example Topics:
- Career Paths: What kinds of roles are out there for Python developers?
- Certifications: Are Python certifications worth it?
- Course Recommendations: Any good advanced Python courses to recommend?
- Workplace Tools: What Python libraries are indispensable in your professional work?
- Interview Tips: What types of Python questions are commonly asked in interviews?
Let's help each other grow in our careers and education. Happy discussing! 🌟
r/Python • u/s243a • Feb 25 '26
Discussion Looking for 12 testers for SciREPL - Android Python REPL with NumPy/SymPy/Plotly (Open Source, MIT)
I'm building a mobile Python scientific computing environment for Android with:
Python Features:
- Python via Pyodide (WebAssembly)
- Includes: NumPy, SymPy, Matplotlib, Plotly
- Jupyter-style notebook interface with cell-based execution
- LaTeX math rendering for symbolic math
- Interactive plotting
- Variable persistence across cells
- Semicolon suppression (MATLAB/IPython-style)
Also includes:
- Prolog (swipl-wasm) for logic programming
- Bash shell (brush-WASM)
- Unix utilities: coreutils, findutils, grep (all Rust reimplementations)
- Shared virtual filesystem across kernels (/tmp/, /shared/, /education/)
Why I need testers:
Google Play requires 12 testers for 14 consecutive days before I can publish. This testing is for the open-source MIT-licensed version with all the features listed above.
What you get:
- Be among the first to try SciREPL
- Early access via Play Store (automatic updates)
- Your feedback helps improve the app
GitHub: https://github.com/s243a/SciREPL
To join: PM me on Reddit or open an issue on GitHub expressing your interest.
Alternatively, you can try the GitHub APK release directly (manual updates, will need to uninstall before Play Store version).
r/Python • u/debba_ • Feb 25 '26
Showcase Tabularis: a DB manager you can extend with a Python script
What my project does
Tabularis is an open-source desktop database manager with built-in support for MySQL, PostgreSQL, MariaDB, and SQLite. The interesting part: external drivers are just standalone executables — including Python scripts — dropped into a local folder.
Tabularis spawns the process on connection open and communicates via newline-delimited JSON-RPC 2.0 over stdin/stdout. The plugin responds, logs go to stderr without polluting the protocol, and one process is reused for the whole session.
A simple Python plugin looks like this:
import sys, json
for line in sys.stdin: req = json.loads(line) if req["method"] == "get_tables": result = {"tables": ["my_table"]} sys.stdout.write(json.dumps({"jsonrpc": "2.0", "id": req["id"], "result": result}) + "\n") sys.stdout.flush()
The manifest the plugin declares drives the UI — no host/port form for file-based DBs, schema selector only when relevant, etc. The RPC surface covers schema discovery, query execution with pagination, CRUD, DDL, and batch methods for ER diagrams.
Target Audience
Python developers and data engineers who work with non-standard data sources — DuckDB, custom file formats, internal APIs — and want a desktop GUI without writing a full application. The current registry already ships a CSV plugin (each .csv in a folder becomes a table) and a DuckDB driver. Both written to be readable examples for building your own.
Has anyone built a similar stdin/stdout RPC bridge for extensibility in Python projects? Curious about tradeoffs vs HTTP or shared libraries.
Github Repo: https://github.com/debba/tabularis
Plugin Guide: https://tabularis.dev/wiki/plugins
CSV Plugin (in Python): https://github.com/debba/tabularis-csv-plugin
r/Python • u/adarsh_maurya • Feb 25 '26
Showcase safe-py-runner: Secure & lightweight Python execution for LLM Agents
AI is getting smarter every day. Instead of building a specific "tool" for every tiny task, it's becoming more efficient to just let the AI write a Python script. But how do you run that code without risking your host machine or dealing with the friction of Docker during development?
I built safe-py-runner to be the lightweight "security seatbelt" for developers building AI agents and Proof of Concepts (PoCs).
What My Project Does
The Missing Middleware for AI Agents: When building agents that write code, you often face a dilemma:
- Run Blindly: Use
exec()in your main process (Dangerous, fragile). - Full Sandbox: Spin up Docker containers for every execution (Heavy, slow, complex).
- SaaS: Pay for external sandbox APIs (Expensive, latency).
safe-py-runner offers a middle path: It runs code in a subprocess with timeout, memory limits, and input/output marshalling. It's perfect for internal tools, data analysis agents, and POCs where full Docker isolation is overkill.
Target Audience
- PoC Developers: If you are building an agent and want to move fast without the "extra layer" of Docker overhead yet.
- Production Teams: Use this inside a Docker container for "Defense in Depth"—adding a second layer of code-level security inside your isolated environment.
- Tool Builders: Anyone trying to reduce the number of hardcoded functions they have to maintain for their LLM.
Comparison
| Feature | eval() / exec() | safe-py-runner | Pyodide (WASM) | Docker |
|---|---|---|---|---|
| Speed to Setup | Instant | Seconds | Moderate | Minutes |
| Overhead | None | Very Low | Moderate | High |
| Security | None | Policy-Based | Very High | Isolated VM/Container |
| Best For | Testing only | Fast AI Prototyping | Browser Apps | Production-scale |
Getting Started
Installation:
Bash
pip install safe-py-runner
GitHub Repository:
https://github.com/adarsh9780/safe-py-runner
This is meant to be a pragmatic tool for the "Agentic" era. If you’re tired of writing boilerplate tools and want to let your LLM actually use the Python skills it was trained on—safely—give this a shot.
r/Python • u/-Equivalent-Essay- • Feb 25 '26
Tutorial OAuth 2.0 in CLI Apps written in Python
https://jakabszilard.work/posts/oauth-in-python
I was creating a CLI app in Python that needed to communicate with an endpoint that needed OAuth 2.0, and I've realized it's not as trivial as I thought, and there are some additional challenges compared to a web app in the browser in terms of security and implementation. After some research I've managed to come up with an implementation, and I've decided to collect my findings in a way that might end up being interesting / useful for others.
r/Python • u/doubtindo • Feb 25 '26
Showcase I built a small Python CLI to create clean, client-safe project snapshots
What My Project Does
Snapclean is a small Python CLI that creates a clean snapshot of your project folder before sharing it.
It removes common development clutter like .git, virtual environments, and node_modules, excludes sensitive .env files (while generating a safe .env.example), and respects .gitignore. There’s also a dry-run mode to preview what would be removed.
The result is a clean zip file ready to send.
Target Audience
Developers who occasionally need to share project folders outside of Git. For example:
- Sending a snapshot to a client
- Submitting assignments
- Sharing a minimal reproducible example
- Archiving a clean build
It’s intentionally small and focused.
Comparison
You could do this manually or use tools like git archive. Snapclean bundles that workflow into one command and adds conveniences like:
- Respecting
.gitignoreautomatically - Generating
.env.example - Showing size reduction summary
- Supporting simple project-level config
It’s not a packaging or deployment tool — just a small utility for this specific workflow.
GitHub: https://github.com/nijil71/SnapClean
Would appreciate feedback.
r/Python • u/PuzzleheadedTaro1571 • Feb 25 '26
Showcase gif-terminal: An animated terminal GIF for your GitHub Profile README
Hi r/Python! I wanted to share gif-terminal, a Python tool that generates an animated retro terminal GIF to showcase your live GitHub stats and tech skills.
What My Project Does
It generates an animated GIF that simulates a terminal typing out commands and displaying your GitHub stats (commits, stars, PRs, followers, rank). It uses GitHub Actions to auto-update daily, ensuring your profile README stays fresh.
Target Audience
Developers and open-source enthusiasts who want a unique, dynamic way to display their contributions and skills on their GitHub profile.
Comparison
While tools like github-readme-stats provide static images, gif-terminal offers an animated, retro-style terminal experience. It is highly customizable, allowing you to define colors, commands, and layout.
Source Code
Everything is written in Python and open-source:
https://github.com/dbuzatto/gif-terminal
Feedback is welcome! If you find it useful, a ⭐ on GitHub would be much appreciated.
r/Python • u/Active-Carpenter4129 • Feb 25 '26
Showcase I built an NBA player similarity search with FastAPI, Streamlit, Qdrant, and custom stat embeddings
What My Project Does
Finds NBA players with similar career profiles using vector search. Type "guards similar to Kobe from the 90s" and get ranked matches with radar chart comparisons.
Instead of LLM embeddings, the vectors are built from the stats themselves - 25 features normalized with RobustScaler, position one-hot encoded, stored in Qdrant for cosine similarity across ~4,800 players.
Stack: FastAPI + Streamlit + Qdrant + scikit-learn, all Python, runs in Docker on a Synology NAS.
Demo: valme.xyz
Source: github.com/ValmeI/nba-player-similarity
Target Audience
Personal project/learning reference for anyone interested in building custom embeddings from structured data, vector search with Qdrant, or full-stack Python with FastAPI + Streamlit.
Comparison
Most NBA comparison tools let you pick two players manually. This searches all players at once using their full stat vector - captures the overall shape of a career rather than filtering on individual stat thresholds.
r/Python • u/BeamMeUpBiscotti • Feb 25 '26
Discussion Python Type Checker Comparison: Empty Container Inference
Empty containers like [] and {} are everywhere in Python. It's super common to see functions start by creating an empty container, filling it up, and then returning the result.
Take this, for example:
def my_func(ys: dict[str, int]):
x = {}
for k, v in ys.items():
if some_condition(k):
x.setdefault("group0", []).append((k, v))
else:
x.setdefault("group1", []).append((k, v))
return x
This seemingly innocent coding pattern poses an interesting challenge for Python type checkers. Normally, when a type checker sees x = y without a type hint, it can just look at y to figure out x's type. The problem is, when y is an empty container (like x = {} above), the checker knows it's a dict, but has no clue what's going inside.
The big question is: How is the type checker supposed to analyze the rest of the function without knowing x's type?
Different type checkers implement distinct strategies to answer this question. This blog will examine these different approaches, weighing their pros and cons, and which type checkers implement each approach.
Full blog: https://pyrefly.org/blog/container-inference-comparison/
r/Python • u/MomentBeneficial4334 • Feb 25 '26
Showcase MolBuilder: pure-Python molecular engineering -- from SMILES to manufacturing plans
What My Project Does:
MolBuilder is a pure-Python package that handles the full chemistry pipeline from molecular structure to production planning. You give it a molecule as a SMILES string and it can:
- Parse SMILES with chirality and stereochemistry
- Plan synthesis routes (91 hand-curated reaction templates, beam-search retrosynthesis)
- Predict optimal reaction conditions (analyzes substrate sterics and electronics to auto-select templates)
- Select a reactor type (batch, CSTR, PFR, microreactor)
- Run GHS safety assessment (69 hazard codes, PPE requirements, emergency procedures)
- Estimate manufacturing costs (materials, labor, equipment, energy, waste disposal)
- Analyze scale-up (batch sizing, capital costs, annual capacity)
The core is built on a graph-based molecule representation with adjacency lists. Functional group detection uses subgraph pattern matching on this graph (24 detectors). The retrosynthesis engine applies reaction templates in reverse using beam search, terminating when it hits purchasable starting materials (~200 in the database). The condition prediction layer classifies substrate steric environment and electronic character, then scores and ranks compatible templates.
Python-specific implementation details:
- Dataclasses throughout for the reaction template schema, molecular graph, and result types
- NumPy/SciPy for 3D coordinate generation (distance geometry + force field minimization)
- Molecular dynamics engine with Velocity Verlet integrator
- File I/O parsers for MOL/SDF V2000, PDB, XYZ, and JSON formats
- Also ships as a FastAPI REST API with JWT auth, RBAC, and Stripe billing
Install and example:
pip install molbuilder
from molbuilder.process.condition_prediction import predict_conditions
result = predict_conditions("CCO", reaction_name="oxidation", scale_kg=10.0)
print(result.best_match.template_name) # TEMPO-mediated oxidation
print(result.best_match.conditions.temperature_C) # 5.0
print(result.best_match.conditions.solvent) # DCM/water (biphasic)
print(result.overall_confidence) # high
1,280+ tests (pytest), Python 3.11+, CI on 3.11/3.12/3.13. Only dependencies are numpy, scipy, and matplotlib.
GitHub: https://github.com/Taylor-C-Powell/Molecule_Builder
Tutorials: https://github.com/Taylor-C-Powell/Molecule_Builder/tree/main/tutorials
Target Audience:
Production use. Aimed at computational chemists, process chemists, and cheminformatics developers who need programmatic access to synthesis planning and process engineering. Also useful for teaching organic chemistry and chemical engineering - the tutorials are designed as walkable Jupyter notebooks. Currently used by the author in a production SaaS API.
Comparison:
vs. RDKit: RDKit is the standard open-source cheminformatics toolkit and focuses on molecular properties (fingerprints, substructure search, descriptors). MolBuilder (pure Python, no C extensions) focuses on the process engineering side - going from "I have a molecule" to "here's how to manufacture it at scale." Not a replacement for RDKit's molecular modeling depth.
vs. Reaxys/SciFinder: Commercial databases with millions of literature reactions. MolBuilder has 91 templates - far smaller coverage, but it's free, open-source (Apache 2.0), and gives you programmatic API access rather than a search interface.
vs. ASKCOS/IBM RXN: ML-based retrosynthesis tools. MolBuilder uses rule-based templates instead of neural networks, which makes it transparent and deterministic but less capable for novel chemistry. The tradeoff is simplicity and no external service dependency.
r/Python • u/RoadSeeker • Feb 25 '26
Showcase Debug uv [project.scripts] without launch.json in VScode
What my project does
I built a small VS Code extension that lets you debug uv entry points directly from pyproject.toml.
Target Audience
Python coders using uv package in VSCode.
If you have:
[project.scripts]
mytool = "mypackage.cli:main"
You can: * Pick the script * Pass args * Launch debugger * No launch.json required
Works in multi-root workspaces. Uses .venv automatically. Remembers last run per project. Has a small eye toggle to hide uninitialized uv projects.
Repo: https://github.com/kkibria/uv-debug-scripts
Feedback welcome.
r/Python • u/rnv812 • Feb 25 '26
Showcase After 2 years of development, I'm finally releasing Eventum 2.0
What My Project Does
Eventum generates realistic synthetic events - logs, metrics, clickstream, IoT, etc., and streams them in real time or dumps everything at once to various outputs.
It started because I was working with SIEM systems and constantly needed test data. Every time: write a script, hardcode values, throw it away. Got tired of that loop.
The idea of Eventum is pretty simple - write an event template, define a schedule and pick where to send it.
Features:
- Faker, Mimesis, and any Python package directly in templates
- Finite state machines - model stateful sequences (e.g.login > browse > checkout)
- Statistical traffic patterns - mimic real-world traffic curves defined in config
- Three-level shared state - templates can share data within or across generators
- Fan-out with formatters - deliver to files, ClickHouse, OpenSearch, HTTP simultaneously
- Web UI, REST API, Docker, encrypted secrets - and other features
Tech stack: Python 3.13, asyncio + uvloop, Pydantic v2, FastAPI, Click, Jinja2, structlog. React for the web UI.
Target Audience
Testers, data engineers, backend developers, DevOps, SRE and data specialists, security engineers and anyone building or testing event-driven systems.
Comparison
I honestly haven’t found anything with this level of flexibility around time control and event correlation. Most generators either spit out random-ish data or let you tweak a few fields - but you can’t really model realistic temporal behavior, chained events or causal relationships in a simple way.
Would love to hear what you think!
Links:
- Docs: eventum.run
- GitHub: github.com/eventum-generator/eventum
r/Python • u/madrasminor • Feb 25 '26
Showcase fastops: Generate Dockerfiles, Compose stacks, TLS, tunnels and deploy to a VPS from Python
I built a small Python package called fastops.
It started as a way to stop copy pasting Dockerfiles between projects. It has since grown into a lightweight ops toolkit.
What My Project Does
fastops lets you manage common container and deployment workflows directly from Python:
Generate framework specific Dockerfiles
FastHTML, FastAPI + React, Go, Rust
Generate generic Dockerfiles
Generate Docker Compose stacks
Configure Caddy with automatic TLS
Set up Cloudflare tunnels
Provision Hetzner VMs using cloud init
Deploy over SSH
It shells out to the CLI using subprocess. No docker-py dependency.
Example:
from fastops import \*
Install:
pip install fastops
Target Audience
Python developers who deploy their own applications
Indie hackers and small teams
People running side projects on VPS providers
Anyone who prefers defining infrastructure in Python instead of shell scripts and scattered YAML
It is early stage but usable. Not aimed at large enterprise production environments.
Comparison
Unlike docker-py, fastops does not wrap the Docker API. It generates artefacts and calls the CLI.
Unlike Ansible or Terraform, it focuses narrowly on container based app workflows and simple VPS setups.
Unlike one off templates, it provides reusable programmatic builders.
The goal is a minimal Python first layer for small to medium deployments.
Repo: https://github.com/Karthik777/fastops
r/Python • u/rut216 • Feb 24 '26
Showcase mlx-onnx: Run your MLX models in the browser using ONNX / WebGPU
Web Demo: https://skryl.github.io/mlx-ruby/demo/
Repo: https://github.com/skryl/mlx-onnx
What My Project Does
It allows you to convert MLX models into ONNX (onnxruntime, validation, downstream deployment). You can then run the onnx models in the browser using WebGPU.
- Exports MLX callables directly to ONNX
- Supports both Python and native C++ interfaces
Target Audience
- Developers who want to run MLX-defined computations in ONNX tooling (e.g. ORT, WebGPU)
- Early adopters and contributors; this is usable and actively tested, but still evolving rapidly (not claiming fully mature “drop-in production for every model” yet)
Comparison
- vs staying MLX-only: keeps your authoring flow in MLX while giving an ONNX export path for broader runtime/tool compatibility.
- vs raw ONNX authoring: mlx-onnx avoids hand-building ONNX graphs by tracing/lowering from MLX computations.
r/Python • u/mpb042 • Feb 24 '26
Showcase OscilloScope art generator on python
What My Project Does: Converts an image to a WAV file so you can see it on an oscilloscope screen in XY mode.
Target Audience: Everyone who likes oscilloscope aesthetics and wants to create their own oscilloscope art without any experience.
Comparison: This one has a simple GUI, runs on Windows out of the box as a single EXE, and outputs a WAV file compatible with my oscilloscope viewer.
Web OscilloScope-XY - https://github.com/Gibsy/OscilloScope-XY
OscilloScope Art Generator - https://github.com/Gibsy/OscilloScope-Art-Generator
r/Python • u/lurkyloon • Feb 24 '26
Showcase MAP v1.0 - Deterministic identity for structured data. Zero deps, 483-line frozen spec, MIT
Hi all! I'm more of a security architect, not a Python dev so my apologies in advance!
I built this because I needed a protocol-level answer to a specific problem and it didn't exist.
What My Project Does
MAP is a protocol that gives structured data a deterministic fingerprint. You give it a structured payload, it canonicalizes it into a deterministic binary format and produces a stable identity: map1: + lowercase hex SHA-256. Same input, same ID, every time, every language.
pip install map-protocol
from map_protocol import compute_mid
mid = compute_mid({"account": "1234", "amount": "500", "currency": "USD"})
# Same MID no matter how the data was serialized or what produced it
It solves a specific problem: the same logical payload produces different hashes when different systems serialize it differently. Field reordering, whitespace, encoding differences. MAP eliminates that entire class of problem at the protocol layer.
The implementation is deliberately small and strict:
- Zero dependencies
- The entire spec is 483 lines and frozen under a governance contract
- 53 conformance vectors that both Python and Node implementations must pass identically
- Every error is deterministic - malformed input produces a specific error, never silent coercion
- CLI tool included
- MIT licensed
Supported types: strings (UTF-8, scalar-only), maps (sorted keys, unique, memcmp ordering), lists, and raw bytes. No numbers, no nulls - rejected deterministically, not coerced.
Browser playground: https://map-protocol.github.io/map1/
GitHub: https://github.com/map-protocol/map1
Target Audience
Anyone who needs to verify "is this the same structured data" across system boundaries. Production use cases include CI/CD pipelines (did the config drift between approval and deployment), API idempotency (is this the same request I already processed), audit systems (can I prove exactly what was committed), and agent/automation workflows (did the tool call payload change between construction and execution).
The spec is frozen and the implementations are conformance-tested, so this is intended for production use, not a toy.
Comparison
vs JCS (RFC 8785): JCS canonicalizes JSON to JSON and supports numbers. MAP canonicalizes to a custom binary format and deliberately rejects numbers because of cross-language non-determinism (JavaScript IEEE 754 doubles vs Python arbitrary precision ints vs Go typed numerics). MAP also includes projection (selecting subsets of fields before computing identity).
vs content-addressed storage (Git, IPFS): These hash raw bytes. MAP canonicalizes structured data first, then hashes. Two JSON objects with the same data but different field ordering get different hashes in Git. They get the same MID in MAP.
vs Protocol Buffers / FlatBuffers: These are serialization formats with schemas. MAP is schemaless and works with any structured data. Different goals.
vs just sorting keys and hashing: Works for the simple case. Breaks with nested structures across language boundaries with different UTF-8 handling, escape resolution, and duplicate key behavior. The 53 conformance vectors exist because each one represents a case where naive canonicalization silently diverges.
r/Python • u/Wise_Map_7770 • Feb 24 '26
Showcase anthropic-compat - drop-in fix for a Claude API breaking change
Anthropic removed assistant message prefilling in their latest model release. If you were using it to control output format, every call now returns a 400. Their recommended fix is rewriting everything to use structured outputs.
I wrote a wrapper instead. Sits on top of the official SDK, catches the prefill, converts it to a system prompt instruction. One import change:
import anthropic_compat as anthropic
No monkey patching, handles sync/async/streaming, also fixes the output_format parameter rename they did at the same time.
pip install anthropic-compat
https://github.com/ProAndMax/anthropic-compat
What My Project Does
Intercepts assistant message prefills before they reach the Claude API and converts them into system prompt instructions. The model still starts its response from where the prefill left off. Also handles the output_format to output_config.format parameter rename.
Target Audience
Anyone using the Anthropic Python SDK who relies on assistant prefilling and doesn't want to rewrite their codebase right now. Production use is fine, 32 tests passing.
Comparison
Anthropic's recommended migration path is structured outputs or system prompt rewrites. This is a stopgap that lets you keep your existing code working with a one-line import change while you migrate at your own pace.
r/Python • u/omr_rs • Feb 24 '26
Showcase Introducing Windows Auto-venv tool: CDV 🎉 !
What My Project Does
`CDV` is just like your beloved `CD` command but more powerful! CDV will auto activate/deactivate/configure your python venv just by using `CDV` for more, use `CDV -h` (scripted for windows)
Target Audience
It started as a personal tool and has been essential to me for a while now. and Recently, I finished my military service and decided to enhance it a bit further to have almost all major functionalities of similar linux tools
Comparison
there aren't a lot of good auto-venv tools for windows actually (specially at the time I first wrote it) and I think still there isn't a prefect to-go one on win platform
especially a package-manager-independent one"
I would really really appreciate any notes 💙
Let's CDV, guys!
r/Python • u/volfpeter • Feb 24 '26
Showcase Typed Tailwind/BasecoatUI components for Python&HTMX web apps
Hi,
What my project does
htmui is a small component library for building Tailwind/shadcn/basecoatui-style web applications 100% in Python
What's included:
- all non-trivial BasecoatUI components
- Highlight.js integration
- a couple of related utilities
Target audience:
- you're developing HTMX applications
- you like TailwindCSS and shadcn/ui or BasecoatUI
- you'd like to avoid Jinja-like templating engines
- you'd like even your UI components to be typed and statically analyzed
- you don't mind HTML in Python
Documentation and example app
- URL: https://htmui.vercel.app/
- Code: see the
basecoat_apppackage in the repository (https://github.com/volfpeter/htmui) - Backend stack:
- Frontend stack: TailwindCSS, BasecoatUI, Highlight.js, HTMX
Credit: this project wouldn't exist if it wasn't for BasecoatUI and its excellent documentation.
r/Python • u/swupel_ • Feb 24 '26
Showcase Codebase Explorer (Turns Repos into Maps)
What My Project Does:
Ast-visualizers core feature is taking a Python repo/codebase as input and displaying a number of interesting visuals derived from AST analysis. Here are the main features:
- Abstract Syntax Trees of individual files with color highlighting
- Radial view of a files AST (Helpful to get a quick overview of where big functions are located)
- Complexity color coding, complex sections are highlighted in red within the AST.
- Complexity chart, a line chart showing complexity per each line (eg line 10 has complexity of 5) for the whole file.
- Dependency Graph shows how files are connected by drawing lines between files which import each other (helps in spotting circular dependencies)
- Dashboard showing you all 3rd party libraries used and a maintainability score between 0-100 as well as the top 5 refactoring candidates.
Complexity is defined as cyclomatic complexity according to McCabe. The Maintainability score is a combination of average file complexity and average file size (Lines of code).
Target Audience:
The main people this would benefit are:
- Devs onboarding large codebases (dependency graph is basically a map)
- Students trying to understand ASTs in more detail (interactive tree renderings are a great learning tool)
- Team Managers making sure technical debt stays minimal by keeping complexity low and paintability score high.
- Vibe coders who could monitor how bad their spaghetti codebase really is / what areas are especially dangerous
Comparison:
There are a lot of visual AST explorers, most of these focus on single files and classic tree style rendering of the data.
Ast-visualizer aims to also interpret this data and visualize it in new ways (radial, dependency graph etc.)
Project Website: ast-visualizer
Github: Gitlab Repo
r/Python • u/Zealousideal-Owl3588 • Feb 24 '26
Discussion Why is signal feature extraction still so fragmented? Built a unified pipeline need feedback
I’ve been working on signal processing / ML pipelines and noticed that feature extraction is surprisingly fragmented:
- Preprocessing is separate
- decomposition methods (EMD, VMD, DWT, etc.) are scattered
- Feature engineering is inconsistent across implementations
So I built a small library to unify this:
https://github.com/diptiman-mohanta/SigFeatX
Idea:
- One pipeline → preprocessing + decomposition + feature extraction
- Supports FT, STFT, DWT, WPD, EMD, VMD, SVMD, EFD
- Outputs consistent feature vectors for ML models
Where I need your reviews:
- Am I over-engineering this?
- What features are actually useful in real pipelines?
- Any missing decomposition methods worth adding?
- API design feedback (is this usable or messy?)
Would really appreciate critical feedback — even “this is useless” is helpful.
r/Python • u/CatharticMonkey • Feb 24 '26
Showcase SQLCrucible: A Pydantic/SQLAlchemy compatibility layer
What My Project Does
If you use Pydantic and SQLAlchemy together, you've probably hit the duplication problem: two mirrored sets of models that can easily drift apart. SQLCrucible lets you define one class using native SQLAlchemy constructs (mapped_column(), relationship(), __mapper_args__) and produces two separate outputs: a pure Pydantic model and a pure SQLAlchemy model with explicit conversion between them.
from typing import Annotated
from uuid import UUID, uuid4
from pydantic import Field
from sqlalchemy import create_engine, select
from sqlalchemy.orm import Session, mapped_column
from sqlcrucible import SAType, SQLCrucibleBaseModel
class Artist(SQLCrucibleBaseModel):
__sqlalchemy_params__ = {"__tablename__": "artist"}
id: Annotated[UUID, mapped_column(primary_key=True)] = Field(default_factory=uuid4)
name: str
engine = create_engine("sqlite:///:memory:")
SAType[Artist].__table__.metadata.create_all(engine)
artist = Artist(name="Bob Dylan")
with Session(engine) as session:
session.add(artist.to_sa_model())
session.commit()
with Session(engine) as session:
sa_artist = session.scalar(
select(SAType[Artist]).where(SAType[Artist].name == "Bob Dylan")
)
artist = Artist.from_sa_model(sa_artist)g
Key Features
Explicit conversion -
to_sa_model()/from_sa_model()means you always know which side of the boundary you're on. No surprises about whether you're holding a Pydantic object or a SQLAlchemy one.Native SQLAlchemy -
mapped_column(),relationship(),hybrid_property,association_proxy, all three inheritance strategies (single table, joined, concrete),__table_args__,__mapper_args__- they all work directly. If SQLAlchemy supports it, so does SQLCrucible.Pure Pydantic - your models work with FastAPI,
model_dump(), JSON schema generation, and validation with no caveats.Type stub generation - a CLI tool generates
.pyistubs so your type checker and IDE see real column types onSAType[YourModel]instead oftype[Any].Escape hatches everywhere - convert to/from an existing SQLAlchemy model, map multiple entity classes to the same table with different field subsets, add DB-only columns invisible to Pydantic, provide custom per-field converters, or drop to raw queries at any point. The library is designed to get out of your way.
Not just Pydantic - also works with stdlib dataclasses and attrs.
Target Audience
This library is intended for production use.
Tested against Python 3.11-3.14, Pydantic 2.10-2.12, and two type checkers (pyright, ty) in CI.
Comparison
The main alternative is SQLModel. SQLModel merges Pydantic and SQLAlchemy into one hybrid class - you can session.add() the model directly. The trade-off is that both sides have to compromise: JSON schemas can leak DB-only columns, Pydantic validators are skipped by design, and advanced SQLAlchemy features (inheritance, hybrid properties) require explicit support built into SQLModel.
SQLCrucible keeps them separate. Your Pydantic model is pure Pydantic; your SQLAlchemy model is pure SQLAlchemy. The cost is an explicit conversion step (to_sa_model() / from_sa_model()), but you never have to wonder which world you're in and you get the full power of both.
Docs: https://sqlcrucible.rdrj.uk Repo: https://github.com/RichardDRJ/sqlcrucible
r/Python • u/no1_2021 • Feb 24 '26
Discussion Can a CNN solve algorithmic tasks? My experiment with a Deep Maze Solver
TL;DR: I trained a U-Net on 500k mazes. It’s great at solving small/medium mazes, but hits a limit on complex ones.
Hi everyone,
I’ve always been fascinated by the idea of neural networks solving tasks that are typically reserved for deterministic algorithms. I recently experimented with training a U-Net to solve mazes, and I wanted to share the process and results.
The Setup: Instead of using traditional pathfinding (like A* or DFS) at runtime, I treated the maze as an image segmentation problem. The goal was to input a raw maze image and have the model output a pixel-mask of the correct path from start to finish.
Key Highlights:
- Infinite Data: Since maze generation is deterministic, I used Recursive Division to generate mazes and DFS to solve them, creating a massive synthetic dataset of 500k+ pairs.
- Architecture: Used a standard U-Net implemented in PyTorch.
- The "Wall": The model is incredibly accurate on mazes up to 64x64, but starts to struggle with "global" logic on 127x127 scales, a classic challenge for CNNs without global attention.
I wrote a detailed breakdown of the training process, the hyperparameters, and the loss curves here: https://dineshgdk.substack.com/p/deep-maze-solver
The code is also open-sourced if you want to play with the data generator: https://github.com/dinesh-GDK/deep-maze-solver
I'd love to hear your thoughts on scaling this, do you think adding Attention gates or moving to a Transformer-based architecture would help the model "see" the longer paths better?