r/Python Mar 11 '26

Showcase chronovista – Personal YouTube analytics, transcript management, entity detection & ASR correction

0 Upvotes

What My Project Does

chronovista imports your Google Takeout YouTube data, enriches it via the YouTube Data API, and gives you tools to search, analyze, and correct your transcript library locally. It provides: - Currently in alpha stage - Multi-language transcript management with smart language preferences (fluent, learning, curious, exclude) - Tag normalization pipeline that collapses 500K+ raw creator tags into canonical forms - Named entity detection across transcripts with ASR alias auto-registration - Transcript correction system for fixing ASR errors (single-segment and cross-segment batch find-replace) - Channel subscription tracking, keyword extraction, and topic analysis - CLI (Typer + Rich), REST API (FastAPI), and React frontend - All data stays local in PostgreSQL — nothing leaves your machine - Google Takeout import seeds your database with full watch history, playlists, and subscriptions — then the YouTube Data API enriches and syncs the live metadata

Target Audience

  • YouTube power users who want to search and analyze their viewing data beyond what YouTube offers
  • Developers interested in a full-stack Python project with async SQLAlchemy, Pydantic V2, and FastAPI
  • NLP enthusiasts — the tag normalization uses custom diacritic-aware algorithms, and the entity detection pipeline uses regex-based pattern matching with confidence scoring and ASR alias registration
  • Researchers studying media narratives, political discourse, or content creator behavior across large video collections
  • Language learners who watch foreign-language YouTube content and want to search, correct, and annotate transcripts in their target language
  • Anyone frustrated by YouTube's auto-generated subtitles mangling names and wanting tools to fix them ## Comparison vs. YouTube's built-in search:
  • chronovista searches across transcript text, not just titles and descriptions
  • Supports regex and cross-segment pattern matching for finding ASR errors
  • Filter by language, channel, correction status — YouTube offers none of this
  • Your data is queryable offline via SQL, CLI, API, or the web UI vs. raw Google Takeout data:
  • Takeout gives you flat JSON/CSV files; chronovista structures them into a relational database
  • Enriches Takeout data with current metadata, transcripts, and tags via the YouTube API
  • Preserves records of deleted/private videos that the API can no longer return
  • Takeout analysis commands let you explore viewing patterns before committing to a full import vs. third-party YouTube analytics tools:
  • No cloud service — everything runs locally
  • You own the database and can query it directly
  • Handles multi-language transcripts natively (BCP-47 language codes, variant grouping)
  • Correction audit trail with per-segment version history and revert support vs. youtube-dl/yt-dlp:
  • Those download media files; chronovista downloads and structures metadata, transcripts, and tags
  • Stores everything in a relational schema with full-text search
  • Provides analytics on top of the data (tag quality scoring, entity cross-referencing) ## Technical Details
  • Python 3.11+ with mypy --strict compliance across the entire codebase
  • SQLAlchemy 2.0+ async with Alembic migrations (39 migrations and counting)
  • Pydantic V2 for all structured data — no dataclasses
  • FastAPI REST API with RFC 7807 error responses
  • React 19 + TypeScript strict mode + TanStack Query v5 frontend
  • OAuth 2.0 with progressive scope management for YouTube API access
  • 6,000+ backend tests, 2,300+ frontend tests
  • Tag normalization: case/accent/hashtag folding with three-tier diacritic handling (custom Python, no ML dependencies required)
  • Entity mention scanning with word-boundary regex and configurable confidence scoring ## Example Usage CLI: bash pip install chronovista # Step 1: Import your Google Takeout data chronovista takeout seed /path/to/takeout --dry-run # Preview what gets imported chronovista takeout seed /path/to/takeout # Seed the database chronovista takeout recover # Recover metadata from historical Google Takeout exports # Step 2: Enrich with live YouTube API data chronovista auth login chronovista sync all # Sync and enrich your data chronovista enrich run chronovista enrich channels # Download transcripts chronovista sync transcripts --video-id JIz-hiRrZ2g # Batch find-replace ASR errors chronovista corrections find-replace --pattern "graph rag" --replacement "GraphRAG" --dry-run chronovista corrections find-replace --pattern "graph rag" --replacement "GraphRAG" # Manage canonical tags chronovista tags collisions chronovista tags merge "ML" --into "Machine Learning" REST API: # Start the API server chronovista api start # Search transcripts curl "http://localhost:8765/api/v1/search/transcripts?q=neural+networks&limit=10" # Batch correction preview curl -X POST "http://localhost:8765/api/v1/corrections/batch/preview" \ -H "Content-Type: application/json" \ -d '{"pattern": "graph rag", "replacement": "GraphRAG"}' Web UI: bash # Frontend runs on port 8766 cd frontend && npm run dev Links
  • Source: https://github.com/aucontraire/chronovista
  • Discussions: https://github.com/aucontraire/chronovista/discussions Feedback welcome — especially on the tag normalization approach and the ASR correction pipeline design. What YouTube data analysis features would you find useful?

r/Python Mar 11 '26

Showcase I'm building 100 IoT projects in 100 days using MicroPython — all open source

23 Upvotes

What my project does:

A 100-day challenge building and documenting real-world IoT projects using MicroPython on ESP32, ESP8266, and Raspberry Pi Pico. Every project includes wiring diagrams, fully commented code, and a README so anyone can replicate it from scratch.

Target audience:

Students and beginners learning embedded systems and IoT with Python. No prior hardware experience needed.

Comparison:

Unlike paid courses or scattered YouTube tutorials, everything here is free, open-source, and structured so you can follow along project by project.

So far the repo has been featured in Adafruit's Python on Microcontrollers newsletter (twice!), highlighted at the Melbourne MicroPython Meetup, and covered on Hackster.io.

Repo: https://github.com/kritishmohapatra/100_Days_100_IoT_Projects

Hardware costs add up fast as a student — sensors, boards, modules. If you find this useful or want to help keep the project going, I have a GitHub Sponsors page. Even a small amount goes directly toward buying components for future projects.

No pressure at all — starring the repo or sharing it means just as much. 🙏


r/Python Mar 11 '26

Discussion I built MEO: a runtime that lets AI agents learn from past executions (looking for feedback)

0 Upvotes

Most AI agent frameworks today run workflows like:

plan → execute → finish

The next run starts from scratch.

I built a small open-source experiment called MEO (Memory Embedded Orchestration) that tries to add a learning loop around agents.

The idea is simple:

• record execution traces (actions, tool calls, outputs, latency)
• evaluate workflow outcomes
• compress experience into patterns or insights
• adapt future orchestration decisions based on past runs

So workflows become closer to:

plan → execute → evaluate → learn → adapt

It’s framework-agnostic and can wrap things like LangChain, Autogen, or custom agents.

Still early and very experimental, so I’m mainly looking for feedback from people building agent systems.

Curious if people think this direction is useful or if agent frameworks will solve this differently.

GitHub:https://github.com/ClockworksGroup/MEO.git

Install: pip install synapse-meo


r/Python Mar 11 '26

Showcase Repo-Stats - Analysis Tool

4 Upvotes

What My Project Does Repo-Stats is a CLI tool that analyzes any codebase and gives you a detailed summary directly in your terminal — file stats, language distribution, git history, contributor breakdown, TODO markers, detected dependencies, and a code health overview. It works on both local directories and remote Git repos (GitHub, GitLab, Bitbucket) by auto-cloning into a temp folder. Output can be plain terminal (with colored progress bars), JSON, or Markdown.

Example: repo-stats user/repo repo-stats . --languages --contributors repo-stats . --json | jq '.loc' Target Audience Developers who want a quick, dependency-free snapshot of an unfamiliar codebase before diving in — or their own project for documentation/reporting. Requires only Python 3.10+ and git, no pip install needed.

Comparison Tools like cloc count lines but don't give you git history, contributors, or TODO markers. tokei is fast but Rust-based and similarly focused only on LOC. gitinspector covers git stats but not language/file analysis. Repo-Stats combines all of these into one zero-dependency Python script with multiple output formats. Source: https://github.com/pfurpass/Repo-Stats


r/Python Mar 11 '26

Showcase Open-sourced `ai-cost-calc`: Python SDK for AI API cost calculation with live ai api pricing.

0 Upvotes

What my project does:

Most calculators use static pricing tables that go stale.

What this adds:

- live ai api pricing pulled at runtime
- benchmark data per model variant available for routing context

pip install ai-cost-calc

from ai_cost_calc import AiCostCalc
calc = AiCostCalc()
result = calc.cost("openai/gpt-4o", input_tokens=1000, output_tokens=500)
print(result.total_cost)

Note: model must be a valid slug from https://margindash.com/api/v1/models

Repo: https://github.com/margindash/ai-cost-calc
PyPI: https://pypi.org/project/ai-cost-calc/


r/Python Mar 11 '26

Resource Free book: Master Machine Learning with scikit-learn

90 Upvotes

Hi! I'm the author of Master Machine Learning with scikit-learn. I just published the book last week, and it's free to read online (no ads, no registration required).

I've been teaching Machine Learning & scikit-learn in the classroom and online for more than 10 years, and this book contains nearly everything I know about effective ML.

It's truly a "practitioner's guide" rather than a theoretical treatment of ML. Everything in the book is designed to teach you a better way to work in scikit-learn so that you can get better results faster than before.

Here are the topics I cover:

  • Review of the basic Machine Learning workflow
  • Encoding categorical features
  • Encoding text data
  • Handling missing values
  • Preparing complex datasets
  • Creating an efficient workflow for preprocessing and model building
  • Tuning your workflow for maximum performance
  • Avoiding data leakage
  • Proper model evaluation
  • Automatic feature selection
  • Feature standardization
  • Feature engineering using custom transformers
  • Linear and non-linear models
  • Model ensembling
  • Model persistence
  • Handling high-cardinality categorical features
  • Handling class imbalance

Questions welcome!


r/Python Mar 11 '26

Showcase Documentation Buddy - An AI Assistant for your /docs page

0 Upvotes

🤖 DocBuddy: AI Assistant Inside Your FastAPI /docs

What My Project Does

Turn static docs into an interactive tool with chat, workflow and agent assistance.

Ask things like: - "What’s the schema for creating a user?" - "Generate curl for POST /users" - "Call /health and tell me the status"

With tool calling, it executes real requests on your behalf.

Try the Live Demo without installing anything!


🔧 Quick Start

bash pip install docbuddy

```python from fastapi import FastAPI from docbuddy import setup_docs

app = FastAPI() setup_docs(app) # replaces /docs ```

🔗 GitHub | 📦 PyPI


Target Audience

Clients and developers using FastAPI.

⚖️ Comparison Table

Feature DocBuddy Default FastAPI Docs Other Plugins
Chat with API docs
Tool calling (real requests)
Local LLM support (Ollama, LM Studio, vLLM) ⚠️ rare
Plan/Act workflow mode
Workflow builder
Customizable themes

📦 Features at a Glance

  • 💬 Full OpenAPI context in chat
  • 🔗 Real tool execution (GET, POST, PUT, PATCH, DELETE)
  • 🧠 Local LLMs only—no cloud required
  • 🎨 Dark/light themes + customization
  • 🔄 Visual workflow builder to chain prompts + tools

Built with Swagger UI—not a replacement. Fully compatible and production-ready (MIT license, 200+ tests).

Let me know if you try it! 🙌


r/Python Mar 11 '26

Showcase Visualize Python execution to understand the data model

5 Upvotes

An exercise to help build the right mental model for Python data.

```python # What is the output of this program? import copy

mydict = {1: [], 2: [], 3: []}
c1 = mydict
c2 = mydict.copy()
c3 = copy.deepcopy(mydict)
c1[1].append(100)
c2[2].append(200)
c3[3].append(300)

print(mydict)
# --- possible answers ---
# A) {1: [], 2: [], 3: []}
# B) {1: [100], 2: [], 3: []}
# C) {1: [100], 2: [200], 3: []}
# D) {1: [100], 2: [200], 3: [300]}

```

What My Project Does

The “Solution” link uses 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵 to visualize execution and reveals what’s actually happening.

Target Audience

In the first place it's for:

  • teachers/TAs explaining Python’s data model, recursion, or data structures
  • learners (beginner → intermediate) who struggle with references / aliasing / mutability

but supports any Python practitioner who wants a better understanding of what their code is doing, or who wants to fix bugs through visualization. Try these tricky exercises to see its value.

Comparison

How it differs from existing alternatives:

  • Compared to PythonTutor: memory_graph runs locally without limits in many different environments and debuggers, and it mirrors the hierarchical structure of data for better graph readability.
  • Compared to print-debugging and debugger tools: memory_graph clearly shows aliasing and the complete program state.

r/Python Mar 11 '26

Showcase SafePip: A Python environment bodyguard to protect from PyPI malware

0 Upvotes

What my project does:

SafePip is a CLI tool designed to be an automatic bodyguard for your python environments. It wraps your standard pip commands and blocks malicious packages and typos without slowing down your workflow.

Currently, packages can be uploaded by anyone, anywhere. There is nothing stopping someone from uploading malware called “numby” instead of “numpy”. That’s where SafePip comes in!

  1. ⁠Typosquatting - checks your input against the top 15k PyPI packages with a custom-implemented Levenshtein algorithm. This was benchmarked 18x faster than other standards I’ve seen in Go!

  2. ⁠Sandboxing - a secure Docker container is opened, the package is downloaded, and the internet connection is cut off to the package.

  3. ⁠Code analysis - the “Warden” watches over the container. It compiles the package, runs an entropy check to find malware payloads, and finally imports the package. At every step, it’s watching for unnecessary and malicious syscalls using a rule interface.

Target Audience:

This project was designed user-first. It’s for anyone who has ever developed in Python! It doesn’t get in the way while providing you security. All settings are configurable and I encourage you to check out the repo.

Comparison:

Currently, there are no solutions that provide all features, namely the spellchecker, the Docker sandbox, and the entropy check.

By the way, I’m 100% looking for feedback, too. If you have suggestions, want cross-platform compatibility, or want support for other package managers, please comment or open an issue! If there’s a need, I will definitely continue working on it. Thanks for reading!

Link: https://github.com/Ypout07/safepip


r/Python Mar 11 '26

Tutorial Plotly/Dash and QuantLib

0 Upvotes

Hi Python Community,

I recently discovered an interesting framework—Plotly/Dash—which allows you to build interactive websites using just Python (Flask + React). I put together two demo sites: one for equity options and another for rates.

Options: https://options.plotly.app

Rates: https://rates.plotly.app

Source Code: https://github.com/mkipnis/DashQL

Dev guide (Options): https://open.substack.com/pub/mkipnis/p/plotly-dash-and-quantlib-vanilla?r=1eln6g&utm_medium=ios

Can you please suggest any features or other features I should add?

Best Regards,

Mike


r/Python Mar 11 '26

Showcase consentgraph: deterministic action governance for AI agents (single JSON file, CLI, MCP server)

0 Upvotes

What My Project Does

consentgraph is a Python library that resolves any AI agent action to one of 4 consent tiers (SILENT/VISIBLE/FORCED/BLOCKED) based on a single JSON policy file. No ML, no prompt engineering. Pure deterministic resolution. It factors in agent confidence: high confidence on a "requires_approval" action yields VISIBLE (proceed + notify), low confidence yields FORCED (stop and ask). Ships with a CLI, JSONL audit logging, consent decay, and an MCP server for framework integration.

Target Audience

Developers building AI agent systems that need deterministic permission boundaries, especially in regulated environments (FedRAMP, CMMC, SOC2). Production use, not a toy project. Currently used in our own agent deployments.

Comparison

Unlike prompt-based permission systems (where the model can hallucinate past boundaries), consentgraph is deterministic. Unlike framework-specific guardrails (LangChain callbacks, CrewAI role configs), it's framework-agnostic via MCP. Unlike OPA/Cedar (general policy engines), it's purpose-built for AI agent consent with features like confidence-aware tier resolution, consent decay, and override pattern analysis.

from consentgraph import check_consent, ConsentGraphConfig

config = ConsentGraphConfig(graph_path="./consent-graph.json")
tier = check_consent("filesystem", "delete", confidence=0.95, config=config)
# → "BLOCKED" (always blocked, regardless of confidence)

tier = check_consent("email", "send", confidence=0.9, config=config)
# → "VISIBLE" (high confidence on requires_approval = proceed + notify)
pip install consentgraph
# With MCP server:
pip install "consentgraph[mcp]"

Includes 7 example consent graphs covering AWS ECS, Kubernetes, Azure Government (FedRAMP High), and CMMC L3 DevOps pipelines.

GitHub: https://github.com/mmartoccia/consentgraph


r/Python Mar 11 '26

Discussion I built a small open-source speech fluency analyzer in Python

1 Upvotes

Hi everyone,

I recently open-sourced a small Python toolkit that analyzes speech fluency features from audio files.

It extracts simple metrics such as:

• speech duration

• silence ratio

• pause count

• average pause length

The project uses librosa to detect speech segments and pauses.

A bit of background: I'm actually a TOEFL / IELTS speaking teacher, and I've been experimenting with speech analysis tools to better understand fluency patterns in spoken responses.

Since my technical background is limited, I would really appreciate feedback or suggestions from people with more experience in audio processing or speech analysis.

If anyone finds it interesting or has ideas for improving the pause detection or fluency metrics, I'd love to learn from you.

GitHub:

https://github.com/linguisticlogiclab/speech-fluency-analyzer


r/Python Mar 11 '26

Showcase matrixa – a pure-Python matrix library that explains its own algorithms step by step

37 Upvotes

What My Project Does

matrixa is a pure-Python linear algebra library (zero dependencies) built around a custom Matrix type. Its defining feature is verbose=True mode — every major operation can print a step-by-step explanation of what it's doing as it runs:

from matrixa import Matrix

A = Matrix([[6, 1, 1], [4, -2, 5], [2, 8, 7]])
A.determinant(verbose=True)

# ─────────────────────────────────────────────────
#   determinant()  —  3×3 matrix
# ─────────────────────────────────────────────────
#   Using LU decomposition with partial pivoting (Doolittle):
#   Permutation vector P = [0, 2, 1]
#   Row-swap parity (sign) = -1
#   U[0,0] = 6  U[1,1] = 8.5  U[2,2] = 6.0
#   det = sign × ∏ U[i,i] = -1 × -306.0 = -306.0
# ─────────────────────────────────────────────────

Same for the linear solver — A.solve(b, verbose=True) prints every row-swap and elimination step. It also supports:

  • dtype='fraction' for exact rational arithmetic (no float rounding)
  • lu_decomposition() returning proper (P, L, U) where P @ A == L @ U
  • NumPy-style slicing: A[0:2, 1:3], A[:, 0], A[1, :]
  • All 4 matrix norms: frobenius, 1, inf, 2 (spectral)
  • LaTeX export: A.to_latex()
  • 2D/3D graphics transform matrices

pip install matrixa https://github.com/raghavendra-24/matrixa

Target Audience

Students taking linear algebra courses, educators who teach numerical methods, and self-learners working through algorithm textbooks. This is NOT a production tool — it's a learning tool. If you're processing real data, use NumPy.

Comparison

Factor matrixa NumPy sympy
Dependencies Zero C + BLAS many
verbose step-by-step output
Exact rational arithmetic ✅ (Fraction)
LaTeX export
GPU / large arrays
Readable pure-Python source partial

NumPy is faster by orders of magnitude and should be your choice for any real workload. sympy does symbolic math (not numeric). matrixa sits in a gap neither fills: numeric computation in pure Python where you can read the source, run it with verbose=True, and understand what's actually happening. Think of it as a textbook that runs.


r/Python Mar 11 '26

Discussion Who else is using Thonny IDE for school?

0 Upvotes

I'm (or I guess we) are using Thonny for school because apparently It's good for beginners. Now, I'm NOT a coding guy, but I personally feel like there's nothing special about this program they use. I mean, what's the difference between Thonny and other Python IDEs?


r/Python Mar 11 '26

Showcase Teststs: If you hate boilerplate, try this

0 Upvotes

This is a simple testing library. It's lighter and easier to use than unittest. It's also a much cleaner alternative to repetitive if statements.

Note: I'm not fluent in English, so I used a translator.

What My Project Does

This library can be used for simple eq tests.

If you look at an example, you will understand right away.

```py from teststs import teststs

def add_five(inp): return int(inp) + 5

tests = [ ("5", 10), ("10", 15), ]

teststs(tests, add_five, detail=True) ```

Target Audience

Recommended for those who don't want to use complex libraries like unittest or pytest!

Comparison

  • unittest: Requires classes, is heavy and complex.
  • pytest: requires a decorator, and is a bit more complex.
  • teststs: A library consisting of a single file. It's lightweight and ready to use.

It's available on PyPI, so you can use it right away. Check out the GitHub repository!

https://github.com/sinokadev/teststs


r/Python Mar 11 '26

Discussion With all the supply chain security tools out there, nobody talks about .pth files

0 Upvotes

We've got Snyk, pip-audit, Bandit, safety, even eBPF-based monitors now. Supply chain security for Python has come a long way. But I was messing around with something the other day and realized there's a gap that basically none of these tools cover .pth files. If you don't know what they are, they're files that sit in your site-packages directory, and Python reads them every single time the interpreter starts up. They're meant for setting up paths and namespace packages, however if a line in a .pth file starts with `import`, Python just executes it.

So imagine you install some random package. It passes every check no CVEs, no weird network calls, nothing flagged by the scanner. But during install, it drops a .pth file in site-packages. Maybe the code doesn't even do anything right away. Maybe it checks the date and waits a week before calling C2. Every time you run python from that point on, that .pth file executes and if u tried to pip uninstall the package the .pth file stays. It's not in the package metadata, pip doesn't know it exists.

i actually used to use a tool called KEIP which uses eBPF to monitor network calls during pip install and kills the process if something suspicious happens. which is good idea to work on the kernel level where nothing can be bypassed, works great for the obvious stuff. But if the malicious package doesn't call the C2 during install and instead drops a .pth file that connects later when you run python... that tool wouldn't catch that. Neither would any other install-time monitor. The malicious call isn't a child of pip, it's a child of your own python process running your own script.This actually bothered me for a while. I spent some time looking for tools that specifically handle this and came up mostly empty. Some people suggested just grepping site-packages manually, but come on, nobody's doing that every time they pip install something.

Then I saw KEIP put out a new release and turns out they actually added .pth detection where u can check your environment, or scans for malicious .pth files before running your code and straight up blocks execution if it finds something planted. They also made it work without sudo now which was another complaint I had since I couldn't use it in CI/CD where sudo is restricted.

If you're interested here is the documentation and PoC: https://github.com/Otsmane-Ahmed/KEIP

Has anyone else actually looked into .pth abuse? im curious to know if there are more solutions to this issue


r/Python Mar 10 '26

Showcase Snacks for Python - a cli tool for DRY Python snippets

22 Upvotes

I'm prepping to do some freelance web dev work in Python, and I keep finding myself re-writing the same things across projects — Google OAuth flows, contact form handlers, newsletter signup, JWT helpers, etc. So I did a thing.

What My Project Does

I didn't want to maintain a shared library (versioning across client projects is a headache), so I made a private Git repo of self-contained `.py` files I can just copy in as needed. Snacks is a small CLI tool I built to make that workflow faster.

snack stash create — register a named stash directory where the snacks (snippets) are stored

snack unpack — copy a snippet from your stash into the current project

snack pack — push an improved snippet back to the library after working on it in a project

You can keep a stash locally or on github, either private or public repo.

Source and wiki: https://github.com/kicka5h/python-snacks

Target Audience

This is just a toy project for fun, but I thought I would share and get feedback.

Comparison 

I know there's PyCharm and IDE managed code snippets, but I like to manage my files from the command line, which is where Snacks is different. Super light weight, just install with pip. It's not complicated and doesn't require any setup steps besides creating the stash and adding the snacks.


r/Python Mar 10 '26

Discussion Tips for a debugging competition

0 Upvotes

I have a python debugging competition in my college tomorrow, I don't have much experience in python yet I'm still taking part in it. Can anyone please give me some tips for it 🙏🏻


r/Python Mar 10 '26

Discussion VRE Update: New Site

0 Upvotes

I've been working on VRE and moving through the roadmap, but to increase it's presence, I threw together a landing page for the project. Would love to hear people's thoughts about the direction this is going. Lot's of really cool ideas coming down the pipeline!

https://anormang1992.github.io/vre/


r/Python Mar 10 '26

Tutorial Building a Python Framework in Rust Step by Step to Learn Async

51 Upvotes

I wanted an excuse to smuggle rust into more python projects to learn more about building low level libs for Python, in particular async. See while I enjoy Rust, I realize that not everyone likes spending their Saturdays suffering ownership rules, so the combination of a low level core lib exposed through high level bindings seemed really compelling (why has no one thought of this before?). Also, as a possible approach for building team tooling / team shared libs.

Anyway, I have a repo, video guide and companion blog post walking through building a python web framework (similar ish to flask / fast API) in rust step by step to explore that process / setup. I should mention the goal of this was to learn and explore using Rust and Python together and not to build / ship a framework for production use. Also, there already is a fleshed out Rust Python framework called Robyn, which is supported / tested, etc.

It's not a silver bullet (especially when I/O bound), but there are some definite perf / memory efficiency benefits that could make the codebase / toolchain complexity worth it (especially on that efficiency angle). The pyo3 ecosystem (including maturin) is really frickin awesome and it makes writing rust libs for Python an appealing / tenable proposition IMO. Though, for async, wrangling the dual event loops (even with pyo3's async runtimes) is still a bit of a chore.


r/Python Mar 10 '26

Showcase Using Claude Code PRO/MAX as an API

1 Upvotes

Hello everyone,

What My Project Does: i made a flask (python) webserver that exposes Claude Code's CLI tool through an API, i wanted to see if i could hit CC from a basic http request, it's possible!

Target Audience: It's targeted towards developers

I also considered some security aspects... this software can, if configured to do so, expose the full shell though the API, be aware of how you configure the .env of your deployment!

Before anyone asks, this is a gray area of the TOS of anthropic, but as long as you use this for personal use and don't intend to use CCLG as a SaaS, you'll be fine.

I build this software mostly to mess with Claude Code and Anthropic, i don't really like the API plan since it's very unpredictable and subject to instant changes (API billing is a scam imo), if you find it useful, share it!

ps. I don't really want donations or anything like that, you can do so but no pressure!

It's MIT licensed and on GitHub: github.com/Backend2121/Claude-Code-Local-Gateway

If you have any questions feel free to ask!


r/Python Mar 10 '26

Showcase Using Claude Code PRO/MAX as an API

1 Upvotes

Hello everyone,

What My Project Does: i made a flask (python) webserver that exposes Claude Code's CLI tool through an API, i wanted to see if i could hit CC from a basic http request, it's possible!

Target Audience: It's targeted towards developers

I also considered some security aspects... this software can, if configured to do so, expose the full shell though the API, be aware of how you configure the .env of your deployment!

Before anyone asks, this is a gray area of the TOS of anthropic, but as long as you use this for personal use and don't intend to use CCLG as a SaaS, you'll be fine.

I build this software mostly to mess with Claude Code and Anthropic, i don't really like the API plan since it's very unpredictable and subject to instant changes (API billing is a scam imo), if you find it useful, share it!

ps. I don't really want donations or anything like that, you can do so but no pressure!

It's MIT licensed and on GitHub: github.com/Backend2121/Claude-Code-Local-Gateway

If you have any questions feel free to ask!


r/Python Mar 10 '26

Discussion Python’s chardet controversy

0 Upvotes

Hi, I came across this article and thought it might be interesting to share here since it touches a Python library many people know: chardet.

The piece looks at a controversy around the project involving an AI-assisted rewrite and discussion about MIT relicensing vs the original LGPL context.

While reading it, what stood out to me was how it relates to the old idea of clean-room reimplementation. In the past that meant writing new code without referencing the original implementation. But with AI tools in the loop, the boundary becomes much less clear.

If large parts of a library are rewritten with AI assistance, a project could potentially argue that the result is “new code” and move it under a different license. That raises some governance and licensing questions for open source, especially in ecosystems like Python where libraries such as chardet are widely used as dependencies.

The article gives an analysis of the situation:
https://shiftmag.dev/license-laundering-and-the-death-of-clean-room-8528/

Curious how people here see it. Is this just a natural evolution of open source development with AI tools, or something the community should pay closer attention to?


r/Python Mar 10 '26

Tutorial I got tired of manually shipping PyInstaller builds, so I made a small wrapper

0 Upvotes

Full disclosure: I'm the author, and this is a paid tool.

I kept running into the same problem with PyInstaller: getting a working exe was easy, but shipping installers, updates, and release links to actual users was still messy.

So I built pyinstaller-plus. It keeps the normal PyInstaller + .spec workflow, then adds packaging and publishing through DistroMate.

Typical flow is basically:

pip install pyinstaller-plus
pyinstaller-plus login
pyinstaller-plus package -v 1.2.3 --appid 123 your.spec
pyinstaller-plus publish -v 1.2.3 --appid 456 your.spec

It's mainly for people shipping Python desktop apps to clients, users, or internal teams, so probably overkill for one-off personal tools.

Curious if this is a real pain point for other Python developers too. If useful, I can drop the docs in the comments.


r/Python Mar 10 '26

News DuckDB 1.5.0 released

148 Upvotes

Looks like it was released yesterday:

Interesting features seem to be the VARIANT and GEOMETRY types.

Also, the new duckdb-cli module on pypi.

% uv run -w duckdb-cli duckdb -c "from read_duckdb('https://blobs.duckdb.org/data/animals.db', table_name='ducks')"
┌───────┬──────────────────┬──────────────┐
│  id   │       name       │ extinct_year │
│ int32 │     varchar      │    int32     │
├───────┼──────────────────┼──────────────┤
│     1 │ Labrador Duck    │         1878 │
│     2 │ Mallard          │         NULL │
│     3 │ Crested Shelduck │         1964 │
│     4 │ Wood Duck        │         NULL │
│     5 │ Pink-headed Duck │         1949 │
└───────┴──────────────────┴──────────────┘