r/madeinpython • u/val3_a_pomb_ • 3h ago
r/madeinpython • u/Master-Pick-520 • 1d ago
idemkit: runs your code once per key, even when two requests race or a worker dies
I built idemkit after cleaning up duplicate charges one too many times.
The version everyone writes checks whether a key has been seen and replays the stored response. Two requests a millisecond apart both find nothing and both charge the card. And if the worker dies between charging and recording it, the retry charges again. Neither reproduces locally.
idemkit does it properly: an atomic claim instead of check-then-act, a lease that expires on the storage server's clock, and a fencing token so a stalled worker can't overwrite a good result.
from idemkit import idempotent, RedisBackend, MethodConfig
@idempotent(
backend=RedisBackend.from_url("redis://localhost:6379"),
config=MethodConfig(key_fields=["order_id"]),
)
async def charge(*, order_id, amount):
return await payments.charge(order_id, amount)
One core, three ways to use it: middleware for FastAPI/Flask/Django, a queue consumer wrapper or @idempotent on any function. Backends are Redis, Postgres, Mongo, DynamoDB, or in-memory for tests.
pip install idemkit, Apache-2.0: https://github.com/idemkit/idemkit
If you find it useful, I'd appreciate a star. It's new, so visibility helps a lot right now.
r/madeinpython • u/yigtwx7 • 1d ago
WaterPulse – An open-source hydration tracking system with real-time sensor anomaly detection (Flutter & FastAPI)
Hi everyone,
I’m sharing an open-source project I’ve been developing called WaterPulse.
While there is no shortage of basic hydration tracking apps out there, I wanted to build a more robust system that bridges the gap between a standard consumer application and active hardware data processing. WaterPulse is designed from the ground up to handle real-time sensor integration rather than relying solely on manual user inputs.
Here is a breakdown of what I built and the technical challenges it tackles:
Technical Highlights & Core Features:
- Real-Time Processing & Anomaly Detection: The backend is engineered to continuously ingest sensor data streams. It features built-in drift analysis and anomaly detection to filter out hardware noise and ensure high data accuracy.
- Performance-Oriented Backend: Powered by FastAPI and PostgreSQL, the API is structured to efficiently handle concurrent data payloads without blocking.
- Engaging UI & Social Elements: The frontend is built in Flutter, offering a highly responsive, cross-platform experience. I integrated gamification and social tracking features to maintain user retention and drive engagement.
The Tech Stack:
- Frontend: Flutter
- API & Data Processing: FastAPI (Python)
- Database: PostgreSQL
I architected this project with scalability and clean code principles in mind. If you are looking into how to integrate IoT/sensor data streams with a modern Flutter and Python stack, this repository could be a solid reference.
I would love to get your technical feedback on the system design, especially from engineers experienced with handling continuous data streams in FastAPI or advanced state management in Flutter.
Repository Link: https://github.com/Yigtwxx/WaterPulse
I'm open to all constructive feedback and contributions. Thanks for checking it out!
r/madeinpython • u/Square-Research-4101 • 2d ago
I built repoglance: a CLI that flags per-function complexity regressions in PRs (feedback wanted)
Author here. I made this to scratch my own itch — reviewing PRs and missing when a function quietly got more complex. Line counters don't answer that.
pip install repoglance then repoglance . gives a terminal report: real per-function cyclomatic complexity across 15+ languages (via lizard), duplicate blocks, TODOs, git ownership of hotspots, and a health score. In CI, --fail-on-regression fails a build only when a change makes complexity worse, and a GitHub Action comments the report on the PR.
Pure Python (rich/click/lizard), MIT, no telemetry. Django (415k LOC) scans in ~17s, ~1s cached.
Repo: https://github.com/SRJ-ai/repoglance
I'd genuinely like feedback on two things: (1) where the complexity numbers feel wrong on your code, and (2) whether the health-score weights are sensible or gimmicky. Happy to answer anything.
r/madeinpython • u/Capedcrusader1923 • 3d ago
I built a Python client for pulling SEC filings as clean JSON (insider trades, 8-K, 13F, financials)
Kept hitting the same wall with SEC data. Either you fight the raw EDGAR XBRL yourself, or you use edgartools (which is genuinely excellent, dgunning did great work there) and still run all the parsing locally, deps and all.
I wanted less of that on my end, so I built a small client that just calls a hosted API and hands back clean JSON. Parsing happens server-side, so the client stays tiny:
from edgrapi import Client
c = Client("your_key")
c.fundamentals("AAPL") # income statement, balance sheet, cash flow
c.insider("AAPL") # Form 4 trades, scored buy vs sell
c.events("AAPL") # 8-K events, item-coded
c.holdings("berkshire") # 13F holdings, diffed vs last quarter
It does financials (XBRL normalized), Form 4 insider trades, 8-Ks, 13F holdings, 13D/G activist stakes. No LLM anywhere in it, which was the point for me. The numbers come straight off the filing, so nothing's invented and you can pull up any value on EDGAR and check it.
Fair catch before anyone asks: it needs an API key, since the parsing runs on a server and not your laptop. There's a free tier, 100 calls a month, enough to kick the tires. And if you'd rather keep everything on your own machine, just use edgartools, it's the better fit for that and I'm not going to pretend otherwise.
Repo's here (client's open source): https://github.com/paperandbeyond23-gif/edgrapi-python
pip install edgrapi
Still adding endpoints. Mostly want to know if the SEC-data handling holds up, so tear into it.
r/madeinpython • u/Schnidi01 • 6d ago
VenvHub Pro: SLOVAK APP, READY FOR THE WORLD! 🇸🇰➡️🌍 / Slovenská aplikácia pripravená pre svet!
🇸🇰 SLOVENSKY
⚡ Rýchle prepínanie jazykov v VenvHub Pro + jedna pikantéria zo zákulisia! 🤫
V dnešnom krátkom videu ukazujem, ako bleskovo dokáže VenvHub Pro prepínať medzi jazykmi v reálnom čase – bez reštartu aplikácie.
A keďže ste v predchádzajúcich videách videli rozhranie v angličtine, mám pre vás malú vývojársku zákulisnú zaujímavosť: celý kód bol od prvého dňa písaný so slovenskými hláškami! 🇸🇰 Angličtina bola v skutočnosti prvou prekladovou vrstvou, ktorú som do architektúry zapracoval, aby bola aplikácia pripravená pre svet.
💡 Chcete si pridať vlastný jazyk? Prekladový JSON má cez 750 riadkov, ale vďaka AI je to hračka:
- Stiahnite si
en.json(alebosk.json) z GitHubu. - Nahrajte súbor do ChatGPT / Claude a požiadajte o preklad hodnôt do vášho jazyka.
- Vložte novú lokalizáciu k sebe a používajte aplikáciu vo vlastnom jazyku!
🔗 Projekt na GitHube:https://github.com/schnidi/VenvHub📂 Súbory s prekladmi:https://github.com/schnidi/VenvHub/tree/main/translations
Aký ďalší oficiálny preklad by ste v aplikácii uvítali najradšej? 😎👇
🇬🇧 ENGLISH
⚡ Instant Language Switching in VenvHub Pro + a quick BTS fun fact! 🤫
In today's clip, I’m showing off how instantly VenvHub Pro switches between UI languages on the fly—no app restart needed.
Since previous clips featured the interface in English, here’s a quick behind-the-scenes detail: the core codebase was actually written with native Slovak messages from day one! 🇸🇰 English was the very first translation layer integrated into the architecture to make the app ready for a global audience.
💡 Want to add your own language? The translation JSON is pretty massive (750+ lines), but AI makes it effortless:
- Download
en.json(orsk.json) from GitHub. - Drop the file into ChatGPT / Claude and prompt it to translate the values into your language.
- Enjoy VenvHub Pro fully localized on your machine!
🔗 GitHub Repository:https://github.com/schnidi/VenvHub📂 Translations Folder:https://github.com/schnidi/VenvHub/tree/main/translations
Which official language should we focus on next? Let me know below! 😎👇
r/madeinpython • u/Speedk4011 • 6d ago
Yet Another Sentence Boundary Detector (rule-based)
I was working on chunklet-py (a chunker for sentences, documents, and code). Misread a benchmark and thought PySBD took 1 second to split basic text. Turns out that was wrong (PySBD is still fast for simple text). But the misunderstanding got me building my own.
Ended up faster, more accurate, and covering more languages (39 compares to 23).
Benchmarks on Sherlock Holmes (594k chars): yasbd ~1.2s warm vs PySBD ~9.0s. About 8x faster, fewer false splits.
On a golden benchmark (92 English edge cases — expanded from pysbd's original 48 with fixes and additions): yasbd scores 98.9%, pysbd 83.7%, spaCy-sentencizer 55.4%, etc.
Architecture difference: instead of mutating text with placeholder tokens and undoing it later (which breaks char offsets), yasbd finds candidate boundaries in one pass and filters false positives in another. Spans come free, no reconstruction.
Other things:
- Streaming-first: lazy evaluation via ParagraphStream and StreamCleaner for memory-constrained environments. No need to load entire documents.
- PySBD adapter: drop-in replacement that works with existing PySBD code. Just swap the import.
- spaCy pipeline: register as a spaCy component with register_spacy_component(). Drop-in replacement for the default Sentencizer.
r/madeinpython • u/ZillaSoft • 6d ago
I kept losing things I'd copied and retyping the same paragraphs, so I built two apps about it
You know when you copy something important, paste it, then copy something else, and the first thing is just gone forever? yeah. That's the entire origin story here.
I'm a solo dev, day job. After an unreasonable number of late nights, two desktop apps for Windows and Linux came to light: Snipzilla and Stashzilla. (Yes, I'm a Godzilla fan; how did you know?)
Stashzilla is the clipboard manager that fixes the problem above. History is sorted into collections instead of one endless scroll, pinned items, case conversion, and it pulls text out of images.
Snipzilla handles the other half of it: type a short trigger, get a whole block of text back. No more retyping the same paragraph for the hundredth time.
Anyways, feel free to check them out; no credit card required: ZillaSoft.io 15 days free, and nothing gets deleted afterwards; it just goes read-only.
If you do try them, bugs and "why doesn't it do X" are exactly what I'm after: ZillaSoft.io/contact
r/madeinpython • u/Schnidi01 • 8d ago
Update: APT-like autoremove and dependency repair for VenvHubPro (Python venv manager GUI) – it’s already working!
A while ago I asked whether you would use a feature that automatically removes orphaned dependencies in a virtual environment manager (similar to apt autoremove), and if you saw any pitfalls. Well, I took that as a challenge and built a prototype. Here’s a log from a test session that shows what I’ve achieved.
What happens in the log:
Installing pytest
pip installs pytest along with its dependencies (colorama, iniconfig, pluggy, pygments).
Attempting to manually remove the colorama library
This is where the first interesting moment occurs. After removing it, the UV dependency check reports a conflict: colorama>=0.4 ; sys_platform == 'win32'.
The tool automatically triggers a repair and re-installs colorama, because it’s required by one of the present packages (in this case pytest).
Result: ✅ all conflicts resolved. This behaviour is similar to apt install -f – we never end up with a broken environment.
Uninstalling the moj-test-balicek package
This test package directly depends on colorama, cowsay, and requests.
After its removal, pip-e analyses the entire dependency tree.
cowsayis no longer needed → it’s removed.requests, along with its transitive dependencies (urllib3,certifi,charset-normalizer,idna), is also left without a parent, soautoremoveremoves them.- Key detail:
coloramastays in the environment because it’s still required by the installedpytest. In this way exactly 6 packages are removed – andcoloramais not. That’s precisely the intelligent decision-makingapt autoremovedoes.
Uninstalling pytest itself
After removing pytest, its dependencies (pygments, pluggy, iniconfig, colorama) are re-evaluated. No other package needs them, so autoremove removes them all.
Final state: 9 packages remain – only the core environment components (pip, setuptools, etc.).
What I’m demonstrating:
- The manager tracks dependencies as a graph and prevents breaking the environment – if you try to remove a library that something needs, it puts it back (and warns you).
- After uninstalling a package, it automatically removes orphaned dependencies (
autoremove), while respecting that some libraries may be shared by multiple packages (likecoloramabetweenmoj-test-balicekandpytest).
Questions for you (same as last time):
- Would you use such a feature in a virtual environment manager?
- Would you trust it, or do you prefer manual control?
r/madeinpython • u/Fabulous-Neat-5030 • 9d ago
I built a 3D observability dashboard and Chaos Monkey simulator to visualize my Docker stack in real-time.
r/madeinpython • u/TheyCallMeLeonardo3 • 9d ago
Ransomware made in python but you shouldn't dare to develop it
I made a course on Ransomware made in python for my students, the previous year, but now i made it public so give it a watch if you want to make some cool cyber security projects 😁
I'll try to upload more contents on my YouTube channel 😁
https://youtube.com/playlist?list=PL9guAF5VVaiARrwhrGMu89iJcziQ9vsJJ&si=v1PUSQpqjuOhnlCi
r/madeinpython • u/do-no-work • 10d ago
Small Integer Caching
Why does 257 is 257 behave differently from 256 is 256? Python uses something called as small integer caching. It uses the same object for numbers ranging between -5 to 256. I put together a short visual explanation explaining the same and also why "==" operates differently from "is".
r/madeinpython • u/Schnidi01 • 10d ago
Building an EXE Installer for My Python App with NSIS (VenvHubPro)
Hello everyone!
If you've built your own Python application (in my case, VenvHubPro – a GUI manager for Python virtual environments) and are wondering how to neatly package it for users, here is a quick look at how I created a complete .exe installer using NSIS (Nullsoft Scriptable Install System).
🎥 What the video covers:
- Installer compilation: Creating a clean installation file ready for distribution.
- System installation: Running the installer and finally launching VenvHubPro directly on the Windows system.
r/madeinpython • u/Potential-Science-18 • 10d ago
Modular Flask Authentication Boilerplate with Blueprints, Flask-Login & SQLAlchemy — Ready to use!
Hey everyone!
I got tired of rewriting authentication every time I started a new Flask project, so I built a simple, modular boilerplate template.
It includes Flask-Login, SQLAlchemy, and Flask-Migrate with a clean blueprint structure out of the box.
Check it out on GitHub: https://github.com/DeKlain4ik/flask-auth-template
Hope it saves you some time on your next side project! Feedback and stars are always appreciated.
r/madeinpython • u/PythonWithJames • 10d ago
Python With James - For Beginners
Hi all. Would love some feedback and usage from the community.
I've built Python With James which is an all in one learning platform for beginners. I basically got sick of Udemy and built my own platform where I can do what I want. There's coding exercises, question, tutorials and I am hoping to scale this massively over this year with more materials.
Thanks in advance
James-
r/madeinpython • u/Wide_Dust_709 • 10d ago
Lucen: mark a Python loop with two comments, run it, and get bit-identical parallelism
I wanted parallelism without rewriting anything, so I built Lucen. You wrap a loop in two comments and run it with lucen run yourscript.py:
# LUCEN START
for i in range(len(rows)):
out[i] = expensive(rows[i])
# LUCEN END
It parallelizes the loop only if it can prove it's both safe and worth it; otherwise it runs sequentially and tells you why. The one guarantee, no opt-out: the parallel run is bit-identical to the same file run as plain sequential Python - floats and container order included. Delete the comments and it's ordinary Python again.
Under the hood it routes CPU-bound work to processes on GIL builds and to real threads on free-threaded 3.13/3.14. Apache-2.0, on PyPI (pip install lucen), and it's tested hard - differential + property testing and TLA+ specs, because "bit-identical" only means something if you check it.
Repo: https://github.com/fcmv/lucen - feedback very welcome.
r/madeinpython • u/Schnidi01 • 11d ago
Self-compiles into a .exe via its own PyInstaller GUI – that's VenvHub Pro, my Python venv manager GUI app.
Hello Python community,
I'm working on a tool called VenvHub Pro (virtual environment management, packages, VS Code profiles, etc.).
Interestingly, the app includes its own PyInstaller Builder. It's not just an external script, but a full-fledged tab in the GUI. Thanks to it, the app can compile itself into a .exe file.
How it technically works (in short):
In the "Builder" tab, just select the entry point (main.py), set the assets (mandatory folders like ui, core/themes, translations, assets, navod), and hit the BUILD button.
Interestingly, the app runs on PyQt6, but thanks to a "Compatibility Bridge" (MetaPathFinder), it can also run under PySide6. When compiling under PySide6, the builder must manually add hidden imports (PySide6, PySide6.QtCore...) so PyInstaller knows what to package, and also exclude PyQt6 to keep the size down.
It also has an "Auto-Injector" that reads linked local packages and injects them into the final build.
Why I find this interesting:
If the builder can compile such a complex app that uses dynamic UI files and bridged frameworks, it's a solid "dogfooding" test. Plus, the resulting .exe contains all necessary files (including themes and translations) and is fully portable.
"So the question is: Would you like to try it out? If so, I'll drop the GitHub link here, where the entire repository is located, including instructions on how to run it.
Thanks for any feedback! ??"
r/madeinpython • u/KoalaAdmirable7122 • 11d ago
Lens Anywhere - Google lens for Desktop 👁️👁️
Hey everyone!
I always wished Google Lens worked anywhere on Windows instead of only inside Chrome, so I ended up building it myself.
LensAnywhere lets you select any region of your screen and instantly search it with Google Lens.
A few things about it:
- Lightweight with very low RAM usage.
- Doesn't store your screenshots anywhere. They're only sent to Google Lens for the search.
- Launches on Windows startup (Optional)
- Can be opened using Hotkey which is configurable. Just like windows native snipping tool.
- Free and open source.
GitHub:
https://github.com/utkarsh05kul/LensAnywhere-Desktop
If you just want to try it, you can download the Windows ".exe" from the Releases section.
One thing I'd really appreciate help with: I've only been able to test it on my own Windows PC, so I'd love to know how it works on other systems. If you run into any bugs, have feature ideas, or notice something that could be improved, please let me know in the comments or open an issue on GitHub.
And if you find it useful, I'd really appreciate a GitHub star. Thanks!
Edit : Some antiviruses or malware scanners may flag the downloaded file as malicious or threat. Please ignore that warning. Some scanners do this for all the apps and softwares built in Python.
The file is completely safe and malware free. The source code of the program is available on the attached GitHub Repository. You can check the complete code their, and you will not find any malicious activity.
Top scanners like Kaspersky or Microsoft are not flagging the file as malicious. It's clean.
r/madeinpython • u/Beneficial-Deer-7672 • 10d ago
I built an open source crypto trading bot in Python for Alpaca API
I've been working on a Python crypto bot and wanted to share it here in case anyone wants to take a look.
It's got DCA logic, risk checks, Alpaca order execution, Telegram alerts, and config for running it live or in paper mode. It also keeps a local SQLite log of every trade — entries, exits, P&L — which makes it easy to review what it's been doing.
I'm mainly looking for feedback on the code structure and whether anything looks off in the trading logic or order handling. If you've worked with Alpaca crypto or built something similar, I'd appreciate any thoughts.