<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><category term="Python" label="r/Python"/><updated>2026-03-06T02:45:24+00:00</updated><icon>https://www.redditstatic.com/icon.png/</icon><id>/r/Python/.rss</id><link rel="self" href="https://www.reddit.com/r/Python/.rss" type="application/atom+xml" /><link rel="alternate" href="https://www.reddit.com/r/Python/" type="text/html" /><logo>https://b.thumbs.redditmedia.com/8HiO52_EuT_h63Qg.png</logo><subtitle>The official Python community for Reddit! Stay up to date with the latest news, packages, and meta information relating to the Python programming language. --- If you have questions or are new to Python use r/LearnPython</subtitle><title>Python</title><entry><author><name>/u/AutoModerator</name><uri>https://www.reddit.com/user/AutoModerator</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;h1&gt;Weekly Thread: What&amp;#39;s Everyone Working On This Week? 🛠️&lt;/h1&gt; &lt;p&gt;Hello &lt;a href=&quot;/r/Python&quot;&gt;/r/Python&lt;/a&gt;! It&amp;#39;s time to share what you&amp;#39;ve been working on! Whether it&amp;#39;s a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you&amp;#39;re up to!&lt;/p&gt; &lt;h2&gt;How it Works:&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Show &amp;amp; Tell&lt;/strong&gt;: Share your current projects, completed works, or future ideas.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Discuss&lt;/strong&gt;: Get feedback, find collaborators, or just chat about your project.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Inspire&lt;/strong&gt;: Your project might inspire someone else, just as you might get inspired here.&lt;/li&gt; &lt;/ol&gt; &lt;h2&gt;Guidelines:&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;Feel free to include as many details as you&amp;#39;d like. Code snippets, screenshots, and links are all welcome.&lt;/li&gt; &lt;li&gt;Whether it&amp;#39;s your job, your hobby, or your passion project, all Python-related work is welcome here.&lt;/li&gt; &lt;/ul&gt; &lt;h2&gt;Example Shares:&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Machine Learning Model&lt;/strong&gt;: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Web Scraping&lt;/strong&gt;: Built a script to scrape and analyze news articles. It&amp;#39;s helped me understand media bias better.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Automation&lt;/strong&gt;: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;Let&amp;#39;s build and grow together! Share your journey and learn from others. Happy coding! 🌟&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/AutoModerator&quot;&gt; /u/AutoModerator &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rhi5oj/sunday_daily_thread_whats_everyone_working_on/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rhi5oj/sunday_daily_thread_whats_everyone_working_on/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rhi5oj</id><link href="https://www.reddit.com/r/Python/comments/1rhi5oj/sunday_daily_thread_whats_everyone_working_on/" /><updated>2026-03-01T00:00:32+00:00</updated><published>2026-03-01T00:00:32+00:00</published><title>Sunday Daily Thread: What's everyone working on this week?</title></entry><entry><author><name>/u/AutoModerator</name><uri>https://www.reddit.com/user/AutoModerator</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;h1&gt;Weekly Thread: Meta Discussions and Free Talk Friday 🎙️&lt;/h1&gt; &lt;p&gt;Welcome to Free Talk Friday on &lt;a href=&quot;/r/Python&quot;&gt;/r/Python&lt;/a&gt;! This is the place to discuss the &lt;a href=&quot;/r/Python&quot;&gt;r/Python&lt;/a&gt; community (meta discussions), Python news, projects, or anything else Python-related!&lt;/p&gt; &lt;h2&gt;How it Works:&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Open Mic&lt;/strong&gt;: Share your thoughts, questions, or anything you&amp;#39;d like related to Python or the community.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Community Pulse&lt;/strong&gt;: Discuss what you feel is working well or what could be improved in the &lt;a href=&quot;/r/python&quot;&gt;/r/python&lt;/a&gt; community.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;News &amp;amp; Updates&lt;/strong&gt;: Keep up-to-date with the latest in Python and share any news you find interesting.&lt;/li&gt; &lt;/ol&gt; &lt;h2&gt;Guidelines:&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;All topics should be related to Python or the &lt;a href=&quot;/r/python&quot;&gt;/r/python&lt;/a&gt; community.&lt;/li&gt; &lt;li&gt;Be respectful and follow Reddit&amp;#39;s &lt;a href=&quot;https://www.redditinc.com/policies/content-policy&quot;&gt;Code of Conduct&lt;/a&gt;.&lt;/li&gt; &lt;/ul&gt; &lt;h2&gt;Example Topics:&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;New Python Release&lt;/strong&gt;: What do you think about the new features in Python 3.11?&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Community Events&lt;/strong&gt;: Any Python meetups or webinars coming up?&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Learning Resources&lt;/strong&gt;: Found a great Python tutorial? Share it here!&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Job Market&lt;/strong&gt;: How has Python impacted your career?&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Hot Takes&lt;/strong&gt;: Got a controversial Python opinion? Let&amp;#39;s hear it!&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Community Ideas&lt;/strong&gt;: Something you&amp;#39;d like to see us do? tell us.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;Let&amp;#39;s keep the conversation going. Happy discussing! 🌟&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/AutoModerator&quot;&gt; /u/AutoModerator &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rly81y/friday_daily_thread_rpython_meta_and_freetalk/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rly81y/friday_daily_thread_rpython_meta_and_freetalk/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rly81y</id><link href="https://www.reddit.com/r/Python/comments/1rly81y/friday_daily_thread_rpython_meta_and_freetalk/" /><updated>2026-03-06T00:00:46+00:00</updated><published>2026-03-06T00:00:46+00:00</published><title>Friday Daily Thread: r/Python Meta and Free-Talk Fridays</title></entry><entry><author><name>/u/mmartoccia</name><uri>https://www.reddit.com/user/mmartoccia</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;h1&gt;What My Project Does&lt;/h1&gt; &lt;p&gt;&lt;strong&gt;grain&lt;/strong&gt; is a pre-commit linter that catches code patterns commonly produced by AI code generators. It runs before your commit and flags things like:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;NAKED_EXCEPT&lt;/strong&gt; -- bare &lt;code&gt;except: pass&lt;/code&gt; that silently swallows errors (156 instances in my own codebase)&lt;/li&gt; &lt;li&gt;&lt;strong&gt;HEDGE_WORD&lt;/strong&gt; -- docstrings full of &amp;quot;robust&amp;quot;, &amp;quot;comprehensive&amp;quot;, &amp;quot;seamlessly&amp;quot;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;ECHO_COMMENT&lt;/strong&gt; -- comments that restate what the code already says&lt;/li&gt; &lt;li&gt;&lt;strong&gt;DOCSTRING_ECHO&lt;/strong&gt; -- docstrings that expand the function name into a sentence and add nothing&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;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.&lt;/p&gt; &lt;h1&gt;Target Audience&lt;/h1&gt; &lt;p&gt;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.&lt;/p&gt; &lt;h1&gt;Comparison&lt;/h1&gt; &lt;p&gt;Existing linters (pylint, ruff, flake8) catch syntax, style, and type issues. They don&amp;#39;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&amp;#39;s complementary to your existing linter, not a replacement.&lt;/p&gt; &lt;h1&gt;Install&lt;/h1&gt; &lt;pre&gt;&lt;code&gt;pip install grain-lint &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Pre-commit compatible. Configurable via &lt;code&gt;.grain.toml&lt;/code&gt;. Python only (for now).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href=&quot;https://github.com/mmartoccia/grain&quot;&gt;github.com/mmartoccia/grain&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Happy to answer questions about the rules, false positive rates, or how it compares to semgrep custom rules.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/mmartoccia&quot;&gt; /u/mmartoccia &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlho78/i_built_a_precommit_linter_that_catches/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlho78/i_built_a_precommit_linter_that_catches/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlho78</id><link href="https://www.reddit.com/r/Python/comments/1rlho78/i_built_a_precommit_linter_that_catches/" /><updated>2026-03-05T13:30:24+00:00</updated><published>2026-03-05T13:30:24+00:00</published><title>I built a pre-commit linter that catches AI-generated code patterns</title></entry><entry><author><name>/u/chekt</name><uri>https://www.reddit.com/user/chekt</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;The maintainer of HTTPX closed off access to issues and discussions last week: &lt;a href=&quot;https://github.com/encode/httpx/discussions/3784&quot;&gt;https://github.com/encode/httpx/discussions/3784&lt;/a&gt;&lt;/p&gt; &lt;p&gt;And it hasn&amp;#39;t had a release in over a year.&lt;/p&gt; &lt;p&gt;Curious if anyone here knows what&amp;#39;s going on there.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/chekt&quot;&gt; /u/chekt &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl5kuq/anyone_know_whats_up_with_httpx/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl5kuq/anyone_know_whats_up_with_httpx/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rl5kuq</id><link href="https://www.reddit.com/r/Python/comments/1rl5kuq/anyone_know_whats_up_with_httpx/" /><updated>2026-03-05T02:36:34+00:00</updated><published>2026-03-05T02:36:34+00:00</published><title>Anyone know what's up with HTTPX?</title></entry><entry><author><name>/u/djinn_09</name><uri>https://www.reddit.com/user/djinn_09</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;h1&gt;What My Project Does&lt;/h1&gt; &lt;p&gt;&lt;strong&gt;CytoScnPy&lt;/strong&gt; is a practical static analysis tool for Python that focuses on identifying &lt;strong&gt;dead code&lt;/strong&gt;, &lt;strong&gt;basic security risks&lt;/strong&gt;, and &lt;strong&gt;simple code quality metrics&lt;/strong&gt;—without heavy configuration or long scan times.&lt;/p&gt; &lt;p&gt;It’s designed to work well even on large codebases and to be usable both locally and in CI environments.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Key features:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Dead Code Hunt:&lt;/strong&gt; Detects unused imports, methods, variables (with preview &amp;amp; auto-fix)&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Security Scan:&lt;/strong&gt; Secret detection and basic taint tracking (e.g., &lt;code&gt;eval()&lt;/code&gt;-style risks)&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Quality Check:&lt;/strong&gt; Cyclomatic complexity, Halstead metrics, maintainability scores&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Clone Spotter:&lt;/strong&gt; Finds duplicated or structurally similar code&lt;/li&gt; &lt;li&gt;&lt;strong&gt;MCP Server &amp;amp; VS Code Extension&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Integrations:&lt;/strong&gt; JSON reports for CI pipelines and AI tooling hooks&lt;/li&gt; &lt;/ul&gt; &lt;h1&gt;Target Audience&lt;/h1&gt; &lt;p&gt;CytoScnPy is intended for:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Developers and small teams&lt;/strong&gt; who want fast feedback without heavyweight tooling&lt;/li&gt; &lt;li&gt;&lt;strong&gt;CI users&lt;/strong&gt; who want dead-code and basic security signals as part of automation&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Side projects, startups, and internal tools&lt;/strong&gt;, rather than enterprise-grade compliance scanning&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;It’s not meant to replace full SAST platforms, but to be a &lt;strong&gt;lightweight, practical analyzer&lt;/strong&gt; you can run often.&lt;/p&gt; &lt;h1&gt;Comparison with Existing Tools&lt;/h1&gt; &lt;p&gt;Compared to popular Python tools:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;vs. pylint / flake8:&lt;/strong&gt; CytoScnPy focuses more on &lt;em&gt;actual dead code&lt;/em&gt; and structural analysis rather than style rules.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;vs. bandit:&lt;/strong&gt; Security checks are intentionally simpler and faster, aimed at early risk detection rather than exhaustive audits.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;vs. radon:&lt;/strong&gt; Includes similar complexity metrics, but combines them with dead-code detection and clone spotting in one pass.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;vs. large SAST tools:&lt;/strong&gt; Much faster, fewer false positives, and easier to integrate—but with a narrower scope by design.&lt;/li&gt; &lt;/ul&gt; &lt;h1&gt;Links&lt;/h1&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Docs:&lt;/strong&gt; &lt;a href=&quot;https://djinn-soul.github.io/CytoScnPy/&quot;&gt;https://djinn-soul.github.io/CytoScnPy/&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href=&quot;https://github.com/djinn-soul/CytoScnPy&quot;&gt;https://github.com/djinn-soul/CytoScnPy&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;VS Code Extension:&lt;/strong&gt; &lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=djinn09.cytoscnpy&quot;&gt;https://marketplace.visualstudio.com/items?itemName=djinn09.cytoscnpy&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Please give it a try and share your thoughts—features, bugs, or general feedback are all welcome.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/djinn_09&quot;&gt; /u/djinn_09 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rm16sz/cytoscnpy_python_dead_code_detection/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rm16sz/cytoscnpy_python_dead_code_detection/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rm16sz</id><link href="https://www.reddit.com/r/Python/comments/1rm16sz/cytoscnpy_python_dead_code_detection/" /><updated>2026-03-06T02:08:55+00:00</updated><published>2026-03-06T02:08:55+00:00</published><title>CytoScnPy: Python Dead Code Detection</title></entry><entry><author><name>/u/Mert1004</name><uri>https://www.reddit.com/user/Mert1004</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;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.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;- Monitors all child processes, network connections, and file accesses in real-time&lt;/p&gt; &lt;p&gt;- Flags suspicious behavior (unexpected network connections, credential theft attempts, reverse shells)&lt;/p&gt; &lt;p&gt;- Verifies SLSA provenance before installation&lt;/p&gt; &lt;p&gt;- Creates baseline profiles to learn what&amp;#39;s &amp;quot;normal&amp;quot; for your project&lt;/p&gt; &lt;p&gt;- Generates JSON + HTML security reports for CI/CD pipelines&lt;/p&gt; &lt;p&gt;If a postinstall script tries to read your ~/.ssh/id_rsa or connect to an unknown server, you&amp;#39;ll know immediately.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Supports:&lt;/strong&gt; npm, yarn, pnpm, pip, cargo, Maven, Composer, and others&lt;/p&gt; &lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; [&lt;a href=&quot;https://github.com/Mert1004/Supply-Chain-Anomaly-Detector%5D(about:blank)&quot;&gt;https://github.com/Mert1004/Supply-Chain-Anomaly-Detector](about:blank)&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It&amp;#39;s completely open source (MIT). I&amp;#39;d love feedback from anyone who&amp;#39;s dealt with supply chain security!&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Mert1004&quot;&gt; /u/Mert1004 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlivip/i_built_a_tool_that_monitors_what_your_package/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlivip/i_built_a_tool_that_monitors_what_your_package/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlivip</id><link href="https://www.reddit.com/r/Python/comments/1rlivip/i_built_a_tool_that_monitors_what_your_package/" /><updated>2026-03-05T14:21:56+00:00</updated><published>2026-03-05T14:21:56+00:00</published><title>I built a tool that monitors what your package manager actually does during npm/pip install</title></entry><entry><author><name>/u/AccomplishedWay3558</name><uri>https://www.reddit.com/user/AccomplishedWay3558</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;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.&lt;/p&gt; &lt;p&gt;This is especially tricky in Python because of dynamic patterns, so Arbor uses heuristics and marks uncertain edges.&lt;/p&gt; &lt;p&gt;Example workflow:&lt;/p&gt; &lt;p&gt;git add .&lt;/p&gt; &lt;p&gt;arbor diff&lt;/p&gt; &lt;p&gt;This shows impacted callers and dependencies for modified symbols.&lt;/p&gt; &lt;p&gt;Repo:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://github.com/Anandb71/arbor&quot;&gt;https://github.com/Anandb71/arbor&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Curious how Python developers usually approach large refactors safely.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/AccomplishedWay3558&quot;&gt; /u/AccomplishedWay3558 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlhq43/refactor_impact_analysis_for_python_codebases/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlhq43/refactor_impact_analysis_for_python_codebases/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlhq43</id><link href="https://www.reddit.com/r/Python/comments/1rlhq43/refactor_impact_analysis_for_python_codebases/" /><updated>2026-03-05T13:32:40+00:00</updated><published>2026-03-05T13:32:40+00:00</published><title>Refactor impact analysis for Python codebases (Arbor CLI)</title></entry><entry><author><name>/u/Organic_Cry333</name><uri>https://www.reddit.com/user/Organic_Cry333</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Built it for myself, thought others might find it helpful. What’s your thoughts?&lt;/p&gt; &lt;p&gt;Install: sudo snap install clockin&lt;/p&gt; &lt;p&gt;Github: &lt;a href=&quot;https://github.com/anuragbhattacharjee/clockin&quot;&gt;https://github.com/anuragbhattacharjee/clockin&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Snap store link: &lt;a href=&quot;https://snapcraft.io/clockin&quot;&gt;https://snapcraft.io/clockin&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Target audience is anyone using ubuntu and terminal.&lt;/p&gt; &lt;p&gt;I couldn’t find any other compatible time tracker. It cuts the hassle of going to another window and saves all the clicks.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Organic_Cry333&quot;&gt; /u/Organic_Cry333 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlv3qc/simple_cli_time_tracker_tool/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlv3qc/simple_cli_time_tracker_tool/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlv3qc</id><link href="https://www.reddit.com/r/Python/comments/1rlv3qc/simple_cli_time_tracker_tool/" /><updated>2026-03-05T21:58:22+00:00</updated><published>2026-03-05T21:58:22+00:00</published><title>Simple CLI time tracker tool.</title></entry><entry><author><name>/u/Gronax_au</name><uri>https://www.reddit.com/user/Gronax_au</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;&lt;strong&gt;What My Project Does&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;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 (&lt;code&gt;sd-cli&lt;/code&gt;) for terminal-based operations. It integrates with Gitea&amp;#39;s API for issue data.&lt;/p&gt; &lt;p&gt;The architecture keeps things simple: sprint structure in SQLite (stdlib &lt;code&gt;sqlite3&lt;/code&gt;, no ORM), issue metadata from Gitea&amp;#39;s API with a 60-second &lt;code&gt;cachetools&lt;/code&gt; TTL. The dashboard is read-only — it never writes back to the issue tracker.&lt;/p&gt; &lt;p&gt;The whole frontend is server-rendered with FastAPI + Jinja2 + HTMX. Routes check the &lt;code&gt;HX-Request&lt;/code&gt; 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.&lt;/p&gt; &lt;p&gt;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.&lt;/p&gt; &lt;p&gt;&lt;code&gt; Stack: FastAPI, Jinja2, HTMX, SQLite (stdlib), httpx, cachetools Typing: mypy --strict, typed dataclasses throughout Testing: pytest (~60 tests) LOC: ~1,500 Python &lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Target Audience&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;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.&lt;/p&gt; &lt;p&gt;Also relevant if you&amp;#39;re interested in FastAPI + HTMX as a server-rendered alternative to SPA frameworks for internal tools.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Comparison&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Gitea/Forgejo built-in&lt;/strong&gt;: Labels and milestones give filtered issue lists. No board view, no carry-over, no sprint lifecycle.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Taiga, OpenProject&lt;/strong&gt;: Full PM platforms. sprint-dash is intentionally minimal — reads from your issue tracker, manages sprints, nothing else.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;SPA dashboards (React/Vue)&lt;/strong&gt;: sprint-dash is ~1,500 LOC of Python with zero JS framework dependencies. No webpack, no node_modules.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;GitHub: &lt;a href=&quot;https://github.com/simoninglis/sprint-dash&quot;&gt;https://github.com/simoninglis/sprint-dash&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Blog post with architecture details: &lt;a href=&quot;https://simoninglis.com/posts/sprint-dash/&quot;&gt;https://simoninglis.com/posts/sprint-dash/&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Gronax_au&quot;&gt; /u/Gronax_au &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlc3h4/sprintdash_a_typechecked_fastapi_sqlite_sprint/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlc3h4/sprintdash_a_typechecked_fastapi_sqlite_sprint/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlc3h4</id><link href="https://www.reddit.com/r/Python/comments/1rlc3h4/sprintdash_a_typechecked_fastapi_sqlite_sprint/" /><updated>2026-03-05T08:20:15+00:00</updated><published>2026-03-05T08:20:15+00:00</published><title>sprint-dash: a type-checked FastAPI + SQLite sprint dashboard — server-rendered, no JS framework</title></entry><entry><author><name>/u/Deep-Pen8466</name><uri>https://www.reddit.com/user/Deep-Pen8466</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Built a 3D renderer from scratch in Python. No external 3D engines, just Pygame and a lot of math.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Renders 3D wireframes and filled polygons at 60 FPS&lt;/li&gt; &lt;li&gt;First-person camera with mouse look&lt;/li&gt; &lt;li&gt;15+ procedural shapes: mountains, fractals, a whole city, Klein bottles, Mandelbulb slices&lt;/li&gt; &lt;li&gt;Basic physics engine (bouncing spheres and collision detection)&lt;/li&gt; &lt;li&gt;OBJ model loading (somewhat glitchy without rasterizaton)&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Try it:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;bash&lt;/p&gt; &lt;pre&gt;&lt;code&gt;pip install aiden3drenderer &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Python&lt;/p&gt; &lt;pre&gt;&lt;code&gt;from aiden3drenderer import Renderer3D, renderer_type renderer = Renderer3D() renderer.render_type = renderer_type.POLYGON_FILL renderer.run() &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Press number keys to switch terrains. Press 0 for a procedural city with 6400 vertices, R for fractals, T for a Klein bottle.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Comparison:&lt;/strong&gt;&lt;br/&gt; I dont know of other 3D rendering libraries, but this one isnt meant for production use, just as a fun visualization tool&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Who&amp;#39;s this for?&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Learning how 3D graphics work from first principles&lt;/li&gt; &lt;li&gt;Procedural generation experiments&lt;/li&gt; &lt;li&gt;Quick 3D visualizations without heavy dependencies&lt;/li&gt; &lt;li&gt;Understanding the math behind game engines&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href=&quot;https://github.com/AidenKielby/3D-mesh-Renderer&quot;&gt;https://github.com/AidenKielby/3D-mesh-Renderer&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Feedback is greatly appreciated&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Deep-Pen8466&quot;&gt; /u/Deep-Pen8466 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl3icq/i_made_a_3d_renderer_using_pygame_and_no_3d/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl3icq/i_made_a_3d_renderer_using_pygame_and_no_3d/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rl3icq</id><link href="https://www.reddit.com/r/Python/comments/1rl3icq/i_made_a_3d_renderer_using_pygame_and_no_3d/" /><updated>2026-03-05T01:03:12+00:00</updated><published>2026-03-05T01:03:12+00:00</published><title>I Made A 3D Renderer Using Pygame And No 3D Library</title></entry><entry><author><name>/u/Labess40</name><uri>https://www.reddit.com/user/Labess40</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;What my project does&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://github.com/Bessouat40/RAGLight&quot;&gt;RAGLight&lt;/a&gt; is a framework that helps to &lt;strong&gt;develop a RAG or an Agentic RAG quickly&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;Now you can &lt;strong&gt;serve your RAG as REST API&lt;/strong&gt; using &lt;code&gt;raglight serve&lt;/code&gt; .&lt;/p&gt; &lt;p&gt;Additionally, &lt;strong&gt;you can access a UI&lt;/strong&gt; to chat with your documents using &lt;code&gt;raglight serve --ui&lt;/code&gt; .&lt;/p&gt; &lt;p&gt;Configuration is made with environment variables, you can create a &lt;strong&gt;.env file&lt;/strong&gt; that&amp;#39;s automatically read.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;Target Audience&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Everyone who wants to build a RAG quickly. Build for local deployment or for personal usage using many LLM providers (OpenAI, Mistral, Ollama, ...).&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;Comparison&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;RAGLight is a Python library for building Retrieval-Augmented Generation pipelines in minutes. It ships with three ready-to-use interfaces: &lt;/p&gt; &lt;p&gt; - &lt;strong&gt;Python API&lt;/strong&gt; : set up a full RAG pipeline in a few lines of code, with support for multiple LLM providers, hybrid search, cross-encoder, reranking, agentic mode, and MCP tool integration.&lt;/p&gt; &lt;p&gt; - &lt;strong&gt;CLI&lt;/strong&gt; (raglight chat) : an interactive wizard that guides you from document ingestion to a live chat session, no code required. &lt;/p&gt; &lt;p&gt; - &lt;strong&gt;REST API&lt;/strong&gt; (raglight serve) : deploy your pipeline as a FastAPI server configured entirely via environment variables, with auto-generated Swagger docs and Docker Compose support out of the box.&lt;/p&gt; &lt;p&gt; - &lt;strong&gt;Chat&lt;/strong&gt; &lt;strong&gt;UI&lt;/strong&gt; (raglight serve --ui) : add a --ui flag to launch a Streamlit interface alongside the API, letting you chat with your documents, upload files, and ingest directories directly from the browser.&lt;/p&gt; &lt;p&gt;Repository : &lt;a href=&quot;https://github.com/Bessouat40/RAGLight&quot;&gt;https://github.com/Bessouat40/RAGLight&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Documentation : &lt;a href=&quot;https://raglight.mintlify.app/&quot;&gt;https://raglight.mintlify.app/&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Labess40&quot;&gt; /u/Labess40 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rllsaz/new_raglight_feature_serve_your_rag_as_rest_api/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rllsaz/new_raglight_feature_serve_your_rag_as_rest_api/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rllsaz</id><link href="https://www.reddit.com/r/Python/comments/1rllsaz/new_raglight_feature_serve_your_rag_as_rest_api/" /><updated>2026-03-05T16:17:26+00:00</updated><published>2026-03-05T16:17:26+00:00</published><title>New RAGLight Feature : Serve your RAG as REST API and access a UI</title></entry><entry><author><name>/u/Mysterious-Form-3681</name><uri>https://www.reddit.com/user/Mysterious-Form-3681</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/ibis-project/ibis&quot;&gt;ibis&lt;/a&gt;&lt;br/&gt; A Python API that lets you write queries once and run them across multiple data backends like DuckDB, BigQuery, and Snowflake. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://github.com/Kanaries/pygwalker&quot;&gt;pygwalker&lt;/a&gt;&lt;br/&gt; Turns a dataframe into an interactive visual exploration UI instantly. &lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://github.com/projectdiscovery/katana&quot;&gt;katana&lt;/a&gt;&lt;br/&gt; A fast and scalable web crawler often used for security testing and large-scale data discovery. &lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Mysterious-Form-3681&quot;&gt; /u/Mysterious-Form-3681 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rkssxj/if_youre_working_with_data_pipelines_these_repos/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rkssxj/if_youre_working_with_data_pipelines_these_repos/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rkssxj</id><link href="https://www.reddit.com/r/Python/comments/1rkssxj/if_youre_working_with_data_pipelines_these_repos/" /><updated>2026-03-04T18:10:00+00:00</updated><published>2026-03-04T18:10:00+00:00</published><title>If you're working with data pipelines, these repos are very useful</title></entry><entry><author><name>/u/JuicyCiwa</name><uri>https://www.reddit.com/user/JuicyCiwa</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Title. I’ve been soloing projects since I started learning but I’ve never really tried to do a collaborative project and think it would be fun. I’m not sure where else to look for a fellow nerd to make something so I’m trying here. Let’s talk!&lt;/p&gt; &lt;p&gt;I’m no developer but to give an idea of my competency I’ve written a handful of automation scripts for work and some little side projects.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/JuicyCiwa&quot;&gt; /u/JuicyCiwa &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlujvp/id_love_to_try_a_collaborative_project/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlujvp/id_love_to_try_a_collaborative_project/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlujvp</id><link href="https://www.reddit.com/r/Python/comments/1rlujvp/id_love_to_try_a_collaborative_project/" /><updated>2026-03-05T21:37:40+00:00</updated><published>2026-03-05T21:37:40+00:00</published><title>I’d love to try a collaborative project</title></entry><entry><author><name>/u/ShareSerious2134</name><uri>https://www.reddit.com/user/ShareSerious2134</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I built an open-source Python SDK that wraps AI agent calls (OpenAI for now) to add policy enforcement, PII detection, cost tracking, and audit logging.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; When you deploy AI agents in production, you have zero visibility into what they&amp;#39;re doing — no audit trail, no cost controls, PII leaking to APIs, and no way to trace failures.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What it does (3 lines of code):&lt;/strong&gt;&lt;/p&gt; &lt;pre&gt;&lt;code&gt;pythonfrom agentguard import AgentGuard guard = AgentGuard(policies=[&amp;quot;pii&amp;quot;, &amp;quot;content_filter&amp;quot;, &amp;quot;cost_limit&amp;quot;]) safe_client = guard.wrap_openai(client) &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Every LLM call and tool use is now intercepted, policy-checked, and logged.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;PII detection &amp;amp; blocking (regex-based, pluggable)&lt;/li&gt; &lt;li&gt;Prompt injection detection&lt;/li&gt; &lt;li&gt;Per-run/daily/total cost limits&lt;/li&gt; &lt;li&gt;Immutable JSON-lines audit trail&lt;/li&gt; &lt;li&gt;CLI tool with step-by-step run replay (&lt;code&gt;agentguard replay &amp;lt;run_id&amp;gt;&lt;/code&gt;)&lt;/li&gt; &lt;li&gt;Full async support&lt;/li&gt; &lt;li&gt;104 tests, zero external deps beyond pydantic + openai&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&amp;#8203;&lt;/p&gt; &lt;pre&gt;&lt;code&gt;pip install agentaudit-sdk &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;GitHub: &lt;a href=&quot;https://github.com/AviraL0013/agentguard&quot;&gt;https://github.com/AviraL0013/agentguard&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This is my first real open-source package. Would genuinely appreciate feedback on the API design, project structure, or anything that looks off. &lt;/p&gt; &lt;h1&gt;What My Project Does&lt;/h1&gt; &lt;p&gt;AgentGuard is a Python SDK that wraps AI agent calls (OpenAI) to add policy enforcement, PII detection, cost tracking, and audit logging. 3 lines of code to make any agent compliant:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;pythonfrom agentguard import AgentGuard guard = AgentGuard(policies=[&amp;quot;pii&amp;quot;, &amp;quot;content_filter&amp;quot;, &amp;quot;cost_limit&amp;quot;]) safe_client = guard.wrap_openai(client) # Every call is now intercepted, policy-checked, and logged &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Features:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;PII detection &amp;amp; blocking (emails, SSNs, credit cards, phones)&lt;/li&gt; &lt;li&gt;Prompt injection detection&lt;/li&gt; &lt;li&gt;Per-run / daily / total cost limits with per-model pricing&lt;/li&gt; &lt;li&gt;Immutable JSON-lines audit trail&lt;/li&gt; &lt;li&gt;CLI tool with step-by-step run replay (agentguard replay &amp;lt;run\_id&amp;gt;)&lt;/li&gt; &lt;li&gt;Full async support (wrap_openai_async, async tool wrapping)&lt;/li&gt; &lt;li&gt;Custom policy support (subclass Policy, implement evaluate())&lt;/li&gt; &lt;li&gt;104 tests passing, built on pydantic + openai&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&amp;#8203;&lt;/p&gt; &lt;pre&gt;&lt;code&gt;pip install agentaudit-sdk &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;Source code: &lt;a href=&quot;https://github.com/AviraL0013/agentguard&quot;&gt;https://github.com/AviraL0013/agentguard&lt;/a&gt;&lt;/p&gt; &lt;h1&gt;Target Audience&lt;/h1&gt; &lt;p&gt;Developers deploying AI agents in production who need observability, compliance, and cost control. Built for real use — not a toy project. Already on PyPI.&lt;/p&gt; &lt;h1&gt;Comparison&lt;/h1&gt; &lt;ul&gt; &lt;li&gt;Guardrails AI / NeMo Guardrails: Focus on output validation and conversational rails. AgentGuard focuses on the full agent lifecycle — tool calls, cost tracking, audit trails, and CLI replay. Different layer.&lt;/li&gt; &lt;li&gt;LangSmith / Langfuse: Observability platforms (hosted dashboards). AgentGuard is an SDK that sits in your code — no external service needed. It enforces policies before the call happens, not just logs after.&lt;/li&gt; &lt;li&gt;Custom middleware: Most teams roll their own. AgentGuard gives you that in a pip install with pluggable policies and zero config.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Would love feedback on the API design and project structure. First time publishing to PyPI.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/ShareSerious2134&quot;&gt; /u/ShareSerious2134 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlu9je/agentguard_opensource_governance_observability/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlu9je/agentguard_opensource_governance_observability/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlu9je</id><link href="https://www.reddit.com/r/Python/comments/1rlu9je/agentguard_opensource_governance_observability/" /><updated>2026-03-05T21:26:50+00:00</updated><published>2026-03-05T21:26:50+00:00</published><title>AgentGuard — Open-source governance &amp; observability SDK for AI agents</title></entry><entry><author><name>/u/hdw_coder</name><uri>https://www.reddit.com/user/hdw_coder</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;A Reddit discussion turned my duplicate-photo Python script into a full application — here are the engineering lessons&lt;/p&gt; &lt;p&gt; A while ago I wrote a small Python script to detect duplicate photos using perceptual hashing.&lt;/p&gt; &lt;p&gt;It worked surprisingly well — even on fairly large photo collections.&lt;/p&gt; &lt;p&gt;I shared it on Reddit and the discussion that followed surfaced something interesting: once people started using it on &lt;em&gt;real&lt;/em&gt; photo libraries, the problem stopped being about hashing and became a &lt;em&gt;systems engineering problem&lt;/em&gt;.&lt;/p&gt; &lt;p&gt; Some examples that came up: libraries with &lt;em&gt;hundreds of thousands of photos&lt;/em&gt;, 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.&lt;/p&gt; &lt;p&gt;At that point the project started evolving quite a bit.&lt;/p&gt; &lt;p&gt; The monolithic script eventually became a modular architecture:&lt;/p&gt; &lt;p&gt;GUI / CLI -&amp;gt; Worker -&amp;gt; Engine -&amp;gt; Hashing + feature extraction -&amp;gt; SQLite index cache -&amp;gt; Reporting (CSV + HTML thumbnails) &lt;/p&gt; &lt;p&gt;Some of the more interesting engineering lessons.&lt;/p&gt; &lt;p&gt; &lt;em&gt;Scaling beyond O(n²)&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Naively comparing every image to every other image explodes quickly. 50k images means &lt;em&gt;1.25 billion comparisons.&lt;/em&gt; So the system uses &lt;em&gt;hash prefix bucketing&lt;/em&gt; to reduce comparisons drastically before running perceptual hash checks.&lt;/p&gt; &lt;p&gt; &lt;em&gt;Incremental rescans&lt;/em&gt;&lt;/p&gt; &lt;p&gt;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 &lt;em&gt;new or changed images&lt;/em&gt;.&lt;/p&gt; &lt;p&gt; &lt;em&gt;Safety-first design&lt;/em&gt;&lt;/p&gt; &lt;p&gt;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’.&lt;/p&gt; &lt;p&gt; &lt;em&gt;Packaging surprises&lt;/em&gt;&lt;/p&gt; &lt;p&gt;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.&lt;/p&gt; &lt;p&gt; The project ended up teaching me much more about &lt;em&gt;architecture and dependency hygiene&lt;/em&gt; than about hashing. I wrote a deeper breakdown here if anyone is interested: &lt;a href=&quot;https://code2trade.dev/from-a-finding-duplicates-script-to-the-deduptool-engineering-a-safe-deterministic-photo-deduplication-tool-for-windows/&quot;&gt;from-a-finding-duplicates-script-to-the-deduptool-engineering-a-safe-deterministic-photo-deduplication-tool-for-windows&lt;/a&gt;&lt;/p&gt; &lt;p&gt; And for context, this was the &lt;a href=&quot;https://www.reddit.com/r/Python/comments/1r73nrb/comment/o5um36q/&quot;&gt;earlier Reddit discussion&lt;/a&gt; around the original script.&lt;/p&gt; &lt;p&gt; 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.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/hdw_coder&quot;&gt; /u/hdw_coder &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlk34q/i_turned_a_redditdiscussed_duplicatephoto_script/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlk34q/i_turned_a_redditdiscussed_duplicatephoto_script/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlk34q</id><link href="https://www.reddit.com/r/Python/comments/1rlk34q/i_turned_a_redditdiscussed_duplicatephoto_script/" /><updated>2026-03-05T15:11:22+00:00</updated><published>2026-03-05T15:11:22+00:00</published><title>I turned a Reddit-discussed duplicate-photo script into a tool (architecture, scaling, packaging)</title></entry><entry><author><name>/u/AutoModerator</name><uri>https://www.reddit.com/user/AutoModerator</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;h1&gt;Weekly Thread: Professional Use, Jobs, and Education 🏢&lt;/h1&gt; &lt;p&gt;Welcome to this week&amp;#39;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 &lt;strong&gt;not for recruitment&lt;/strong&gt;.&lt;/p&gt; &lt;hr/&gt; &lt;h2&gt;How it Works:&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Career Talk&lt;/strong&gt;: Discuss using Python in your job, or the job market for Python roles.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Education Q&amp;amp;A&lt;/strong&gt;: Ask or answer questions about Python courses, certifications, and educational resources.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Workplace Chat&lt;/strong&gt;: Share your experiences, challenges, or success stories about using Python professionally.&lt;/li&gt; &lt;/ol&gt; &lt;hr/&gt; &lt;h2&gt;Guidelines:&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;This thread is &lt;strong&gt;not for recruitment&lt;/strong&gt;. For job postings, please see &lt;a href=&quot;/r/PythonJobs&quot;&gt;r/PythonJobs&lt;/a&gt; or the recruitment thread in the sidebar.&lt;/li&gt; &lt;li&gt;Keep discussions relevant to Python in the professional and educational context.&lt;/li&gt; &lt;/ul&gt; &lt;hr/&gt; &lt;h2&gt;Example Topics:&lt;/h2&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Career Paths&lt;/strong&gt;: What kinds of roles are out there for Python developers?&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Certifications&lt;/strong&gt;: Are Python certifications worth it?&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Course Recommendations&lt;/strong&gt;: Any good advanced Python courses to recommend?&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Workplace Tools&lt;/strong&gt;: What Python libraries are indispensable in your professional work?&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Interview Tips&lt;/strong&gt;: What types of Python questions are commonly asked in interviews?&lt;/li&gt; &lt;/ol&gt; &lt;hr/&gt; &lt;p&gt;Let&amp;#39;s help each other grow in our careers and education. Happy discussing! 🌟&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/AutoModerator&quot;&gt; /u/AutoModerator &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl2259/thursday_daily_thread_python_careers_courses_and/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl2259/thursday_daily_thread_python_careers_courses_and/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rl2259</id><link href="https://www.reddit.com/r/Python/comments/1rl2259/thursday_daily_thread_python_careers_courses_and/" /><updated>2026-03-05T00:01:05+00:00</updated><published>2026-03-05T00:01:05+00:00</published><title>Thursday Daily Thread: Python Careers, Courses, and Furthering Education!</title></entry><entry><author><name>/u/lord-mortis420</name><uri>https://www.reddit.com/user/lord-mortis420</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;h1&gt;What my project does&lt;/h1&gt; &lt;p&gt;Working in massive Python monorepos, I started getting really frustrated by the sluggishness of Pyright and BasedPyright. They&amp;#39;re incredible tools, but large projects severely bog down editor responsiveness.&lt;/p&gt; &lt;p&gt;I wanted something fundamentally faster. So, I decided to build my own Language Server: &lt;strong&gt;Rahu&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;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.&lt;/p&gt; &lt;h1&gt;Current Capabilities&lt;/h1&gt; &lt;p&gt;It actually has a solid set of in-editor features working right now:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Real-time diagnostics:&lt;/strong&gt; Catches parser and semantic errors on the fly.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Intelligent Hover:&lt;/strong&gt; Displays rich symbol/method info and definition locations.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Go-to-definition:&lt;/strong&gt; Works for variables, functions, classes, parameters, and attributes.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Semantic Analysis:&lt;/strong&gt; Full LEGB-style name resolution and builtin symbol awareness.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;OOP Support:&lt;/strong&gt; Tracks class inheritance (with member promotion and override handling) and resolves instance attributes (&lt;code&gt;self.x = ...&lt;/code&gt;).&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Editor Integration:&lt;/strong&gt; Handles document lifecycles (&lt;code&gt;didOpen&lt;/code&gt;, &lt;code&gt;didChange&lt;/code&gt;, &lt;code&gt;didClose&lt;/code&gt;) with debounced analysis so it doesn&amp;#39;t fry your CPU while typing.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;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.&lt;/p&gt; &lt;h1&gt;Target audience&lt;/h1&gt; &lt;p&gt;Just a toy project so far&lt;/p&gt; &lt;p&gt;The biggest missing pieces I&amp;#39;m tackling next:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Import / module resolution&lt;/li&gt; &lt;li&gt;Cross-file workspace indexing&lt;/li&gt; &lt;li&gt;References, rename, and auto-completion&lt;/li&gt; &lt;li&gt;Deeper type inference&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;Check it out at the link below! &lt;strong&gt;Repo link:&lt;/strong&gt; &lt;a href=&quot;https://github.com/ak4-sh/rahu&quot;&gt;https://github.com/ak4-sh/rahu&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/lord-mortis420&quot;&gt; /u/lord-mortis420 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl5586/built_an_lsp_for_python_in_go/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl5586/built_an_lsp_for_python_in_go/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rl5586</id><link href="https://www.reddit.com/r/Python/comments/1rl5586/built_an_lsp_for_python_in_go/" /><updated>2026-03-05T02:17:23+00:00</updated><published>2026-03-05T02:17:23+00:00</published><title>Built an LSP for Python in Go</title></entry><entry><author><name>/u/Usual-Capital8132</name><uri>https://www.reddit.com/user/Usual-Capital8132</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;## What My Project Does&lt;/p&gt; &lt;p&gt;Super Editor is a hardened file editing tool built for AI agent workflows. It provides:&lt;/p&gt; &lt;p&gt;- **Atomic writes** – No partial writes, file is either fully updated or unchanged&lt;/p&gt; &lt;p&gt;- **Automatic ZIP backups** – Every change is backed up before modification&lt;/p&gt; &lt;p&gt;- **Safe refactoring** – Regex and AST-based operations with validation&lt;/p&gt; &lt;p&gt;- **Multiple read modes** – full, lines, bytes, or until_pattern&lt;/p&gt; &lt;p&gt;- **Git integration** – Optional auto-commit after changes&lt;/p&gt; &lt;p&gt;- **1,050 torture tests** – 100% pass rate, battle-tested&lt;/p&gt; &lt;p&gt;Built after creating 75+ tools for my AI agent infrastructure. This is the one I use most.&lt;/p&gt; &lt;p&gt;## Target Audience&lt;/p&gt; &lt;p&gt;**Primary:** Developers building AI agents that need to edit files autonomously&lt;/p&gt; &lt;p&gt;**Secondary:**&lt;/p&gt; &lt;p&gt;- Python developers who want safer file operations&lt;/p&gt; &lt;p&gt;- Teams needing auditable file changes with automatic backups&lt;/p&gt; &lt;p&gt;- Anyone doing automated code refactoring&lt;/p&gt; &lt;p&gt;**Production-ready?** Yes – used in production AI agent workflows. Both Python and Go versions available.&lt;/p&gt; &lt;p&gt;## Comparison&lt;/p&gt; &lt;p&gt;| Tool | Atomic Writes | Auto Backup | AST Refactor | Agent-Designed |&lt;/p&gt; &lt;p&gt;|------|--------------|-------------|--------------|----------------|&lt;/p&gt; &lt;p&gt;| **Super Editor** | ✅ | ✅ ZIP | ✅ Python | ✅ Yes |&lt;/p&gt; &lt;p&gt;| sed/awk | ❌ | ❌ | ❌ | ❌ |&lt;/p&gt; &lt;p&gt;| Standard editors | ❌ | ❌ | ❌ | ❌ |&lt;/p&gt; &lt;p&gt;| IDE refactoring | ⚠️ Some | ⚠️ Some | ✅ | ❌ |&lt;/p&gt; &lt;p&gt;| Aider | ✅ | ⚠️ Git only | ⚠️ Limited | ✅ Yes |&lt;/p&gt; &lt;p&gt;**What makes it different:**&lt;/p&gt; &lt;p&gt;- Designed specifically for autonomous AI agents (not human-in-the-loop)&lt;/p&gt; &lt;p&gt;- Built-in torture test suite (1,050 tests)&lt;/p&gt; &lt;p&gt;- Dual Python + Go implementation (Go is 20x faster)&lt;/p&gt; &lt;p&gt;- Knowledge base integration for policy-driven editing&lt;/p&gt; &lt;p&gt;## Installation&lt;/p&gt; &lt;p&gt;```bash&lt;/p&gt; &lt;p&gt;pip install super-editor&lt;/p&gt; &lt;p&gt;```&lt;/p&gt; &lt;p&gt;## Usage Examples&lt;/p&gt; &lt;p&gt;```bash&lt;/p&gt; &lt;p&gt;# Write to a file&lt;/p&gt; &lt;p&gt;super-editor safe-write file.txt --content &amp;quot;Hello!&amp;quot; --write-mode write&lt;/p&gt; &lt;p&gt;# Read a file&lt;/p&gt; &lt;p&gt;super-editor safe-read file.txt --read-mode full&lt;/p&gt; &lt;p&gt;# Replace text&lt;/p&gt; &lt;p&gt;super-editor replace file.txt --pattern &amp;quot;old&amp;quot; --replacement &amp;quot;new&amp;quot;&lt;/p&gt; &lt;p&gt;# Line operations&lt;/p&gt; &lt;p&gt;super-editor line file.txt --line-number 5 --operation insert&lt;/p&gt; &lt;p&gt;```&lt;/p&gt; &lt;p&gt;## Links&lt;/p&gt; &lt;p&gt;- **PyPI:** &lt;a href=&quot;https://pypi.org/project/super-editor/&quot;&gt;https://pypi.org/project/super-editor/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;- **GitHub:** &lt;a href=&quot;https://github.com/larryste1/super-editor&quot;&gt;https://github.com/larryste1/super-editor&lt;/a&gt;&lt;/p&gt; &lt;p&gt;## Feedback Welcome&lt;/p&gt; &lt;p&gt;First major PyPI release. Would appreciate feedback on API design, documentation, and missing features!&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Usual-Capital8132&quot;&gt; /u/Usual-Capital8132 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rluojr/super_editor_is_a_hardened_file_editing_tool/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rluojr/super_editor_is_a_hardened_file_editing_tool/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rluojr</id><link href="https://www.reddit.com/r/Python/comments/1rluojr/super_editor_is_a_hardened_file_editing_tool/" /><updated>2026-03-05T21:42:25+00:00</updated><published>2026-03-05T21:42:25+00:00</published><title>Super Editor is a hardened file editing tool built for AI agent workflows</title></entry><entry><author><name>/u/jingweno</name><uri>https://www.reddit.com/user/jingweno</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;I&amp;#39;ve been building AI tools using only &lt;code&gt;requests&lt;/code&gt; and &lt;code&gt;subprocess&lt;/code&gt; (I maintain &lt;code&gt;jq&lt;/code&gt;, so I&amp;#39;m biased toward small, composable things). Here&amp;#39;s a practical guide to using Claude&amp;#39;s tool-use / function-calling API without installing the official SDK.&lt;/p&gt; &lt;h1&gt;The basics&lt;/h1&gt; &lt;p&gt;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&amp;#39;s the minimal setup:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;import requests, os def call_claude(messages, tools=None): payload = { &amp;quot;model&amp;quot;: &amp;quot;claude-sonnet-4-5-20250929&amp;quot;, &amp;quot;max_tokens&amp;quot;: 8096, &amp;quot;messages&amp;quot;: messages, } if tools: payload[&amp;quot;tools&amp;quot;] = tools response = requests.post( &amp;quot;https://api.anthropic.com/v1/messages&amp;quot;, headers={ &amp;quot;x-api-key&amp;quot;: os.environ[&amp;quot;ANTHROPIC_API_KEY&amp;quot;], &amp;quot;content-type&amp;quot;: &amp;quot;application/json&amp;quot;, &amp;quot;anthropic-version&amp;quot;: &amp;quot;2023-06-01&amp;quot;, }, json=payload, ) response.raise_for_status() return response.json() &lt;/code&gt;&lt;/pre&gt; &lt;h1&gt;Defining a tool&lt;/h1&gt; &lt;p&gt;No decorators. Just a dict:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;read_file_tool = { &amp;quot;name&amp;quot;: &amp;quot;read_file&amp;quot;, &amp;quot;description&amp;quot;: &amp;quot;Read the contents of a file at the given path.&amp;quot;, &amp;quot;input_schema&amp;quot;: { &amp;quot;type&amp;quot;: &amp;quot;object&amp;quot;, &amp;quot;properties&amp;quot;: { &amp;quot;path&amp;quot;: {&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;, &amp;quot;description&amp;quot;: &amp;quot;File path to read&amp;quot;} }, &amp;quot;required&amp;quot;: [&amp;quot;path&amp;quot;], }, } &lt;/code&gt;&lt;/pre&gt; &lt;h1&gt;The tool-use loop&lt;/h1&gt; &lt;p&gt;When the model wants to use a tool, it returns a response with &lt;code&gt;stop_reason: &amp;quot;tool_use&amp;quot;&lt;/code&gt; and one or more &lt;code&gt;tool_use&lt;/code&gt; blocks. You execute them and send the results back:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;messages = [{&amp;quot;role&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;content&amp;quot;: &amp;quot;What&amp;#39;s in requirements.txt?&amp;quot;}] while True: result = call_claude(messages, tools=[read_file_tool]) messages.append({&amp;quot;role&amp;quot;: &amp;quot;assistant&amp;quot;, &amp;quot;content&amp;quot;: result[&amp;quot;content&amp;quot;]}) tool_calls = [b for b in result[&amp;quot;content&amp;quot;] if b[&amp;quot;type&amp;quot;] == &amp;quot;tool_use&amp;quot;] if not tool_calls: # Model responded with text — we&amp;#39;re done print(result[&amp;quot;content&amp;quot;][0][&amp;quot;text&amp;quot;]) break # Execute each tool and send results back tool_results = [] for tc in tool_calls: if tc[&amp;quot;name&amp;quot;] == &amp;quot;read_file&amp;quot;: with open(tc[&amp;quot;input&amp;quot;][&amp;quot;path&amp;quot;]) as f: content = f.read() tool_results.append({ &amp;quot;type&amp;quot;: &amp;quot;tool_result&amp;quot;, &amp;quot;tool_use_id&amp;quot;: tc[&amp;quot;id&amp;quot;], &amp;quot;content&amp;quot;: content, }) messages.append({&amp;quot;role&amp;quot;: &amp;quot;user&amp;quot;, &amp;quot;content&amp;quot;: tool_results}) &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;That&amp;#39;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.&lt;/p&gt; &lt;h1&gt;Why skip the SDK?&lt;/h1&gt; &lt;p&gt;Three reasons:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Fewer dependencies.&lt;/strong&gt; &lt;code&gt;requests&lt;/code&gt; is probably already in your project.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Full visibility.&lt;/strong&gt; You see exactly what goes over the wire. When something breaks, you &lt;code&gt;print(response.json())&lt;/code&gt; and you&amp;#39;re done.&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Portability.&lt;/strong&gt; The same pattern works for any provider that supports tool use (OpenAI, DeepSeek, Ollama). Swap the URL and headers, keep the loop.&lt;/li&gt; &lt;/ol&gt; &lt;h1&gt;Taking it further&lt;/h1&gt; &lt;p&gt;Once you have this loop, adding more tools is mechanical - define the schema, add an &lt;code&gt;elif&lt;/code&gt; 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.&lt;/p&gt; &lt;p&gt;I wrote the whole process up as a book if you want the full walkthrough: &lt;a href=&quot;https://buildyourowncodingagent.com&quot;&gt;https://buildyourowncodingagent.com&lt;/a&gt; (free sample chapters on the site, source code on &lt;a href=&quot;https://github.com/owenthereal/build-your-own-coding-agent&quot;&gt;GitHub&lt;/a&gt;).&lt;/p&gt; &lt;p&gt;Questions welcome - especially if you&amp;#39;ve tried the raw API approach and hit edge cases.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/jingweno&quot;&gt; /u/jingweno &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlm1s8/how_to_call_claudes_tooluse_api_with_raw_requests/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rlm1s8/how_to_call_claudes_tooluse_api_with_raw_requests/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rlm1s8</id><link href="https://www.reddit.com/r/Python/comments/1rlm1s8/how_to_call_claudes_tooluse_api_with_raw_requests/" /><updated>2026-03-05T16:27:33+00:00</updated><published>2026-03-05T16:27:33+00:00</published><title>How to call Claude's tool-use API with raw `requests` - no SDK needed</title></entry><entry><author><name>/u/ForeignSource0</name><uri>https://www.reddit.com/user/ForeignSource0</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hi &lt;a href=&quot;/r/python&quot;&gt;/r/python&lt;/a&gt;!&lt;/p&gt; &lt;p&gt;DI gets flak sometimes around here for being overengineered and adding overhead. I wanted to know how much it actually adds in a real stack, so I built a benchmark suite to find out. The fastest containers are within ~1% of manual wiring, while others drop between 20-70%&lt;/p&gt; &lt;p&gt;Full disclosure, I maintain &lt;a href=&quot;https://github.com/maldoinc/wireup&quot;&gt;Wireup&lt;/a&gt;, which is also in the race. The benchmark covers 10 libraries plus manual wiring via globals/creating objects yourself as an upper bound, so you can draw your own conclusions.&lt;/p&gt; &lt;p&gt;Testing is done within a FastAPI + Uvicorn environment to measure performance in a realistic web-based environment. Notably, this also allows for the inclusion of fastapi.Depends in the comparison, as it is the most popular choice by virtue of being the FastAPI default. &lt;/p&gt; &lt;p&gt;This tests the full integration stack using a dense graph of 7 dependencies, enough to show variance between the containers, but realistic enough to reflect a possible dependency graph in the real world. This way you test container resolution, scoping, lifecycle management, and framework wiring in real FastAPI + Uvicorn request/response cycles. Not a microbenchmark resolving the same dependency in a tight loop.&lt;/p&gt; &lt;hr/&gt; &lt;p&gt;Table below shows Requests per second achieved as well as the secondary metrics:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;RPS (Requests Per Second)&lt;/strong&gt;: The number of requests the server can handle in one second. &lt;strong&gt;Higher is better.&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Latency (p50, p95, p99)&lt;/strong&gt;: The time it takes for a request to be completed, measured in milliseconds. &lt;strong&gt;Lower is better.&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;σ (Standard Deviation)&lt;/strong&gt;: Measures the stability of response times (Jitter). A lower number means more consistent performance with fewer outliers. &lt;strong&gt;Lower is better.&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;RSS Memory Peak (MB)&lt;/strong&gt;: The highest post-iteration RSS sample observed across runs. &lt;strong&gt;Lower is better.&lt;/strong&gt; This includes the full server process footprint (Uvicorn + FastAPI app + framework runtime), not only service objects.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Per-request injection&lt;/strong&gt; (new dependency graph built and torn down on every request):&lt;/p&gt; &lt;table&gt;&lt;thead&gt; &lt;tr&gt; &lt;th align=&quot;left&quot;&gt;Project&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;RPS (Median Run)&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;P50 (ms)&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;P95 (ms)&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;P99 (ms)&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;σ (ms)&lt;/th&gt; &lt;th align=&quot;left&quot;&gt;Mem Peak&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Manual Wiring (No DI)&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;11,044 (100.00%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.20&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.50&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.70&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;0.70&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;52.93 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Wireup&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;11,030 (99.87%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.20&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.50&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.70&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;0.83&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;53.69 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Wireup Class-Based&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;10,976 (99.38%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.30&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.50&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4.70&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;0.70&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;53.80 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Dishka&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;8,538 (77.30%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;5.30&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;6.30&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;9.40&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;1.30&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;103.23 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Svcs&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;8,394 (76.00%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;5.70&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;6.00&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;6.20&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;0.93&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;67.09 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Aioinject&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;8,177 (74.04%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;5.60&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;6.60&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;10.40&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;1.31&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;100.52 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;diwire&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;7,390 (66.91%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;6.50&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;6.90&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;7.10&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;1.07&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;58.22 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;That Depends&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;4,892 (44.30%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;9.80&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;10.40&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;10.60&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;0.59&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;53.82 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;FastAPI Depends&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;3,950 (35.76%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;12.30&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;13.80&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;14.10&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;1.39&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;57.68 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Injector&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;3,192 (28.90%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;15.20&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;15.40&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;16.10&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;0.58&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;53.52 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Dependency Injector&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;2,576 (23.33%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;19.10&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;19.70&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;20.10&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;0.75&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;60.55 MB&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align=&quot;left&quot;&gt;&lt;strong&gt;Lagom&lt;/strong&gt;&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;898 (8.13%)&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;55.30&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;57.20&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;58.30&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;1.63&lt;/td&gt; &lt;td align=&quot;left&quot;&gt;1.32 GB&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;hr/&gt; &lt;p&gt;&lt;strong&gt;Singleton injection&lt;/strong&gt; (cached graph, testing container bookkeeping overhead):&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Manual Wiring: &lt;strong&gt;13,351 RPS&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;Wireup Class-Based: &lt;strong&gt;13,342 RPS&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;Wireup: &lt;strong&gt;13,214 RPS&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;Dependency Injector: &lt;strong&gt;6,905 RPS&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;FastAPI Depends: &lt;strong&gt;6,153 RPS&lt;/strong&gt;&lt;/li&gt; &lt;/ul&gt; &lt;hr/&gt; &lt;p&gt;The full page goes much deeper: stability tables across all 50 runs, memory usage, methodology, feature completeness notes, and reproducibility: &lt;a href=&quot;https://maldoinc.github.io/wireup/latest/benchmarks/&quot;&gt;https://maldoinc.github.io/wireup/latest/benchmarks/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Reproduce it yourself: &lt;code&gt;make bench iterations=50 requests=100000&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Wireup getting this close to manual wiring comes down to how it works: instead of routing everything through a generic resolver, it compiles graph-specific resolution paths and custom injection functions per route at startup. By the time a request arrives there&amp;#39;s nothing left to figure out.&lt;/p&gt; &lt;p&gt;If Wireup looks interesting: &lt;a href=&quot;https://github.com/maldoinc/wireup&quot;&gt;github.com/maldoinc/wireup&lt;/a&gt;, stars appreciated.&lt;/p&gt; &lt;p&gt;Happy to answer any questions on the benchmark, DI and Wireup specifically.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/ForeignSource0&quot;&gt; /u/ForeignSource0 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rkos6s/benchmarked_10_python_dependency_injection/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rkos6s/benchmarked_10_python_dependency_injection/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rkos6s</id><link href="https://www.reddit.com/r/Python/comments/1rkos6s/benchmarked_10_python_dependency_injection/" /><updated>2026-03-04T15:43:23+00:00</updated><published>2026-03-04T15:43:23+00:00</published><title>Benchmarked: 10 Python Dependency Injection libraries vs Manual Wiring (50 rounds x 100k requests)</title></entry><entry><author><name>/u/antoniorodriguez-dev</name><uri>https://www.reddit.com/user/antoniorodriguez-dev</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Hi everyone,&lt;/p&gt; &lt;p&gt;I’ve been working with DynamoDB + boto3 for a while, and I kept running into repetitive patterns: building &lt;code&gt;ExpressionAttributeNames&lt;/code&gt;, crafting update expressions, and handling pagination loops manually.&lt;/p&gt; &lt;p&gt;So I built &lt;strong&gt;dkmio&lt;/strong&gt;, a small Object-Key Mapper (OKM) focused on reducing boilerplate while keeping DynamoDB semantics explicit.&lt;/p&gt; &lt;p&gt;GitHub: &lt;a href=&quot;https://github.com/Antonipo/dkmio&quot;&gt;https://github.com/Antonipo/dkmio&lt;/a&gt;&lt;br/&gt; PyPI: &lt;a href=&quot;https://pypi.org/project/dkmio/&quot;&gt;https://pypi.org/project/dkmio/&lt;/a&gt;&lt;br/&gt; Docs: &lt;a href=&quot;https://dkmio.antoniorodriguez.dev/&quot;&gt;https://dkmio.antoniorodriguez.dev/&lt;/a&gt;&lt;/p&gt; &lt;h1&gt;What My Project Does&lt;/h1&gt; &lt;p&gt;dkmio is a thin, typed wrapper around boto3 that automates the tedious parts of DynamoDB interaction. It reduces code volume by:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Automatically generating update and filter expressions.&lt;/li&gt; &lt;li&gt;Safely handling reserved attribute names (no more manual aliasing).&lt;/li&gt; &lt;li&gt;Auto-paginating queries and auto-chunking batch writes.&lt;/li&gt; &lt;li&gt;Converting DynamoDB &lt;code&gt;Decimal&lt;/code&gt; values into JSON-serializable types.&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;It supports native operations (&lt;code&gt;get&lt;/code&gt;, &lt;code&gt;query&lt;/code&gt;, &lt;code&gt;scan&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;transactions&lt;/code&gt;) without introducing heavy abstractions, hidden state tracking, or implicit scans.&lt;/p&gt; &lt;h1&gt;Target Audience&lt;/h1&gt; &lt;p&gt;This tool is meant for:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Backend developers using Flask, FastAPI, or AWS Lambda.&lt;/li&gt; &lt;li&gt;Teams building production services who want to avoid the verbosity of raw boto3 but dislike heavy ORMs.&lt;/li&gt; &lt;li&gt;Developers who prefer explicit NoSQL modeling over &amp;quot;magic&amp;quot; abstraction layers.&lt;/li&gt; &lt;/ul&gt; &lt;h1&gt;Comparison&lt;/h1&gt; &lt;p&gt;&lt;strong&gt;Vs. Raw boto3&lt;/strong&gt; Standard boto3 requires verbose setup for simple updates:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;# Raw boto3 table.update_item( Key={&amp;quot;PK&amp;quot;: pk, &amp;quot;SK&amp;quot;: sk}, UpdateExpression=&amp;quot;SET #revoked = :val0&amp;quot;, ExpressionAttributeNames={&amp;quot;#revoked&amp;quot;: &amp;quot;revoked_at&amp;quot;}, ExpressionAttributeValues={&amp;quot;:val0&amp;quot;: now_epoch()} ) &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;With dkmio, this is simplified to:&lt;/p&gt; &lt;pre&gt;&lt;code&gt;# dkmio users.update(PK=pk, SK=sk, set={&amp;quot;revoked_at&amp;quot;: now_epoch()}) &lt;/code&gt;&lt;/pre&gt; &lt;p&gt;&lt;strong&gt;Vs. PynamoDB / ORMs&lt;/strong&gt; Unlike PynamoDB, dkmio does not enforce schemas, has no model state tracking, and doesn&amp;#39;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.&lt;/p&gt; &lt;p&gt;Feedback is greatly appreciated&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/antoniorodriguez-dev&quot;&gt; /u/antoniorodriguez-dev &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl42lw/i_built_dkmio_a_minimal_objectkey_mapper_for/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl42lw/i_built_dkmio_a_minimal_objectkey_mapper_for/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rl42lw</id><link href="https://www.reddit.com/r/Python/comments/1rl42lw/i_built_dkmio_a_minimal_objectkey_mapper_for/" /><updated>2026-03-05T01:28:26+00:00</updated><published>2026-03-05T01:28:26+00:00</published><title>I built dkmio – a minimal Object-Key Mapper for DynamoDB to reduce boto3 boilerplate</title></entry><entry><author><name>/u/passwordwork</name><uri>https://www.reddit.com/user/passwordwork</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;h1&gt;What My Project Does&lt;/h1&gt; &lt;p&gt;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&amp;#39;s Python payload file.&lt;/p&gt; &lt;p&gt;Each player selects a Python 3 payload file before the match begins. Once both players join, they&amp;#39;re shown their opponent&amp;#39;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.&lt;/p&gt; &lt;p&gt;If both players accept, the game enters the roulette phase where players take turns pulling the &amp;quot;trigger&amp;quot; (a button) until someone lands on the unlucky chamber. The loser&amp;#39;s machine is then served the winner&amp;#39;s payload file and runs it through Python&amp;#39;s &lt;code&gt;eval()&lt;/code&gt;. Logs are printed to the screen in real time. The winner gets a chat interface to talk to the loser while the code runs.&lt;/p&gt; &lt;p&gt;Critically, the payloads &lt;em&gt;do not&lt;/em&gt; have to be destructive. You can do fun stuff too like opening a specific webpage, flipping someone&amp;#39;s screen upside down, or any other flavor of creative mischief can be done.&lt;/p&gt; &lt;p&gt;What matters is &lt;em&gt;who&lt;/em&gt; you play with.&lt;/p&gt; &lt;h1&gt;Target Audience&lt;/h1&gt; &lt;p&gt;This is a hobby project, not meant for any real production use. It&amp;#39;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.&lt;/p&gt; &lt;p&gt;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.&lt;/p&gt; &lt;h1&gt;Comparison&lt;/h1&gt; &lt;p&gt;There isn&amp;#39;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&amp;#39;s normally treated as the worst possible vulnerability in software, repurposed here as a game mechanic.&lt;/p&gt; &lt;h1&gt;Future Ideas&lt;/h1&gt; &lt;p&gt;Currently, the game doesn&amp;#39;t have any public server. A hosted web server option could open it up to a wider audience.&lt;/p&gt; &lt;p&gt;Other ideas include &lt;em&gt;sandboxing options&lt;/em&gt; for more cautious players and payload templates for non-programmers. Both additions I think could have a wide appeal (lmk).&lt;/p&gt; &lt;p&gt;If you&amp;#39;re interested in Code Roulette &lt;em&gt;and are confident you can play it safely with your friends&lt;/em&gt;, then feel free to check it out here: &lt;a href=&quot;https://github.com/Sorcerio/Code-Roulette&quot;&gt;https://github.com/Sorcerio/Code-Roulette&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;I would love to hear what kind of payloads you can come up with; especially if they&amp;#39;re actually creative and fun!&lt;/em&gt; A few examples are included in the repo as well.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/passwordwork&quot;&gt; /u/passwordwork &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl0n1l/code_roulette_a_p2p_terminal_game_of_russian/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rl0n1l/code_roulette_a_p2p_terminal_game_of_russian/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rl0n1l</id><link href="https://www.reddit.com/r/Python/comments/1rl0n1l/code_roulette_a_p2p_terminal_game_of_russian/" /><updated>2026-03-04T23:02:57+00:00</updated><published>2026-03-04T23:02:57+00:00</published><title>Code Roulette: A P2P Terminal Game of Russian Roulette with Compartmentalized RCE</title></entry><entry><author><name>/u/Feisty-Cranberry2902</name><uri>https://www.reddit.com/user/Feisty-Cranberry2902</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;For anyone interested in the implementation:&lt;/p&gt; &lt;p&gt;GitHub repo: &lt;a href=&quot;https://github.com/Shweta-Mishra-ai/github-autopilot&quot;&gt;https://github.com/Shweta-Mishra-ai/github-autopilot&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Would appreciate feedback from other developers on the architecture and workflow automation.&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Feisty-Cranberry2902&quot;&gt; /u/Feisty-Cranberry2902 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rllhks/i_built_an_aipowered_github_app_that_reviews_prs/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rllhks/i_built_an_aipowered_github_app_that_reviews_prs/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rllhks</id><link href="https://www.reddit.com/r/Python/comments/1rllhks/i_built_an_aipowered_github_app_that_reviews_prs/" /><updated>2026-03-05T16:05:59+00:00</updated><published>2026-03-05T16:05:59+00:00</published><title>I built an AI-powered GitHub App that reviews PRs, triages issues, and monitors repo health</title></entry><entry><author><name>/u/Spiritualgrowth_1985</name><uri>https://www.reddit.com/user/Spiritualgrowth_1985</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;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 &lt;strong&gt;LangGraph&lt;/strong&gt;— the popular library that underlies many modern AI agents. &lt;/p&gt; &lt;p&gt;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.&lt;/p&gt; &lt;p&gt;Feel free to check out the course here:&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://langgraphagentcourse.com/&quot;&gt;https://langgraphagentcourse.com/&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Spiritualgrowth_1985&quot;&gt; /u/Spiritualgrowth_1985 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rljhh4/amazing_ai_agents_course/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rljhh4/amazing_ai_agents_course/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rljhh4</id><link href="https://www.reddit.com/r/Python/comments/1rljhh4/amazing_ai_agents_course/" /><updated>2026-03-05T14:47:07+00:00</updated><published>2026-03-05T14:47:07+00:00</published><title>Amazing AI Agents Course</title></entry><entry><author><name>/u/Immediate-Card-4896</name><uri>https://www.reddit.com/user/Immediate-Card-4896</uri></author><category term="Python" label="r/Python"/><content type="html">&lt;!-- SC_OFF --&gt;&lt;div class=&quot;md&quot;&gt;&lt;p&gt;Google Open Source Blog posted a new release today (Mar 3, 2026): cel-expr-python, a native Python API for compiling + evaluating CEL (Common Expression Language) expressions.&lt;/p&gt; &lt;p&gt;Repo: &lt;a href=&quot;https://github.com/cel-expr/cel-python&quot;&gt; https://github.com/cel-expr/cel-python &lt;/a&gt;&lt;/p&gt; &lt;p&gt;Announcement: &lt;a href=&quot;https://opensource.googleblog.com/2026/03/announcing-cel-expr-python-the-common-expression-language-in-python-now-open-source.html&quot;&gt; https://opensource.googleblog.com/2026/03/announcing-cel-expr-python-the-common-expression-language-in-python-now-open-source.html &lt;/a&gt;&lt;/p&gt; &lt;p&gt;Codelab: &lt;a href=&quot;https://github.com/cel-expr/cel-python/blob/main/codelab/index.lab.md&quot;&gt; https://github.com/cel-expr/cel-python/blob/main/codelab/index.lab.md &lt;/a&gt;&lt;/p&gt; &lt;p&gt;Why I’m interested:&lt;/p&gt; &lt;p&gt;- It’s the official CEL team’s Python wrapper over the production CEL C++ implementation (so semantics should match what other CEL runtimes do).&lt;/p&gt; &lt;p&gt;- It’s designed for “compile once, eval many” workflows with type-checking during compile (so you can validate expressions up front instead of `eval()`-ing arbitrary Python).&lt;/p&gt; &lt;p&gt;- It supports extensions and can serialize compiled expressions.&lt;/p&gt; &lt;p&gt;Quick start (from the blog/docs; blog snippet had a small typo so I’m writing the corrected version here):&lt;/p&gt; &lt;p&gt;pip install cel-expr-python&lt;/p&gt; &lt;p&gt;from cel_expr_python import cel&lt;/p&gt; &lt;p&gt;env = cel.NewEnv(variables={&amp;quot;who&amp;quot;: cel.Type.STRING})&lt;/p&gt; &lt;p&gt;expr = env.compile(&amp;quot;&amp;#39;Hello, &amp;#39; + who + &amp;#39;!&amp;#39;&amp;quot;)&lt;/p&gt; &lt;p&gt;print(expr.eval(data={&amp;quot;who&amp;quot;: &amp;quot;World&amp;quot;}).value()) # Hello, World!&lt;/p&gt; &lt;p&gt;Doc snippet: serialize + reuse compiled expressions&lt;/p&gt; &lt;p&gt;env = cel.NewEnv(variables={&amp;quot;x&amp;quot;: cel.Type.INT, &amp;quot;y&amp;quot;: cel.Type.INT})&lt;/p&gt; &lt;p&gt;expr = env.compile(&amp;quot;x + y &amp;gt; 10&amp;quot;)&lt;/p&gt; &lt;p&gt;blob = expr.serialize()&lt;/p&gt; &lt;p&gt;expr2 = env.deserialize(blob)&lt;/p&gt; &lt;p&gt;print(expr2.eval(data={&amp;quot;x&amp;quot;: 7, &amp;quot;y&amp;quot;: 4}).value()) # True&lt;/p&gt; &lt;p&gt;Doc snippet: custom function extension in Python&lt;/p&gt; &lt;p&gt;def my_func_impl(x):&lt;/p&gt; &lt;p&gt;return x + 1&lt;/p&gt; &lt;p&gt;my_ext = cel.CelExtension(&amp;quot;my_extension&amp;quot;, [cel.FunctionDecl(&amp;quot;my_func&amp;quot;, [cel.Overload(&amp;quot;my_func_int&amp;quot;, cel.Type.INT[cel.Type.INT], impl=my_func_impl)])])&lt;/p&gt; &lt;p&gt;env = cel.NewEnv(extensions=[my_ext])&lt;/p&gt; &lt;p&gt;expr = env.compile(&amp;quot;my_func(41)&amp;quot;)&lt;/p&gt; &lt;p&gt;print(expr.eval().value()) # 42&lt;/p&gt; &lt;p&gt;Side note / parallel that made me click on this:&lt;/p&gt; &lt;p&gt;I was just reading the &lt;a href=&quot;/r/Python&quot;&gt;r/Python&lt;/a&gt; thread on PEP 827 (type manipulation + expanding the type expression grammar):&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rimuu7/pep_827_type_manipulation_has_just_been_published/&quot;&gt; https://www.reddit.com/r/Python/comments/1rimuu7/pep_827_type_manipulation_has_just_been_published/ &lt;/a&gt;&lt;/p&gt; &lt;p&gt;Questions if there are any folks who’ve used CEL before:&lt;/p&gt; &lt;p&gt;- Where has CEL worked well (policy engines, validation, feature flags, filtering, etc.)?&lt;/p&gt; &lt;p&gt;- How does this compare to rolling your own AST-based evaluator / JsonLogic / JMESPath for real-world apps?&lt;/p&gt; &lt;p&gt;- Any gotchas with Python integration, perf, or packaging (looks like Linux + py3.11+ right now)?&lt;/p&gt; &lt;/div&gt;&lt;!-- SC_ON --&gt; &amp;#32; submitted by &amp;#32; &lt;a href=&quot;https://www.reddit.com/user/Immediate-Card-4896&quot;&gt; /u/Immediate-Card-4896 &lt;/a&gt; &lt;br/&gt; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rk8f3p/google_just_opensourced_celexprpython_cel_safe/&quot;&gt;[link]&lt;/a&gt;&lt;/span&gt; &amp;#32; &lt;span&gt;&lt;a href=&quot;https://www.reddit.com/r/Python/comments/1rk8f3p/google_just_opensourced_celexprpython_cel_safe/&quot;&gt;[comments]&lt;/a&gt;&lt;/span&gt;</content><id>t3_1rk8f3p</id><link href="https://www.reddit.com/r/Python/comments/1rk8f3p/google_just_opensourced_celexprpython_cel_safe/" /><updated>2026-03-04T01:46:50+00:00</updated><published>2026-03-04T01:46:50+00:00</published><title>Google just open-sourced cel-expr-python (CEL) — safe, typed expressions for Python (C++ wrapper)</title></entry></feed>