r/madeinpython • u/Creepy_Sherbert_1179 • 2h ago
r/madeinpython • u/vm324234 • 4h ago
Agentic GraphRAG: 3D knowledge graphs as the context layer + memory for agents
We've worked on systems for context retrieval for the past three and a half years. Now we're building Agentic GraphRAG, an open source framework that stores enterprise knowledge and agent memory in a unified knowledge graph.
Everyone treats knowledge retrieval and memory as separate problems. Putting them together lets the agent learn from the existing knowledge, saving tons of tokens.
We build a 3D connected knowledge graph with the following structure:
- Enterprise Knowledge: stores documents and source passages with their extracted entities and relationships.
- Conversation History: records tasks, progress, messages, and tool activity.
- Decision traces: stores conclusions, assumptions, and open questions encountered by the agent.
Things which make us different from other frameworks out there:
- Ontology Grounded: You define a schema for your domain (we also ship ontology presets so it is easy to get started). The schema guides extraction, validation, and agent search. We use GLiNER for local extraction, so its virtually free (and fast) to construct the graph and no LLM calls are needed.
- Structure Aware: The ingestion pipeline captures the full document hierarchy. The sections, tables, and passage hierarchy are connected using edges and stored in the graph. Even chunks are linked together, so all the data is traversable.
- Robust Agent Search: Retrieval combines graph, full-text and vector search. Agents can reach original passages by traversing the document tree, navigate agent traces to find relevant tool results and follow entity relationships back to supporting text.
We offer a built-in agent you can use out of the box. You can also connect your agents through MCP.
We will be releasing extensive benchmarks very soon.
Try it out. We're looking for feedback, questions and criticism. We have a lot of new features and improvements in the pipeline and are excited to work on this problem.
r/madeinpython • u/scapaflow96 • 11h ago
Fire till it glows!
Check out the full game: Rain, snow, shine, or disappearing in a cloud of powder. : r/hobbygamedev
r/madeinpython • u/EventHorizon-dev • 11h ago
I built AlphaEngine: A quantitative portfolio optimization and financial analysis web app in Python
I wanted to share a project I've been developing: AlphaEngine, an interactive web application built with Python and Flask that computes optimal asset allocations using Modern Portfolio Theory (MPT).
Instead of manually guessing asset weights, the app fetches real-time market data, calculates daily and annual returns, and uses mathematical optimization to find the minimum-variance portfolio configuration.
Key features:
- Real-Time Data Integration: Automatically pulls historical close prices using the Yahoo Finance API (
yfinance). - Mathematical Optimization: Leverages SciPy's
SLSQPalgorithm to minimize portfolio variance subject to asset weight constraints. - Interactive Dashboard: Features a clean web interface built with Flask, dynamic JavaScript input fields, and pre-filled popular stock tickers.
- Visual Analytics: Renders a responsive, customized donut chart using Plotly to visualize the ideal asset distribution.
I'll drop the GitHub repository link in the first comment below. I'd love to hear your feedback or thoughts on the implementation!
r/madeinpython • u/EventHorizon-dev • 12h ago
I built a handwritten AI calculator with real-time learning in Python
Hey everyone,
I wanted to share an AI project I've been working on: a handwritten math calculator powered by a Keras/TensorFlow neural network and a Tkinter drawing interface.
Unlike standard digit-only classifiers, this model recognizes both digits (0β9) and basic mathematical operators (+, -), allowing users to hand-draw expressions and compute results. It also features live incremental learning, so you can instantly correct the model if it misidentifies a symbol.
Key features:
- Multi-class recognition for digits and operators from 28x28 grayscale images.
- Interactive Tkinter drawing canvas with automatic color normalization (to match the MNIST format).
- Live on-device correction using
train_on_batch: clicking a correction button immediately updates the neural network's weights and saves the model. - Real-time equation building and evaluation.
I'll drop the link to the GitHub repository in the first comment below if anyone wants to check out the code or test it. I'd love to hear your feedback or ideas for new features!
r/madeinpython • u/MatteoGuadrini • 1d ago
π PSP (Python Scaffolding Projects) v0.11.0 Released!
π PSP (Python Scaffolding Projects) v0.11.0 Released!
We're excited to announce the release of PSP v0.11.0, packed with new features, improvements, and fixes to make your Python project scaffolding even faster and more powerful!
π₯ What's New in v0.11.0?
β¨ Added
- ProjectResult type β Better structured output for project generation results.
prj_aifunction β AI-assisted project scaffolding for smarter defaults.toml_editdependencies β Enhanced TOML file manipulation.read_tomlandwrite_tomlfunctions β Easier TOML file handling.PSP_AIenvironment variable β Control AI-assisted scaffolding behavior.
π§ Changed
- Updated
pyproject.tomlfor better compatibility. - Added
rewriteparameter torender_templatefor more flexible templating. - Added
pytestdependencies inprj_toxfor better test integration.
π Fixed
- Fixed GitLab CI name for proper remote repository support.
- Improved code style consistency.
π Why Use PSP?
PSP is the fastest way to scaffold Python projects, with:
β 1-100x faster than other tools
β AI-optimized templates (SKILLS.md, AGENTS.md, llms.txt)
β Full Python ecosystem support (pip, conda, uv, poetry, hatch, maturin)
β CI/CD integration (GitHub Actions, GitLab CI, CircleCI, TravisCI)
β Docker & Container support
β Pause/Resume project creation
β Customizable profiles for different project types
π₯ Installation
Get started in seconds:
# Quick install (Linux/MacOS)
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/MatteoGuadrini/psp/main/install.sh | bash
# Windows
iwr https://raw.githubusercontent.com/MatteoGuadrini/psp/main/install.ps1 | iexOr install via pip:
pip install psp-scaffold --upgradeπ Full Documentation
π https://psp.readthedocs.io/
π€ Contribute
PSP is open-source! Contributions are welcome: π GitHub Repository
r/madeinpython • u/OkNail7333 • 1d ago
HOCON for Python (oh ..., here we go again)
Hi all,
in my profession I am using HOCON format, but the native pyhocon has so many issues, and I wanted to try something new, so I started learning Zig. As initial project, I decided to implement HOCON for Zig. During the implementation it turned out the Zig is not issue, but HOCON with lacking official and checkable specification is.
My first part was to set into the stone what is HOCON actually, and created transferable Conformance suite.
Since Zig is wonderful language and allows very simple way of building sharable C libraries which can be easily ported to other languages I decided to prepare even Python package. This brings to the Python parsing immersive performance and great compatibility with HOCON specification better than what other python implementations provide..
Will be more than happy for feedback, and till you write me.
r/madeinpython • u/Handsome_sweettouu • 1d ago
Python's Hidden Traps! π± NumPy, Data Types & Floating Point Errors | Day 3 #iitian
You can relate to this for growing python skills
r/madeinpython • u/jurassic_park_123 • 1d ago
The python library "Beautiful Soup", from where did it gets that name from?
reddit.comr/madeinpython • u/Fast_Entrance7839 • 1d ago
my python flight search now builds google flights links by encoding the tfs protobuf by hand
i maintain viajante, a free open source flight search in python. until 1.7.0 the google flights links it returned opened the flights home page, so you had to type the search again.
now they go to /travel/flights/search?tfs=. the tfs value is a base64 protobuf message with the airports, dates, passengers, cabin and carry-on count.
there's no .proto file for it, so tfs.py writes the bytes itself. it has a varint writer, a length-delimited writer and a constant for each field number. 13 is the origin airport, 14 is the destination and 8 is passengers.
the field numbers came from probing google flights. checked bags are field 3, and google never echoed that filter back in the probes, so the encoder only writes the zero it saw.
r/madeinpython • u/autosur00 • 1d ago
Built a FastAPI service for B2B lead scoring and outreach generation with Pytest
Hey everyone β I put together autodev-dispatcher, a lightweight FastAPI service for scoring B2B leads and generating personalized outreach messages, backed by a Pytest test suite.
How it works:
- API & Schema Validation: FastAPI endpoints using Pydantic v2 models to validate incoming lead/context payloads and keep request/response shapes predictable.
- Scoring & Template Logic: Separated lead scoring and message/template generation from the HTTP route handlers so rules and templates can be adjusted cleanly.
- Testing: Pytest tests covering valid payloads, validation/error handling, and template/scoring behavior.
Repo:https://github.com/autosur00/autodev-dispatcher
Still iterating on how to keep template/prompt logic and test fixtures clean as the service growsβwould love any feedback or thoughts on how you structure similar FastAPI services.
r/madeinpython • u/Orbularium • 1d ago
7-state propagation + sparse $\mathbb{F}_7$ Exact-1 pre-processing for conflict auditing and causal traces
reddit.comr/madeinpython • u/kengeren • 2d ago
made a termux tool that checks your code for llama.cpp 1.0 breaking changes before you get burned by them
llama.cpp hit 1.0 a few days ago and quietly dropped a bunch of stuff people's scripts depend on, a few functions gone, a flag removed, a header that moved. went looking for something that'd just scan my code and tell me what's gonna break and couldn't find anything, so i built it instead.
its called llamadoctor, one python file, no deps, runs fine in termux since thats literally where i wrote the whole thing on my phone. point it at a folder and it tells you whats broken, severity sorted, links to the actual github PR for each one so your not just trusting some random script. if theres an easy mechanical fix it offers to do it for you, asks first obviously, and refuses to touch anything if your git tree is dirty unless you force it.
install is just(after cloning ofc.):
pip install -e .
llamadoctor yourfolder
repo's here if anyone wants to poke at it or tell me what i missed, pretty sure theres edge cases i haven't hit yet since i only had my own stuff and some test projects to throw at it
github.com/hunzo1/llamadoctor
r/madeinpython • u/Commercial_Lead5813 • 2d ago
Iβm learning Python by building a tiny character model from scratch
Iβm documenting my AI-learning journey by turning the lessons into one small Python project. This is the first milestone where everything from the earlier lessons connects into a runnable program.
It learns character-to-character patterns from a short text file, then samples those learned counts to generate a continuation. I used only Pythonβs standard library. The output can be awkward, which is useful to see: itβs a simple statistical model, not a neural network and not a finished chatbot.
The GitHub repository is linked above. Iβm also posting the lessons here: https://www.youtube.com/channel/UCWMERaecgKZmrqPUHLqWuow
Iβd appreciate feedback from people who remember learning Python: is the project layout understandable, and what would you improve next?
r/madeinpython • u/EventHorizon-dev • 2d ago
I built a lightning simulator in Python using Pygame!
Hey everyone!
I've been building a collection of physics and simulation projects lately, and I wanted to share my latest one: a real-time 2D Lightning Simulator built completely from scratch using Python and Pygame.
The main challenge was simulating realistic electrical discharge patterns and dynamic branching structures on a 2D canvas while keeping the rendering smooth.
What it does:
- Real-time procedural lightning generation with dynamic branching.
- Interactive controls to trigger electrical storms directly on the screen.
- Lightweight architecture built purely with Python and Pygame.
I'll drop the link to the GitHub repository in the comments if anyone wants to check out the source code or test it out. I'd love to get your feedback on the visual rendering or any ideas for new features!
r/madeinpython • u/EventHorizon-dev • 2d ago
I built a 2D N-body gravitational solar system and accretion disk simulator from scratch in Python
Hey everyone,
I wanted to share a physics simulation project I built using Python and Pygame: a real-time 2D N-body solar system and accretion disk simulator.
Instead of hardcoding circular orbits, the simulation models true gravitational interactions, collision mechanics, and particle accretion between thousands of bodies in real time.
Key features:
- Real-time N-body gravitational force calculations using Newton's law.
- Dynamic particle merging and accretion (smaller dust particles clump together into larger asteroids and planetoids while conserving momentum).
- Procedural nebula generation with randomized orbital speeds and chaos factors around a massive central sun.
- Lightweight and smooth rendering entirely built from scratch with Python and Pygame.
I'll drop the link to the GitHub repository in the comments below. Let me know what you think or what orbital mechanics features I should add next!
r/madeinpython • u/Snoo_74391 • 2d ago
Sorting rare-disease medicines into approved, in trials and worth-reading-about with plain Python rules over Open Targets data
In a lot of the world, a family facing a rare diagnosis has no easy way to see which medicines are licensed for it, which are in trials, and where those trials are. The records exist, but they sit in regulator labels, trial registries and research portals written for specialists. Moonlight is our attempt to put them on one page: type a condition, get medicine cards, each linked to the record it came from.
The reason we keep going: someone in Kochi, in southern India, living with limb-girdle muscular dystrophy, used it to find a trial recruiting in the US (they are happy for us to say so). If you already see a specialist at a big research hospital, this adds little. Where specialists are thin on the ground, it can be the first time someone sees the options laid out.
How it is put together
It is a small Python package, moonlight/, served by FastAPI and Uvicorn, with a single static HTML/JS page in front.
translate.pyturns an everyday or misspelt name into a disease Open Targets knows (MONDO, EFO or HP IDs). Gemini proposes up to three candidate names, each is looked up in Open Targets, and only Open Targets' own name and ID are used. Gemini's text is never shown, and the page only offers "Did you mean"; it never picks a disease for you.fetch.pycalls the Open Targets Platform GraphQL API for the disease's linked protein targets and the drugs acting on them. Open Targets is the only source of record; there is no private database behind it.filter.py,engine.pyandrank.pydo the sorting with ordinary rules, not a model: approved for this disease goes to Approved, in a trial for it goes to Being studied, approved for something else but acting on a linked protein goes to New clues, and unapproved compounds go to Left out. Salt forms collapse into one card, and the ranking is deterministic (linked-protein score, then number of reports, then alphabetical).protein.pyandexplain.pyadd a UniProt function line and a plain-English sentence per card.cache.pykeeps three layers: in memory,/tmpon the container, and Firestore for raw Open Targets responses, so a cold Cloud Run instance (asia-south1, Docker) does not hammer the upstream API.- Hand-checked fixes live in versioned JSON next to the code (
corrections.json,approvals.json,withdrawals.json,left_out.jsonand a few more), each pinned by a pytest test that runs against saved Open Targets fixtures, so a fix cannot quietly regress after an upstream release.
Where else AI comes in: never to decide what a card says. Offline batch scripts use model calls to read FDA, EMA, DailyMed and PMDA labels and flag cards whose "approved" status has no matching label. A human decides each fix. Corrections people post on Reddit become numbered tickets, get checked against a regulator label, and land in those JSON files with a test.
What has worked so far
- Besides the Kochi trial find, Open Targets confirmed seven wrong approval records we reported and has scheduled the fix for release 26.12 (thread 2105 on their community forum).
- 17 tickets so far have come straight from patient communities pointing out mistakes, and a 124-disease audit found 724 of 2,096 "approved" entries had no DailyMed, FDA or EMA report attached. Those cards are now marked as weakly proven rather than hidden.
What is hard
- One upstream source means its gaps are ours. Medicines licensed in the UK, EU or India but not by the FDA can show up as "in trials" only, and fixing that properly means pulling more regulators in.
- Label checking across thousands of drug-disease pairs costs model API money, which we pay ourselves. There are no ads and no data selling, and we want to keep it that way.
Live site: https://www.moonlightclues.com Code (MIT): https://github.com/Moonlight-Clues/moonlight. A star helps if you find it useful.
The ask: the thing that would move us fastest is AI model credits, or a pointer to a credit programme (or a person) that backs open-source public-interest work. Separately, if you have worked with regulator data in Python, especially CDSCO or EMA, I would be glad of advice on parsing it, or a pull request.
r/madeinpython • u/MrBucurN • 3d ago
my first cybersecurity project
yo this is my first project
its a python security tool that checks python files for risky stuff and scans project packages for known vulnerabilities then it puts the results in a report it doesnt run your code or change any packages
still working on it so let me know what you think
r/madeinpython • u/uralozden • 3d ago
I built a local, no-cloud highlight finder for long gameplay recordings and stream VODs (CLI + MCP, MIT)
Cloud clipping tools want you to upload hours of footage and pay per minute. I wanted something that runs on my own box, so I wrote highlight-detector.
What it does
Scans a video (anything FFmpeg reads) and ranks the most intense moments: loud spikes, gunfire/explosion-like hits, fast motion, scene cuts, flashes
Optional: your chat replay (TwitchDownloader JSON, CSV or plain text) and subtitles for hype words
Gives a reason for every pick, outputs JSON / CSV / YouTube chapters / EDL, and can cut the clips to MP4
MCP server included, so a local AI assistant can call it
Self-hosting details
Python 3.10+, NumPy, FFmpeg. No GPU, no API keys, no telemetry, nothing leaves your machine
Streams the decode, so a 10-hour VOD doesn't need 10 hours of RAM
14 min of 1080p: 41 s with video analysis, 1.4 s audio-only (4 vCPU VM)
Easy to cron over a recordings folder: highlight-detector "$f" -f chapters > "${f%.*}.chapters.txt"
Install: pipx install git+https://github.com/uralozden/highlight-detector
Repo: https://github.com/uralozden/highlight-detector
Limits: it measures intensity, not humour or meaning, and loud intro music can rank high. Feedback and per-game weight presets very welcome.