r/madeinpython • u/Handsome_sweettouu • 7d 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/Handsome_sweettouu • 7d ago
You can relate to this for growing python skills
r/madeinpython • u/jurassic_park_123 • 7d ago
r/madeinpython • u/Fast_Entrance7839 • 7d ago
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 • 7d ago
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:
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 • 7d ago
r/madeinpython • u/EventHorizon-dev • 8d ago
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:
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 • 8d ago
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:
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 • 8d ago
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.py turns 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.py calls 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.py and rank.py do 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.py and explain.py add a UniProt function line and a plain-English sentence per card.cache.py keeps three layers: in memory, /tmp on the container, and Firestore for raw Open Targets responses, so a cold Cloud Run instance (asia-south1, Docker) does not hammer the upstream API.corrections.json, approvals.json, withdrawals.json, left_out.json and 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
What is hard
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 • 9d ago
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 • 9d ago
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.
r/madeinpython • u/Emergency-Tutor-7 • 9d ago
Repo: https://github.com/Furox-Art/scientific-computing-system - 2.2.23, MIT, Python 3.11+, zero runtime dependencies.
Everything in it is standard library. src/cds/ holds 34 subpackages plus causal.py and sensitivity.py - 35 feature modules, with the CLI entry point as the 36th - exporting 507 names total (343 functions, 164 classes). tests/test_readme_surface.py derives those counts from the package, so the README cannot drift without a test failing.
The CLI is the part that makes it usable without opening an editor. cds calc ke for a kinetic-energy calculation, cds stats 1,2,3,4 for descriptive statistics, cds sample normal, cds integrate, cds plot (ASCII by default, PNG with the [plot] extra), cds modules and cds info for the catalog and health summary, cds benchmark, and cds dashboard for a Streamlit dashboard behind the [dashboard] extra.
Underneath: SVD/QR/Cholesky/LU, ODE and PDE solvers (Euler through adaptive RK45, implicit stiff methods, symplectic integrators, 1-D heat and wave), quadrature from trapezoid to Gauss-Legendre, optimization from Newton to Nelder-Mead, statistics/probability/conjugate Bayes, Monte Carlo, and an educational ML module.
Install:
pip install scientific-computing-systemLatest commit is a good example of the numerical care: the ODE solvers now stop when a time step cannot advance, instead of continuing with a step that cannot progress.
One honest limit: pure standard library puts the speed ceiling at Python's, and the ML module says itself that it is educational rather than production. When you need compiled numerics the same API exists as scientific-computing-system-2.0 on NumPy/SciPy.
r/madeinpython • u/Schnidi01 • 10d ago
Every one of us knows pipdeptree, poetry show --tree, or pip list.
Here is the tree of one virtual environment. At first glance, an ordinary GUI, but when you look at the data and relationships from the perspective of how Python and site-packages work, there are immediately 5 things that an ordinary Python tool cannot, by principle, display or would mark as an error.
Hints – focus on:
- The item moj_test_balicek and its occurrence in the tree vs. the right panel.
- How requests and its buddy PySocks are recorded and broken down in the tree.
- What the "Linker" category is doing in the package tree? (Since when does Python have a linker?)
- What the mysterious "Kept alive by (Owners)" in the package detail means?
- Look at the root categories above – how can the system know what was installed manually, what via a manifest, and what is an "Orphan"?
Just for fun, who among you will decipher what architecture is running under the hood of this graph and why it is not an ordinary pip output? Write your theories in the comments!
r/madeinpython • u/Emergency-Tutor-7 • 10d ago
Repo: https://github.com/Furox-Art/polyglot-code-guard - 0.5.1, the command is polyguard verify.
One opinion, implemented carefully: exit code 0 is not evidence that tests ran. Polyguard detects the project type, runs the build and test plan, and only prints PASS when it can find positive test-execution evidence in the runner's own output - pytest's passed line, cargo test result blocks, Go test events in the JSON stream, JUnit/Surefire/TRX counters, Swift Testing or XCTest summaries, per-test CTest Passed records.
0.5.1 tightened three things that used to be soft: an all-skipped or zero-test run cannot produce PASS, ambiguous runner evidence now fails closed instead of inferring that tests ran, and C/C++ plans on MSVC multi-config generators pass an explicit --config Debug / ctest -C Debug so CTest reports real verdicts instead of "Not Run". Timeouts kill the process tree so runner children do not survive the check, and captured output is capped at the final 256 KiB per command.
Eleven language identifiers are supported, and monorepos are discovered recursively with Maven modules, Gradle includes, Cargo workspaces, npm workspaces or a .sln delegated to the native workspace command once rather than being run twice.
Install:
python -m pip install --upgrade polyglot-code-guardOne honest limit: PASS means the built-in plan succeeded and genuine test-pass evidence was recognised, not that the code is correct or well covered. Because it executes your build scripts and package managers, an untrusted repository belongs in a disposable container - polyguard provides no OS isolation of its own.
r/madeinpython • u/Sea-Boysenberry-6984 • 10d ago
Hi everyone — I’m building pydantic-views, an open-source Python library for deriving operation-specific schemas from a single Pydantic model.
The goal is to avoid duplicating models for common API workflows such as:
Example:
from pydantic import BaseModel
from pydantic_views import CreatePreset, LoadPreset, View, ReadOnly, WriteOnly
class Account(BaseModel):
id: Annotated[int, ReadOnly]
username: str
password: Annotated[str, WriteOnly]
class AccountCreate(View[Account], preset=CreatePreset):
pass
class AccountLoad(View[Account], preset=LoadPreset):
pass
The views inherit Pydantic validation and serialization while selecting fields according to access rules. They can be declared explicitly or generated dynamically with builders. Add this after the example:
If you’re coming from TypeScript, PartialPreset is roughly the equivalent of Partial<T>:
pass
Unlike a plain type transformation, the generated view remains a validated Pydantic model and can be used for partial updates. But you
should look at UpdatePreset, I think is more useful.
The project also includes:
.pyi stub generation for Pyright and Pylanceis_view_of()Install it with:
pip install pydantic-views
Links:
It’s an independent project and is not affiliated with or endorsed by Pydantic. Feedback, use cases, and suggestions are very welcome.
r/madeinpython • u/Key-Spray-7616 • 10d ago
r/madeinpython • u/Emergency-Tutor-7 • 10d ago
Repo: https://github.com/Furox-Art/plan-auditor - 2.6.5, MIT, no required runtime dependencies.
It exists for one failure: an agent says "done" in confident prose, and nothing in the transcript proves it. Here you write a plan whose requirements are declarable, and each step has to end with a recorded verification - a file check or a command with its real output. The evidence record is HMAC-chained, so a later edit shows up as an edit, and a requirement that cannot be reduced to a deterministic check is handed to a human instead of guessed.
It installs three console scripts: plan-auditor, plan-auditor-migrate-seal and plan-auditor-formal. The gate is also usable directly:
pip install plan-auditor
python hooks/gate_hook.py .hooks/gate_hook.py is the single authoritative gate; scripts/stop_gate.py is the Claude Code side and delegates to it. The repo's own CI runs the README quick start and compares the transcript to real output, hashes included, so the example cannot drift.
One honest limit: it is not an OS sandbox - agent and verifier run as the same OS user - the evidence is tamper-evident rather than tamper-proof since HMAC is only as strong as the key staying secret, and domain meaning that resists a deterministic check stays a human decision.
r/madeinpython • u/Emergency-Tutor-7 • 10d ago
Repo: https://github.com/Furox-Art/eq-layer - 0.2.6.
"Be more empathetic" is a style instruction, and the failure is structural: you get the same flat warmth for a mild annoyance and for someone escalating. This library replaces the instruction with states.
Per turn it keeps an affect state - valence, arousal, escalation_delta, stance, subtext - so a trend exists as data instead of being re-guessed from each message. An intent classifier keeps the whole posterior over six intents instead of one number, and a one-step Bayes-risk router decides from that distribution whether to act or ask. The two states pick one policy family (mirror, validate_redirect, direct, ask, deflate, repair, hold, boundary), which is then split into orthogonal controls - task_move, social_move, repair_move, realization - so a tone change can't silently drop the actual request. The factored action compiles into a system instruction and prompt prefix.
There is a structural audit after generation too: question budget, required clarification, unsupported privacy promises, repeated repair, low-verbosity overrun. It checks the contract, not facts.
Install:
pip install "eq-layer[ml]"
npm install -g eq-layerOne honest limit: the core claim is untested. No real-model A/B run has been rated, the pre-registered protocol in eval/AB_PROTOCOL.md is pending with zero adjudicated labels, and the steering stays at prompt level - the logit_bias field is a placeholder that is never populated or applied.
r/madeinpython • u/creating-ai-projects • 11d ago
Developers selling their own products struggle to turn prospect research into a relevant proposal. So I built VentureOS, a swarm of agents that prepares a sourced sales brief, a one-page proposal and an idea for what to build.
It checks that quoted evidence appears in the collected sources and asks for review when important context is missing, rather than silently filling the gaps. The source is free under MIT, live services cost money, and the recommendations still need your judgment.
Looking to any feedback, and if you like it, please star the project:
GitHub: https://github.com/efolley/Venture-OS
X post: https://x.com/_efolley/status/2124259294807797909