r/Python • • Mar 06 '26

Showcase Showcase: CrystalMedia v4–Interactive TUI Downloader for YouTube and Spotify(Exportify and yt-dlp)

5 Upvotes

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 • • Mar 06 '26

Discussion UniCoreFW v1.1.8 — Core + DB hardening & performance

0 Upvotes

This release focuses on security-first defaults, Postgres correctness, and lower overhead in chainable core utilities. It tightens risky behaviors, fixes engine-specific SQL incompatibilities, and reduces dispatch/jitter in hot paths. Please feel free to provide your feedbacks and productive criticisms are always welcome :). More documentation can be found at https://unicorefw.org

core.py changes

Fixed

  • Chaining reliability: resolved method resolution pitfalls where instance chaining could accidentally bind to static methods instead of wrapper methods (improves correctness and consistency of fluent usage).
  • Wrapper method stability: prevented accidental overwrites of wrapper APIs during dynamic method attachment (avoids subtle runtime behavior changes as modules evolve).

Performance

  • Lower chaining overhead: reduced per-call dispatch cost in wrapper operations, improving repeated chain patterns and tight loops.
  • More stable timings: reduced jitter in repeated benchmarks, indicating fewer dynamic lookups and less runtime variance.

Notes

  • Public API intent remains the same: static utility calls still work, and wrapper chaining behavior is now more deterministic.

db.py changes

Security (breaking / behavior tightening)

  • Identifier hardening: added validation and safe quoting for SQL identifiers (tables/columns), preventing injection through helper APIs that interpolate identifiers.
  • Safe defaults for writes:

    • update() now refuses empty WHERE clauses (prevents accidental mass updates).
    • delete() now refuses empty WHERE clauses (prevents accidental mass deletes).

PostgreSQL correctness & stability

  • Fixed Postgres insert semantics: removed fragile LASTVAL() usage when inserting into tables without sequences or when a primary key is explicitly provided.
  • Migration portability:

    • _migrations table creation is now engine-specific (removed SQLite-only AUTOINCREMENT from Postgres).
    • Migration lookup uses engine-correct placeholders (%s for Postgres, ? for SQLite).
  • Transaction/autocommit behavior:

    • Postgres defaults to autocommit for non-transactional operations to avoid transactional DDL surprises.
    • Explicit transaction() correctly toggles autocommit off/on for Postgres to keep semantics predictable.

Upgrade notes

  • If your code relied on update(..., where={}) or delete(..., where={}) performing mass operations, you must update it to:

    • provide an explicit WHERE, or
    • use execute() with deliberate raw SQL for bulk operations.

r/Python • • Mar 06 '26

Daily Thread Friday Daily Thread: r/Python Meta and Free-Talk Fridays

3 Upvotes

Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

How it Works:

  1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
  2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
  3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

Guidelines:

Example Topics:

  1. New Python Release: What do you think about the new features in Python 3.11?
  2. Community Events: Any Python meetups or webinars coming up?
  3. Learning Resources: Found a great Python tutorial? Share it here!
  4. Job Market: How has Python impacted your career?
  5. Hot Takes: Got a controversial Python opinion? Let's hear it!
  6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟


r/Python • • Mar 05 '26

Showcase Simple CLI time tracker tool.

1 Upvotes

Built it for myself, thought others might find it helpful. What’s your thoughts?

Install: sudo snap install clockin

Github: https://github.com/anuragbhattacharjee/clockin

Snap store link: https://snapcraft.io/clockin

Target audience is anyone using ubuntu and terminal.

I couldn’t find any other compatible time tracker. It cuts the hassle of going to another window and saves all the clicks.


r/Python • • Mar 05 '26

Discussion How to call Claude's tool-use API with raw `requests` - no SDK needed

0 Upvotes

I've been building AI tools using only requests and subprocess (I maintain jq, so I'm biased toward small, composable things). Here's a practical guide to using Claude's tool-use / function-calling API without installing the official SDK.

The basics

Tool use lets you define functions the model can call. You describe them with JSON Schema, the model decides when to call them, and you execute them locally. Here's the minimal setup:

import requests, os

def call_claude(messages, tools=None):
    payload = {
        "model": "claude-sonnet-4-5-20250929",
        "max_tokens": 8096,
        "messages": messages,
    }
    if tools:
        payload["tools"] = tools

    response = requests.post(
        "https://api.anthropic.com/v1/messages",
        headers={
            "x-api-key": os.environ["ANTHROPIC_API_KEY"],
            "content-type": "application/json",
            "anthropic-version": "2023-06-01",
        },
        json=payload,
    )
    response.raise_for_status()
    return response.json()

Defining a tool

No decorators. Just a dict:

read_file_tool = {
    "name": "read_file",
    "description": "Read the contents of a file at the given path.",
    "input_schema": {
        "type": "object",
        "properties": {
            "path": {"type": "string", "description": "File path to read"}
        },
        "required": ["path"],
    },
}

The tool-use loop

When the model wants to use a tool, it returns a response with stop_reason: "tool_use" and one or more tool_use blocks. You execute them and send the results back:

messages = [{"role": "user", "content": "What's in requirements.txt?"}]

while True:
    result = call_claude(messages, tools=[read_file_tool])
    messages.append({"role": "assistant", "content": result["content"]})

    tool_calls = [b for b in result["content"] if b["type"] == "tool_use"]
    if not tool_calls:
        # Model responded with text — we're done
        print(result["content"][0]["text"])
        break

    # Execute each tool and send results back
    tool_results = []
    for tc in tool_calls:
        if tc["name"] == "read_file":
            with open(tc["input"]["path"]) as f:
                content = f.read()
            tool_results.append({
                "type": "tool_result",
                "tool_use_id": tc["id"],
                "content": content,
            })

    messages.append({"role": "user", "content": tool_results})

That's the entire pattern. The model calls a tool, you run it, feed the result back, and the model decides what to do next - call another tool or respond to the user.

Why skip the SDK?

Three reasons:

  1. Fewer dependencies. requests is probably already in your project.
  2. Full visibility. You see exactly what goes over the wire. When something breaks, you print(response.json()) and you're done.
  3. Portability. The same pattern works for any provider that supports tool use (OpenAI, DeepSeek, Ollama). Swap the URL and headers, keep the loop.

Taking it further

Once you have this loop, adding more tools is mechanical - define the schema, add an elif branch (or a dispatch dict). I built this up to a ~500-line coding agent with 8 tools that can read/write files, run shell commands, search codebases, and edit files surgically.

I wrote the whole process up as a book if you want the full walkthrough: https://buildyourowncodingagent.com (free sample chapters on the site, source code on GitHub).

Questions welcome - especially if you've tried the raw API approach and hit edge cases.


r/Python • • Mar 05 '26

News Flask's creator on why Go works better than Python for AI agents

50 Upvotes

Hey everyone! I recently had the chance to chat with Armin Ronacher, the creator of Flask, for my (video) podcast. It was a really fun conversation!

We talked about things like:

  • How Armin's startup generates 90% of its code with AI agents and what that actually looks like day-to-day
  • Why AI agents work better with some languages (like Go) than others, and why Python's ecosystem makes life harder for AI
  • What kinds of problems are a good fit for AI, and which ones Armin still solves himself
  • How to steer and monitor AI agents, and what safeguards make sense
  • How to handle parallelization with multiple agents running at once
  • The tricky question of licenses for AI-generated open source code
  • What the future of programming jobs looks like and what skills developers should build to stay competitive
  • His tips for getting started with AI agents if you haven't yet

Armin was very thoughtful and direct. Not many people have this much experience shipping production software with AI agents, so it was super interesting to hear his take.

If you'd like to watch, here's the link: https://youtu.be/4zlHCW0Yihg

I'd love to hear your thoughts or feedback!


r/Python • • Mar 05 '26

Discussion I turned a Reddit-discussed duplicate-photo script into a tool (architecture, scaling, packaging)

2 Upvotes

A Reddit discussion turned my duplicate-photo Python script into a full application — here are the engineering lessons

 A while ago I wrote a small Python script to detect duplicate photos using perceptual hashing.

It worked surprisingly well — even on fairly large photo collections.

I shared it on Reddit and the discussion that followed surfaced something interesting: once people started using it on real photo libraries, the problem stopped being about hashing and became a systems engineering problem.

 Some examples that came up: libraries with hundreds of thousands of photos, HEIC - JPEG variants from phones, caching image features for incremental rescans after adding folders, deterministic keeper selection but also wanting to visually review clusters before deleting anything and of course people asking for a GUI instead of a script.

At that point the project started evolving quite a bit.

 The monolithic script eventually became a modular architecture:

GUI / CLI  -> Worker -> Engine -> Hashing + feature extraction -> SQLite index cache -> Reporting (CSV + HTML thumbnails)

Some of the more interesting engineering lessons.

 Scaling beyond O(n²)

Naively comparing every image to every other image explodes quickly. 50k images means 1.25 billion comparisons. So the system uses hash prefix bucketing to reduce comparisons drastically before running perceptual hash checks.

 Incremental rescans

Rehashing everything every run was wasteful. Thus a SQLite index was introduces that caches extracted image features and invalidates entries when configuration changes. So rescans only process new or changed images.

 Safety-first design

Deleting the wrong image in a photo archive is unacceptable, so the workflow became deliberately conservative. Dry-run by default, quarantine instead of deletion and optional Windows recycle bin integration. A CSV audit trail and a HTML report with thumbnails for visual inspection by ‘the human in the loop’.

 Packaging surprises

Turning a Python script into a Windows executable revealed a lot of dependency issues. Some changes that happened during packaging. Removing SciPy dependency from pHash (NumPy-only implementation) and replacing OpenCV sharpness estimation with NumPy Laplacian variance reduced the load with almost 200MB.  HEIC support however surprisingly required some unexpected codec DLLs.

 The project ended up teaching me much more about architecture and dependency hygiene than about hashing. I wrote a deeper breakdown here if anyone is interested: from-a-finding-duplicates-script-to-the-deduptool-engineering-a-safe-deterministic-photo-deduplication-tool-for-windows

 And for context, this was the earlier Reddit discussion around the original script.

 Curious if others here have run into similar issues when turning a Python script into a distributable application. Especially around: dependency cleanup, PyInstaller packaging, keeping the core engine independent from the GUI.


r/Python • • Mar 05 '26

Discussion Amazing AI Agents Course

0 Upvotes

As AI workflows move beyond prompt engineering toward engineered, context-supported designs, agentic AI is becoming one of the hottest domains in the IT industry. I would like to offer you a course designed to teach you howto build such systems (with orchestration, memory, tools, and structured system thinking at their core). In this hands-on, Python-based, 10-unit course, you will learn to build powerful multi-step, tool-using agents using LangGraph— the popular library that underlies many modern AI agents. 

The course follows a stage-by-stage progression and is fully project-based — the way modern technical learning is often designed. Instead of building a new agent in each lesson, you will continuously upgrade one agent – an investment consultant – making the process both coherent and fun. Each unit of the course introduces a new concept in agentic technologies, enriching the architecture, and making the agent more capable.

Feel free to check out the course here:

https://langgraphagentcourse.com/


r/Python • • Mar 05 '26

News I built a tool that monitors what your package manager actually does during npm/pip install

11 Upvotes

After seeing too many supply chain attacks (XZ Utils, SolarWinds, etc.), I got paranoid about what happens when I run `npm install`. So I built a Python tool that wraps your package manager and watches everything that happens during installation.

What it does:

- Monitors all child processes, network connections, and file accesses in real-time

- Flags suspicious behavior (unexpected network connections, credential theft attempts, reverse shells)

- Verifies SLSA provenance before installation

- Creates baseline profiles to learn what's "normal" for your project

- Generates JSON + HTML security reports for CI/CD pipelines

If a postinstall script tries to read your ~/.ssh/id_rsa or connect to an unknown server, you'll know immediately.

Supports: npm, yarn, pnpm, pip, cargo, Maven, Composer, and others

GitHub: https://github.com/Mert1004/Supply-Chain-Anomaly-Detector

It's completely open source (MIT). I'd love feedback from anyone who's dealt with supply chain security!


r/Python • • Mar 05 '26

Discussion Refactor impact analysis for Python codebases (Arbor CLI)

7 Upvotes

I’ve been experimenting with a tool called Arbor that builds a graph of a codebase and tries to show what might break before a refactor.

This is especially tricky in Python because of dynamic patterns, so Arbor uses heuristics and marks uncertain edges.

Example workflow:

git add .

arbor diff

This shows impacted callers and dependencies for modified symbols.

Repo:

https://github.com/Anandb71/arbor

Curious how Python developers usually approach large refactors safely.


r/Python • • Mar 05 '26

Showcase I built a pre-commit linter that catches AI-generated code patterns

71 Upvotes

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: pass that 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.


r/Python • • Mar 05 '26

Showcase sprint-dash: a type-checked FastAPI + SQLite sprint dashboard — server-rendered, no JS framework

7 Upvotes

What My Project Does

sprint-dash is a sprint tracking dashboard I built for my own projects. Board views, backlog management, sprint lifecycle (create, start, close with carry-over), and a CLI (sd-cli) for terminal-based operations. It integrates with Gitea's API for issue data.

The architecture keeps things simple: sprint structure in SQLite (stdlib sqlite3, no ORM), issue metadata from Gitea's API with a 60-second cachetools TTL. The dashboard is read-only — it never writes back to the issue tracker.

The whole frontend is server-rendered with FastAPI + Jinja2 + HTMX. Routes check the HX-Request header and return either a full page or an HTML partial — one set of templates handles both. Board drag-and-drop uses Sortable.js with HTMX callbacks to post moves server-side. No client-side state.

Type-checked end to end with mypy (strict mode). Tests with pytest. Linted with Ruff. The CI pipeline (Woodpecker) runs lint + tests in parallel, builds a Docker image, runs Trivy, and deploys in about 60 seconds.

Stack: FastAPI, Jinja2, HTMX, SQLite (stdlib), httpx, cachetools
Typing: mypy --strict, typed dataclasses throughout
Testing: pytest (~60 tests)
LOC: ~1,500 Python

Target Audience

Developers who want a lightweight sprint dashboard without adopting a full project management platform. Currently integrates with Gitea, but the architecture separates sprint logic from the issue tracker — the Gitea client is a single module.

Also relevant if you're interested in FastAPI + HTMX as a server-rendered alternative to SPA frameworks for internal tools.

Comparison

  • Gitea/Forgejo built-in: Labels and milestones give filtered issue lists. No board view, no carry-over, no sprint lifecycle.
  • Taiga, OpenProject: Full PM platforms. sprint-dash is intentionally minimal — reads from your issue tracker, manages sprints, nothing else.
  • SPA dashboards (React/Vue): sprint-dash is ~1,500 LOC of Python with zero JS framework dependencies. No webpack, no node_modules.

GitHub: https://github.com/simoninglis/sprint-dash

Blog post with architecture details: https://simoninglis.com/posts/sprint-dash/


r/Python • • Mar 05 '26

Discussion Anyone know what's up with HTTPX?

331 Upvotes

The maintainer of HTTPX closed off access to issues and discussions last week: https://github.com/encode/httpx/discussions/3784

And it hasn't had a release in over a year.

Curious if anyone here knows what's going on there.


r/Python • • Mar 05 '26

Showcase Built an LSP for Python in Go

6 Upvotes

What my project does

Working in massive Python monorepos, I started getting really frustrated by the sluggishness of Pyright and BasedPyright. They're incredible tools, but large projects severely bog down editor responsiveness.

I wanted something fundamentally faster. So, I decided to build my own Language Server: Rahu.

Rahu is purely static—there’s no interoperability with a Python runtime. The entire lexer, parser pipeline, semantic analyzer, and even the JSON-RPC 2.0 transport over stdio are written completely from scratch in Go to maximize speed and efficiency.

Current Capabilities

It actually has a solid set of in-editor features working right now:

  • Real-time diagnostics: Catches parser and semantic errors on the fly.
  • Intelligent Hover: Displays rich symbol/method info and definition locations.
  • Go-to-definition: Works for variables, functions, classes, parameters, and attributes.
  • Semantic Analysis: Full LEGB-style name resolution and builtin symbol awareness.
  • OOP Support: Tracks class inheritance (with member promotion and override handling) and resolves instance attributes (self.x = ...).
  • Editor Integration: Handles document lifecycles (didOpen, didChange, didClose) with debounced analysis so it doesn't fry your CPU while typing.

I recently added comprehensive tests and benchmarks across the parser, server, and JSON-RPC paths, and finally got a demo GIF up in the README so you can see it in action.

Target audience

Just a toy project so far

The biggest missing pieces I'm tackling next:

  • Import / module resolution
  • Cross-file workspace indexing
  • References, rename, and auto-completion
  • Deeper type inference

Check it out at the link below! Repo link: https://github.com/ak4-sh/rahu


r/Python • • Mar 05 '26

Showcase I built dkmio – a minimal Object-Key Mapper for DynamoDB to reduce boto3 boilerplate

2 Upvotes

Hi everyone,

I’ve been working with DynamoDB + boto3 for a while, and I kept running into repetitive patterns: building ExpressionAttributeNames, crafting update expressions, and handling pagination loops manually.

So I built dkmio, a small Object-Key Mapper (OKM) focused on reducing boilerplate while keeping DynamoDB semantics explicit.

GitHub: https://github.com/Antonipo/dkmio
PyPI: https://pypi.org/project/dkmio/
Docs: https://dkmio.antoniorodriguez.dev/

What My Project Does

dkmio is a thin, typed wrapper around boto3 that automates the tedious parts of DynamoDB interaction. It reduces code volume by:

  • Automatically generating update and filter expressions.
  • Safely handling reserved attribute names (no more manual aliasing).
  • Auto-paginating queries and auto-chunking batch writes.
  • Converting DynamoDB Decimal values into JSON-serializable types.

It supports native operations (get, query, scan, update, transactions) without introducing heavy abstractions, hidden state tracking, or implicit scans.

Target Audience

This tool is meant for:

  • Backend developers using Flask, FastAPI, or AWS Lambda.
  • Teams building production services who want to avoid the verbosity of raw boto3 but dislike heavy ORMs.
  • Developers who prefer explicit NoSQL modeling over "magic" abstraction layers.

Comparison

Vs. Raw boto3 Standard boto3 requires verbose setup for simple updates:

# Raw boto3
table.update_item(
    Key={"PK": pk, "SK": sk},
    UpdateExpression="SET #revoked = :val0",
    ExpressionAttributeNames={"#revoked": "revoked_at"},
    ExpressionAttributeValues={":val0": now_epoch()}
)

With dkmio, this is simplified to:

# dkmio
users.update(PK=pk, SK=sk, set={"revoked_at": now_epoch()})

Vs. PynamoDB / ORMs Unlike PynamoDB, dkmio does not enforce schemas, has no model state tracking, and doesn't hide database behavior. It acts as a productivity layer rather than a full abstraction framework, keeping the developer in control of the actual DynamoDB logic.

Feedback is greatly appreciated


r/Python • • Mar 05 '26

Showcase I Made A 3D Renderer Using Pygame And No 3D Library

22 Upvotes

Built a 3D renderer from scratch in Python. No external 3D engines, just Pygame and a lot of math.

What it does:

  • Renders 3D wireframes and filled polygons at 60 FPS
  • First-person camera with mouse look
  • 15+ procedural shapes: mountains, fractals, a whole city, Klein bottles, Mandelbulb slices
  • Basic physics engine (bouncing spheres and collision detection)
  • OBJ model loading (somewhat glitchy without rasterizaton)

Try it:

bash

pip install aiden3drenderer

Python

from aiden3drenderer import Renderer3D, renderer_type

renderer = Renderer3D()
renderer.render_type = renderer_type.POLYGON_FILL
renderer.run()

Press number keys to switch terrains. Press 0 for a procedural city with 6400 vertices, R for fractals, T for a Klein bottle.

Comparison:
I dont know of other 3D rendering libraries, but this one isnt meant for production use, just as a fun visualization tool

Who's this for?

  • Learning how 3D graphics work from first principles
  • Procedural generation experiments
  • Quick 3D visualizations without heavy dependencies
  • Understanding the math behind game engines

GitHub: https://github.com/AidenKielby/3D-mesh-Renderer

Feedback is greatly appreciated


r/Python • • Mar 05 '26

Daily Thread Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

7 Upvotes

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:

  1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
  2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
  3. 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:

  1. Career Paths: What kinds of roles are out there for Python developers?
  2. Certifications: Are Python certifications worth it?
  3. Course Recommendations: Any good advanced Python courses to recommend?
  4. Workplace Tools: What Python libraries are indispensable in your professional work?
  5. 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 • • Mar 04 '26

Showcase Code Roulette: A P2P Terminal Game of Russian Roulette with Compartmentalized RCE

3 Upvotes

What My Project Does

The long and short of it is that this is a Peer to Peer multiplayer, terminal (TUI) based Russian Roulette type game where the loser automatically executes the winner's Python payload file.

Each player selects a Python 3 payload file before the match begins. Once both players join, they're shown their opponent's code and given the chance to review it. Whether you read it yourself, toss it into an AI to check, or just go full send is up to you.

If both players accept, the game enters the roulette phase where players take turns pulling the "trigger" (a button) until someone lands on the unlucky chamber. The loser's machine is then served the winner's payload file and runs it through Python's eval(). Logs are printed to the screen in real time. The winner gets a chat interface to talk to the loser while the code runs.

Critically, the payloads do not have to be destructive. You can do fun stuff too like opening a specific webpage, flipping someone's screen upside down, or any other flavor of creative mischief can be done.

What matters is who you play with.

Target Audience

This is a hobby project, not meant for any real production use. It's aimed at Python enthusiasts who enjoy messing around with friends on a local network (though the server can work over the Internet with auto-restart on game completion) and are comfortable understanding the code they agree to run.

You do need a basic grasp of Python to review payloads and play safely. Though recent advancements in the tech space have lowered this bar slightly.

Comparison

There isn't really anything like this out there. Plenty of movies and games simulate Russian Roulette, but none of them carry actual stakes. Code Roulette introduces actual digital risk by leveraging arbitrary code execution as the consequence of losing. Something that's normally treated as the worst possible vulnerability in software, repurposed here as a game mechanic.

Future Ideas

Currently, the game doesn't have any public server. A hosted web server option could open it up to a wider audience.

Other ideas include sandboxing options for more cautious players and payload templates for non-programmers. Both additions I think could have a wide appeal (lmk).

If you're interested in Code Roulette and are confident you can play it safely with your friends, then feel free to check it out here: https://github.com/Sorcerio/Code-Roulette

I would love to hear what kind of payloads you can come up with; especially if they're actually creative and fun! A few examples are included in the repo as well.


r/Python • • Mar 04 '26

Showcase [Project] qlog — fast log search using an inverted index (grep alternative)

0 Upvotes

GitHub: https://github.com/Cosm00/qlog

What My Project Does

qlog is a Python CLI that indexes log files locally (one-time) using an inverted index, so searches that would normally require rescanning gigabytes of text can return in milliseconds. After indexing, queries are lookups + set intersections instead of full file scans.

Target Audience

People who frequently search large logs locally or on a server:

  • developers debugging big local/CI logs
  • SRE/DevOps folks doing incident triage over SSH
  • anyone with "support bundle" logs / rotated files that are too large for repeated grep runs

It’s not trying to replace centralized logging platforms (Splunk/ELK/Loki); it’s a fast local tool when you already have the log files.

Comparison

  • vs grep/ripgrep: those scan the entire file every time; qlog indexes once, then repeated searches are much faster.
  • vs ELK/Splunk/Loki: those are great for production pipelines, but have setup/infra cost; qlog is zero-config and runs offline.

Quick example

qlog index './logs/**/*.log'
qlog search "error" --context 3
qlog search "status=500"

Happy to take feedback / feature requests (JSON output, incremental indexing, more log format parsers, etc.).


r/Python • • Mar 04 '26

Showcase I got tired of strict feat:/fix: commit rules, so I built a changelog tool that reads code diffs

0 Upvotes

Most changelog generators like git-cliff, standard-version, and release-please rely on the Conventional Commits standard.

The system requires every commit to follow these two specifications:

feat:
fix:

Real repositories typically exhibit this pattern:

wip
fix
update stuff
lol this works now
Merge branch 'main' into dev

Most changelog tools create useless release notes whenever this situation arises.

I created ReleaseWave to solve this problem.

The system gathers changes between tags through actual git diffs instead of commit prefixes which it processes with an LLM.

Repo: https://github.com/Sahaj33-op/releasewave
PyPI: https://pypi.org/project/releasewave/

What My Project Does

ReleaseWave analyzes the actual code changes between two git tags and generates structured release notes.

The program includes these functions:

  • Reads git diffs instead of commit prefixes
  • Splits large diffs into safe context chunks for LLM processing
  • Creates three outputs during one operation

    • Technical developer changelog
    • Plain-English user release notes
    • Tweet-sized summary
  • Handles monorepos by generating package-specific diffs
  • Works with multiple LLM providers

Example command:

releasewave generate v1.0 v1.1

The system requires no configuration setup.

Target Audience

ReleaseWave is intended for:

  • Developers who don’t enforce conventional commits
  • Teams with messy commit histories
  • Projects that want automatic release notes from actual code changes
  • Monorepos where commit messages often mix unrelated packages

The system operates correctly with both personal projects and production repositories.

Comparison

Existing tools:

  • git-cliff
  • standard-version
  • release-please

These tools require users to follow commit message conventions.

ReleaseWave takes a different approach:

ToolApproach
git-cliffConventional commit parsing
standard-versionConventional commits
release-pleaseConventional commits + GitHub workflows
ReleaseWaveReads actual git diffs + LLM analysis

ReleaseWave functions correctly with messy or inconsistent commit messages.

Stack

  • Python
  • Typer (CLI)
  • LiteLLM (multi-provider support)
  • Instructor + Pydantic (structured LLM output)

Use the following command to install:

pip install releasewave

r/Python • • Mar 04 '26

Showcase Built a desktop app for TCP-based Python AI agents, with GitHub deployment + live server geolocation

0 Upvotes

I built an open-source desktop client to support any Python agent workflow.

The app itself is not Python, but it is designed around running and managing Python agents that communicate over TCP.

What My Project Does

  • Imports agent repos from GitHub (public/private)
  • Runs agents with agent.py as the entrypoint
  • Supports optional requirements.txt for dependencies
  • Supports optional id.json for agent identity metadata
  • Connects agents to TCP servers
  • Shows message flow in a single UI
  • Includes a world map/network view for deployment visibility

Target Audience

  • Python developers building TCP-based agents/services
  • Teams managing multiple Python agents across environments
  • People who want a simpler operational view than manual terminal/process management

Comparisons

Compared to running agents manually (venv + terminal + custom scripts), this centralizes deployment and monitoring in one desktop UI.

Compared to general-purpose observability tools, this is narrower and focused on the agent lifecycle + messaging workflow.

Compared to agent frameworks, this does not require a specific framework. If the repo has agent.py and speaks TCP, it can be managed here.

Demo video: https://youtu.be/yvD712Uj3vI

Repo: https://github.com/Summoner-Network/summoner-desktop

In addition to showcasing, I'm also posting for technical feedback on workflow fit and missing capabilities. I would like to evolve this tool toward broader, general-purpose agentic use.


r/Python • • Mar 04 '26

Showcase FrostPPT – Generate frosted-glass HTML presentations from Python

1 Upvotes

What My Project Does

FrostPPT is a small Python CLI tool that generates standalone HTML presentation slide decks.

It creates:

  • Frosted glass / blur UI slides
  • Animated transitions
  • Fully offline HTML output
  • No runtime dependencies beyond Python
  • Simple text-based slide input

Example usage:

pip install frostppt
frostppt myslides.txt

It outputs a ready-to-present HTML file that can be opened in any modern browser.

Target Audience

This project is primarily:

  • Students who are allowed to use HTML presentations
  • Developers who prefer CLI tools over PowerPoint/Keynote
  • People who want lightweight, framework-free presentation generation

It is currently suitable for personal use, demos, and lightweight presentation needs.
It is not intended (yet) as an enterprise-grade replacement for major presentation software.

Comparison

Compared to alternatives:

  • Unlike PowerPoint/Keynote, it generates portable HTML instead of proprietary formats.
  • Unlike Reveal.js or full web frameworks, it requires no manual HTML/JS setup.
  • Unlike Google Slides, it works fully offline once generated.
  • Compared to Pandoc-based solutions, it focuses specifically on glassmorphism UI and visual effects.

The goal is minimal setup + aesthetic output with a simple CLI workflow.

Demo:
https://frostppt.netlify.app/

Source Code:
https://github.com/FrozenElsaVVVVV/frostppt/

PyPI:
https://pypi.org/project/frostppt/


r/Python • • Mar 04 '26

Showcase FrostPPT – Generate frosted-glass HTML presentations from Python

1 Upvotes

Title:
FrostPPT – Generate frosted-glass HTML presentations from Python

Body:

What My Project Does

FrostPPT is a small Python CLI tool that generates standalone HTML presentation slide decks.

It creates:

  • Frosted glass / blur UI slides
  • Animated transitions
  • Fully offline HTML output
  • No runtime dependencies beyond Python
  • Simple text-based slide input

Example usage:

pip install frostppt
frostppt myslides.txt

It outputs a ready-to-present HTML file that can be opened in any modern browser.

Target Audience

This project is primarily:

  • Students who are allowed to use HTML presentations
  • Developers who prefer CLI tools over PowerPoint/Keynote
  • People who want lightweight, framework-free presentation generation

It is currently suitable for personal use, demos, and lightweight presentation needs.
It is not intended (yet) as an enterprise-grade replacement for major presentation software.

Comparison

Compared to alternatives:

  • Unlike PowerPoint/Keynote, it generates portable HTML instead of proprietary formats.
  • Unlike Reveal.js or full web frameworks, it requires no manual HTML/JS setup.
  • Unlike Google Slides, it works fully offline once generated.
  • Compared to Pandoc-based solutions, it focuses specifically on glassmorphism UI and visual effects.

The goal is minimal setup + aesthetic output with a simple CLI workflow.

Demo:
https://frostppt.netlify.app/

Source Code:
https://github.com/FrozenElsaVVVVV/frostppt/

PyPI:
https://pypi.org/project/frostppt/


r/Python • • Mar 04 '26

News https://www.youtube.com/watch?v=qKkyBhXIJJU

0 Upvotes

Just wanted to share(no affiliation) about live Python Unplugged on PyTv right now: https://www.youtube.com/watch?v=qKkyBhXIJJU

Interesting discussion about community mainly but development- focused for the Python community :)