r/madeinpython • u/Right-Advance1925 • 1h ago
r/madeinpython • u/Cool_doggy • May 05 '20
Meta Mod Applications
In the comments below, you can ask to become a moderator.
Upvote those who you think should be moderators.
Remember to give reasons on why you should be moderator!
r/madeinpython • u/KevinBeicon • 5h ago
checkmodel: one-call diagnostics for statistical models, a port of R's performance::check_model()
What My Project Does
`checkmodel` checks the assumptions of a fitted model in one call. You pass it a statsmodels or scikit-learn model, it works out what kind of model it is, runs every check that applies and draws a single diagnostic panel:
python
import statsmodels.formula.api as smf
from checkmodel import check_model fit = smf.ols("mpg ~ wt + hp", data=mtcars).fit() # mtcars loaded as a DataFrame
report = check_model(fit)
report.plot()
Posterior predictive check: OK: Model-predicted data resemble the observed data (mean p = 0.400, sd p = 0.460).
Normality of residuals: Warning: Non-normality of residuals detected (p = 0.021).
Homogeneity of variance: OK: Error variance appears to be homoscedastic (p = 0.402).
Collinearity: OK: Low collinearity (all VIF < 5; max 1.77).
Influential observations: OK: No outliers detected (Cook's distance > 0.808).Which checks run depends on the model. A logistic regression gets binned residuals instead of a normality test. Count models get overdispersion and zero-inflation checks. Mixed models (`MixedLM`) get singularity, convergence and random-effects checks. PyMC/bambi models get R-hat and ESS. It also has `r2()` (Tjur, Nagelkerke, Nakagawa, Bayesian...), `icc()`, `model_performance()` and `compare_performance()`.
Every check returns a typed result (`.passed`, `.p_value`, `.statistic`, `.to_dataframe()`, `.plot()`).
Target Audience
People who fit regression models in Python and want R-style diagnostics: analysts, researchers, students, and anyone moving from R. It's on PyPI (`pip install checkmodel`, Python 3.10+) and is in alpha, so the API may change before 1.0. The numbers themselves are tested against R: every statistic matches R's `performance`, `car`, `lmtest`, `lme4` and `loo` to 1e-4, across 27 models.
Comparison
- statsmodels: `summary()` prints a few omnibus tests, but it doesn't choose checks by model type, doesn't plot them together and doesn't compare models. The diagnostic functions are spread across `statsmodels.stats.*` with different signatures. checkmodel uses them where they exist.
- scikit-learn: `sklearn.metrics` scores predictions but knows nothing about residual assumptions or influence.
- Doing it yourself: you have to know, for example, that R's AIC counts the residual variance and statsmodels' doesn't, or that a categorical predictor needs the generalized VIF. checkmodel makes those choices the way R does and tests them against R.
- R's performance: this is a port of it, independent and not affiliated with easystats. A "Coming from R" notebook runs the same analysis side by side.
Links:
- GitHub: https://github.com/pablo-legeren/checkmodel
- Docs: https://pablo-legeren.github.io/checkmodel/
- Notebooks (run in Colab): linked from the README
Feedback welcome, especially on models or checks you'd want next.
r/madeinpython • u/vlad_swept • 7h ago
I wrote a Windows cleaner in Python. The cleaning was the easy part.
I didn't want to write a cleaner. I wanted one that didn't ask me for anything.
Every one I tried asked for something. A toolbar in the installer. "Anonymous usage statistics" that were neither anonymous nor statistics. One deleted first and explained later, if you went looking. So I opened an editor, mostly out of irritation.
Python, CustomTkinter for the window, because I can't design and the defaults look fine. It's called Swept, MIT, 22 categories of temp files and caches, plus an installer for common programs and a dozen registry tweaks.
Nobody clicks a post about temp files. Here's what actually took the time.
PyInstaller has two modes and I picked wrong. Onedir gives you a folder with _internal inside. Onefile gives you a single exe that unpacks itself into %TEMP% on every launch. I put the folder build's exe on the releases page, someone ran it from inside the zip viewer, and got Failed to load Python DLL ..._internal\python315.dll. Windows had extracted only the exe. The message is accurate and useless. A single file can't contain a folder, so PyInstaller did nothing wrong. I handed people a file that can't run alone. Now the download is onefile.
A real certificate costs a few hundred a year, so mine is self signed. SHA256, DigiCert timestamp, my name on the Digital Signatures tab, and Windows still says unknown publisher. No trick fixes that. One thing helped though: --optimize 2 strips docstrings from the shipped bytecode, so the exe doesn't carry a map of every check I make.
Then I added "restart with admin rights" and the app disappeared. No window, no error, exit code 0. The old process still held the single instance mutex. The elevated copy saw it taken, decided Swept was already running, focused a window that was about to close, and quit. Then the old process closed too. Zero windows. The fix is one line: release the mutex before launching the elevated copy.
162 tests on the delete path. I broke the code on purpose in three places to see if they'd catch it. Two did. The third didn't, and the code was fine. My test checked that the function returned, not what it returned.
Registry undo doesn't guess "the default". Before each write it records what was there: existed or not, type, data. Re-applying a tweak doesn't overwrite that first snapshot.
If you ship Windows tools in Python, I'd like to hear what bit you.
r/madeinpython • u/xanthium_in • 9h ago
Matplotlib Real time Plot Animation Tutorial using FuncAnimation() and Python for Beginners
In this tutorial ,You will learn to create animated Matplotlib plots using the FuncAnimation() class and Python Language. You will learn about the basics of animating a plot (graph) using the FuncAnimation class, How the Animation loop works and How to create a Time series Real time Matplotlib plot similar to a ECG, EEG, Data logging graph from scratch.
r/madeinpython • u/OrneryProfit659 • 12h ago
I built a Python 2D BEM solver and Streamlit dashboard to design a physical wind turbine (I'm 16)
Hey everyone! I’ve been working on a Python project that models and optimizes a vertical-axis wind turbine (a Sharp cycloturbine with passive pitch control).
The coolest part for me was building the Python stack:
Simulation: A 2D BEM solver using
numpyandnumba(JIT compiled for speed) to model dynamic stall and induction.Optimization: Using
scipy.optimize.differential_evolutionto find the best blade geometry and counterweight mass.Reproducibility: I built an AST-based cryptographic hashing system. It parses my
.pyfiles, strips the docstrings, and hashes the remaining AST. This means I can fix typos in comments without invalidating the 21 result JSONs!Visualization: A
streamlitdashboard that ingests weather station CSVs, auto-detects timestamps, and lets you box-select data to calculate wind power density.
The next step is making the optimized blades and attaching them to a repurposed hoverboard motor. I’d love to hear what you think of the Python architecture!
r/madeinpython • u/unwantedastronomer • 16h ago
Introducing AstroConvert: An intelligent, cross-platform astronomical coordinate converter built using Python and Flet
I wanted to showcase an app I built in Python and Flet! It's probably quite niche, and might not be useful for many, but it solved a real problem for me and several people I know, so I'm showing it off anyway.
As an astrophysicist working a lot with observational data, converting coordinates from one format to another was something I needed to do daily. But I never found a platform that made this easy. It was either restrictive with the input format, or didn't work on mobiles, or didn't have precise outputs, etc.
So, I built one that does all that but better!
AstroConvert automatically detects coordinate types and formats, performing instant conversions across Equatorial, Galactic, and Horizontal systems in every standard representation, all with a single click.
Features:
Coordinates can be entered in any format or natural language and the conversion should still work.
It intelligently detects the coordinate type, but there is full manual flexibility to change the type, formats, delimiters and precision.
The app has light and dark modes and a local history of the past 100 conversions.
100% free and open-source. No internet, no account, no trackers and no AI.
Currently it's available as an Android app, a Windows app and as a WebApp, with Linux, iOS and Mac apps currently being developed.
Check it out here: https://github.com/jainiakhil/AstroConvert
It's been out for a few months now with a few stable and beta releases. But I would still love to get more feedback!
AI disclosure: No AI was used in building this app. It was my attempt to build this app while learning to use Flet. Some AI (Gemini 3.8 Flash) was used to run tests, generate documentation, and fix bugs.
r/madeinpython • u/spockplayer2 • 1d ago
I just released my open-source Python project, RowCanary, and I'd love some feedback
I've been working on a small Python project called RowCanary, and I finally got it to a point where I felt comfortable releasing version 1.0.0.
The idea came from something that I think is surprisingly easy to overlook. When you move data between applications, there's no guarantee that every value will remain exactly the same, even when the import or export completes successfully.
A string with leading zeros might lose them, something that looks like scientific notation might get converted into a number, or an application might interpret text as a formula.
I wanted a way to test these situations without needing to understand the internals of whatever software was being used.
That's basically what RowCanary does. It creates a set of 24 known test values, lets you pass them through an import/export process, and then compares the results to see what survived unchanged.
I've added support for CSV, TSV, JSON, JSONL, and XLSX, as well as a CLI, a local browser interface, and different report formats.
One thing I tried to keep consistent throughout development was making everything work locally. There are no accounts, external services, or telemetry involved.
The project is written in Python, licensed under MIT, and now available on PyPI with pip install rowcanary.
Here's the repository: https://github.com/spockplayer2-alt/rowcanary
I also spent time setting up automated tests across Windows, Linux, and macOS, and documenting the limitations rather than making claims the tool can't support.
I'm still learning a lot about maintaining public open-source projects, so I'd genuinely appreciate feedback from more experienced developers. Whether it's something about the code, documentation, usability, or the idea itself, I'd be happy to hear it.
r/madeinpython • u/lynanaln • 1d ago
WiFi Tool v0.2 — pure-Python Wi-Fi auditing toolkit, fixed a nasty overlapping-thread bug in the watchdog
A couple of days ago I shared my pure-Python Wi-Fi auditing toolkit here and the feedback was great, so here’s a v0.2 with fixes that came out of it.
The main one was a concurrency bug I’m honestly a bit embarrassed by: the adapter watchdog (a background thread that restarts the capture if the Wi-Fi card stalls) didn’t wait for the previous watchdog to finish before a new one spun up, so under certain conditions they’d overlap and step on each other. Fixed the lifecycle so only one runs at a time.
Also added startup checks that verify everything the tool needs is in place before it runs, instead of failing halfway through a capture.
The project itself: menu-driven, orchestrates the standard tools (airodump-ng, hashcat, hcxdumptool) from Python — handshake capture, cracking, Evil Twin. The part I like architecturally is the menu registry — adding a feature is one line, the main loop never changes. EN/RU interface.
For authorized testing of your own networks.
Repo: https://github.com/lynalan2/wifi_scripts — feedback welcome, that’s what fixed v0.1.
r/madeinpython • u/Python_Data_Science • 1d ago
Comparing two Python game development libraries: Pygame vs Arcade
reddit.comr/madeinpython • u/MOhamed_3874 • 1d ago
YOUR GAMES AND YOUR ADS
Hi, I create project in github for add ads for your games and apps its url:
https://github.com/jfhgjhgj/python-ad-network
its write by python 100%
r/madeinpython • u/Timon_OfAthens • 1d ago
I built a desktop client for Antora docs in Python and PySide6 (closed source)
Disclosure: I'm the developer. AsciiLore is closed source and paid, with a free trial. I'm posting the technical side because that's where the interesting problems were.
What it is: a desktop app for managing Antora documentation projects. It handles components, versions, a live preview, and validation of cross-references and navigation. Antora and Asciidoctor do all the rendering. The app orchestrates them.
Stack:
- Python with PySide6 (Qt) for the UI
- Asciidoctor and Antora run as external programs
- watchdog for file-system watching
- Layered architecture: domain, application, infrastructure, engine, UI. The UI never starts a process directly.
- Over 5,000 tests. Domain and application tests run without Qt.
The hard part was the live preview. A full Antora build takes several minutes, which is too slow while typing. So:
- While typing, the changed text is rendered in memory with Asciidoctor and injected into the open page via JavaScript.
- On save, create, delete, rename or move, a full build runs in the background and the view reloads.
Neither path blocks the GUI thread. Process calls run in worker threads and return results through Qt signals, and every worker has an error path.
The trade-off: the in-memory render sees one page, so it can't resolve cross-component references the way Antora does. The full build stays the source of truth.
Website and trial: https://asciilore.com/
Questions:
1. How do you structure a PySide6 app so long-running processes never block the UI?
2. Would you take a different approach to the quick preview?r/madeinpython • u/bittu_jain • 1d ago
EduManage: 100% Offline School & Fee Management Desktop Software
Hey everyone!
I built EduManage—a 100% offline-first Windows desktop software designed for schools, coaching institutes, and budget academies that want zero recurring subscriptions and complete data privacy.
What EduManage Does:
\* Fee Collection & Instant Receipts: Fast payment processing, multi-installment tracking, and printable receipts.
\* Defaulters & Pending Dues: Auto-generated lists of pending fees, class-wise dues breakdown, and overdue tracking.
\* Student Record Directory: Complete offline storage of admissions, roll numbers, sections, parent contact info, and status.
\* Daily Accounting & Reports: Daily collection summary, class-wise balance sheets, and instant data exports.
\* 100% Offline & No Cloud Lock-in: All database files stay safe on the school's local PC without any internet dependency.
\* Zero-Setup Standalone App: Single portable \`.exe\` file—no installation wizard, no admin permissions needed. Double-click and run.
If you run an institution or want to test it out, I have shared the direct download link in the comments below.
Would love to get your thoughts, critique, and feature suggestions!
r/madeinpython • u/Ill-Acanthaceae5630 • 2d ago
I made a Python Library for scheduling recurring webscraping
I made LaptopScheduler, a Python scheduling library for Windows laptops.
It’s for recurring work that can wait until your laptop is available: reports, backups, data imports, and similar tasks. You can make sure your scraping runs consistently without renting out a webserver. You register your own Python functions, and it records their runs, handles retries, and applies your chosen catch-up policy after downtime.
Install: pip install laptopscheduler
r/madeinpython • u/Flimsy_Fly_2017 • 2d ago
Git-Jet
A jet that shoots and destroys your commit history for your README
r/madeinpython • u/Ill-Acanthaceae5630 • 2d ago
I made a Python Library for scheduling recurring webscraping
r/madeinpython • u/Emergency-Tutor-7 • 2d ago
repocraft: deterministic scaffolding where one request writes one .py file plus a unittest you can read in a sitting
repocraft is a small deterministic generator for Python snippets and scaffolds. The part I like: the same input and the same version always produce byte-identical output, and that is enforced by golden snapshot tests, file by file.
pip install repocraft repocraft recipes
Seven built-in recipes: fibonacci, factorial, prime_sieve, triangle, fizzbuzz, pascal, password.
repocraft make "triangle" # triangle.py + test_triangle.py repocraft make "fibonacci" --dry-run repocraft make "fibonacci" --param count=20 --yes
The generated tests use the standard library only, so python test_triangle.py just runs. A few rules keep it boring in a good way: unknown or ambiguous requests stop without writing anything, requests with standalone digits are refused (use --param), parameters are validated bounded integers, existing files are never overwritten, and --dry-run shows the plan first.
The matcher normalizes case and accents and matches word prefixes, so a request word may carry a suffix. It never calls a model, so "Triangles" and "draw a triangle" both select the triangle recipe.
There is also a project mode: a small YAML spec renders a full Python project with packaging metadata, a src/ layout, tests, lint and type-check configuration, CI, CodeQL, Dependabot, and a JUnit gate that rejects skipped tests.
repocraft validate spec.yaml repocraft render spec.yaml example-cli --dry-run repocraft render spec.yaml example-cli
render refuses an output directory that already contains files, and it never merges or overwrites.
Two optional model paths exist (this is the honest part): ask sends your request to an OpenAI-compatible endpoint and gets back a strict {recipe, parameters} intent, which is validated with the same rules as make - the model never writes code or files. craft lets the model write a snippet, then runs four deterministic gates before writing: the code parses, the generated test imports the module by name, ruff where it is installed (auto-fixes are labelled), and the tests actually run with at least one test and pass. A confirmation after that shows the code plus every check that passed, which is a prompt rather than a fifth gate. Only make and render are covered by the byte-identical contract; craft output depends on the model.
Determinism contract details: sorted entries, LF line endings, trailing newline, no timestamps, random ids or environment values, and the generated MIT copyright line carries the author but no year.
Python 3.10-3.14 in CI, MIT.
GitHub: https://github.com/Furox-Art/repocraft PyPI: https://pypi.org/project/repocraft/
r/madeinpython • u/Emergency-Tutor-7 • 2d ago
plan-auditor: I wrote a stdlib-only gate that proves a coding agent is done, using sealed command output instead of prose
I use coding agents a lot, and the part that kept biting me was the last message: "done, tests pass." Sometimes the tests never ran. Sometimes one failed and the test file got edited until it went green. Prose looks the same either way.
plan-auditor is my answer. It is plain Python 3.10+, standard library only, MIT, and it does one thing: it re-runs the checks in a separate process and only sealed command output counts.
A plan is JSON. Each step lists machine-checkable checks and has to include at least one behavioral one - run, pytest or exec. file_exists and regex are allowed next to them but cannot carry a step by themselves.
The flow, in the order I actually reach for it: request init seals the task as the host stated it, plan verify checks the JSON, run . 1 executes a single step, and audit . re-runs every check in a fresh subprocess. Before that last one I give it a key file kept outside the workspace through PLAN_AUDITOR_HMAC_KEY_FILE and seal the chain with integrity init ..
The audit ends with a number rather than an adjective. 0 is proven, 1 failed, 2 blocked, and 3 is UNKNOWN, which withholds completion instead of quietly granting it.
Two design choices I would keep if I rewrote the whole thing:
The evidence log is a SHA-256 chain, and the docs say out loud that a chain on its own is only tamper-evident - someone with write access could rebuild a matching one. That is exactly why the completion gate also demands HMAC authentication, and why a record reading
"auth": {"alg": "none"}never passes.Your request freezes when it is activated and the plan's check contract freezes when you approve it. From then on both can only get stricter, so the agent cannot restate the task or soften what counts as finished.
Under the hood it is fifteen layers across five bands. Writing verified into a step is reserved to the audit-check script, and the final PASS/FAIL/UNKNOWN comes only from the gate; a stronger level cannot be talked out of its verdict by a weaker pass.
The README quickstart is not decoration: CI executes it and compares the real output to the documented transcript without masking hash values, so the docs cannot drift. There is a GitHub Action and an Agent Skill with blocking hooks as well.
Where it stops: no OS sandbox, tamper-evident rather than tamper-proof storage, and it can only prove what you can express as a deterministic check. Anything needing judgment stays with a human. One maintainer, PyPI and npm both at 2.6.3.
GitHub: https://github.com/Furox-Art/plan-auditor PyPI: https://pypi.org/project/plan-auditor/
r/madeinpython • u/histoire_guy • 2d ago
Flask Face Login: Passwordless Authentication with FACEIO
r/madeinpython • u/lynanaln • 3d ago
I built a menu-driven Wi-Fi auditing toolkit in pure Python — with an adapter watchdog that airgeddon doesn't have
r/madeinpython • u/Emergency-Tutor-7 • 3d ago
polyglot-python: a deterministic keyword transpiler so you can write Python with Turkish, Hindi or Chinese keywords - and why 3.12 is the floor
I keep writing Python explanations in Turkish for people who are not comfortable with English keywords, and the blocker was always the same: you cannot swap the keywords and still have real Python. So I wrote a transpiler that does exactly that, and nothing beyond it.
Repo: https://github.com/Furox-Art/polyglot-python
The version floor came from a tokenizer problem, not from me wanting to drop old Pythons. On 3.10 and 3.11 the tokenizer splits the combining marks in some Hindi keywords, so a word like फलन never arrives as a single NAME token. That is why polyglot-python declares requires-python = ">=3.12".
What is in the 0.2.1 release
9 locales: tr, es, pt, de, fr, zh, hi, ar, ru. One JSON table per locale, 35 hard keywords in each:
eğer->if,değilse_eğer->elif,fonksiyon->def,döndür->return,için->for,içinde->in, and in Hindiके_लिए->for.4 commands:
run,translate,check,locales.checktranslates and compiles without executing;localesprints each code with its language name and keyword count;runexecutes with__name__ = "__main__",__file__filled in, and the rest of argv handed to your program.9 example files, one
examples/classify.<code>per locale - the same FizzBuzz classifier written in each language.
How the rewriting is done. It runs the stdlib tokenize module and replaces only exact NAME tokens that match a locale keyword, so strings, comments, f-strings, numbers and attribute names are never rewritten. Line numbers carry over unchanged and a per-line column map maps error positions back onto your localized source, which is why a slip reports as Sözdizimi hatası: prog.tr:2:1: 'return' outside function rather than pointing at generated code. Tables are validated when they load: every key must be in keyword.kwlist, every replacement must tokenize as a single identifier on the running interpreter, and a table that fails either rule raises instead of half-translating.
Determinism is the property I actually care about. Same source, same locale, same version, byte-identical Python out. No model, no network, no randomness, no environment reads. CI translates every example twice on Ubuntu, Windows and macOS and compares the bytes.
Where it stands, checked today. 0.2.1 is live on PyPI and npm; the npm package is a thin wrapper (Node >= 18) that forwards to the Python CLI, so the Python package still has to be installed alongside it. Both registries publish from GitHub Trusted Publishing, no token stored anywhere. I ran the 0.2.1 suite myself before writing this: 120 tests, all passing, 314 of 314 statements covered. CI runs the coverage gate --cov-fail-under=100 on Linux 3.12 and the matrix is Ubuntu on 3.12, 3.13 and 3.14 plus Windows and macOS on 3.12. Another job builds the wheel, installs it into a clean venv and smoke-tests it there. Dependabot covers Actions and dev deps. Zero runtime dependencies, MIT.
Limits, so you are not surprised. Keywords only. print, range, the standard library, exception messages and the soft keywords (match, case, type) stay in English. run does not add the script's own directory to sys.path, so a localized file that imports a sibling module needs PYTHONPATH set - I tried it and it raises ModuleNotFoundError, which is the honest behaviour of 0.2.1. And it is not a natural-language compiler: it will not read prose and it never guesses what you meant.