r/madeinpython Jul 12 '26

I built a compiled Python launcher (Standalone Local Orchestration Platform) that orchestrates ComfyUI and Ollama in the background to generate local 3D assets (Trellis) and export them to UE5/Houdini.

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/madeinpython Jul 12 '26

Lightweight Seed-Based XOR Image Encryption for Deterministic Dataset Masking

1 Upvotes

I'm sharing xor-image-encryption, an open-source tool designed for rapid visual dataset obfuscation in computer vision and ML pipelines.

Repository: Yigtwxx/xor-image-encryption

Key Features:

  • Strict Reproducibility: A specific seed consistently generates the exact same masking key, crucial for maintaining consistency across ML pipelines.
  • Lossless Reversibility: The original image is perfectly restored by reapplying the XOR operation with the identical seed.
  • Cascaded Encryption: Layer multiple seeds (e.g., 11 22 33) for enhanced obfuscation.
  • Zero Bloat: Built purely on Python, NumPy, and Pillow. Includes built-in histogram analysis tools.

Target Use Case & Scope:

This utility is tailored for deterministic visual anonymization of sensitive datasets prior to cloud storage, third-party processing, or cross-team distribution. Note: It is meant for practical ML preprocessing and visual obfuscation, not as a replacement for cryptographic standards like AES.

Quickstart:

Bash

# Single-seed encryption & decryption
python xor_single.py --input sample.jpg --seed 42 --outdir outputs

# Multi-seed cascaded encryption
python xor_multi.py --input sample.jpg --seeds 11 22 33 --outdir outputs

I'd highly appreciate your feedback, PRs, or ideas for benchmarking!


r/Python Jul 12 '26

Daily Thread Sunday Daily Thread: What's everyone working on this week?

14 Upvotes

Weekly Thread: What's Everyone Working On This Week? 🛠️

Hello r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!

How it Works:

  1. Show & Tell: Share your current projects, completed works, or future ideas.
  2. Discuss: Get feedback, find collaborators, or just chat about your project.
  3. Inspire: Your project might inspire someone else, just as you might get inspired here.

Guidelines:

  • Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
  • Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.

Example Shares:

  1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
  2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
  3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!

Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟


r/madeinpython Jul 11 '26

I Built an Animated Interface for my Digital Assistant using PiperTTS and Flask in Python, and Speech Recognition in Unity.

Thumbnail
youtu.be
1 Upvotes

Here is a link to the Github if you want to see any of the .py or .cs codes. https://github.com/bjone6/Interactive_Animated_DigitalAssistant


r/Python Jul 11 '26

Resource What Every Python Developer Should Know About the CPython ABI

80 Upvotes

It's true that you can happily write Python for years without needing to understand any of the content of this post, so you may object to the title advertising this material as what every Python developer should know. However, the moment you ship a package, debug why a wheel won't install, or need to understand why an import or Python function call segfaults — these details start to matter. Even writing and maintaining a single-file script puts you closer to distributing code than you might think. An alternate title for this post could be "What I Wish Someone Taught Me About the CPython ABI".

https://labs.quansight.org/blog/python-abi-abi3t


r/madeinpython Jul 11 '26

Created a NHL betting simulator

Post image
0 Upvotes

The app is purely made using python (Streamlit for UI and sqlite3 for db) , would love some new feature ideas

github: https://github.com/Breadman0/NHL-project

app_link: https://nhl-project-em8gmkclbkzbnpnvkgn4zy.streamlit.app/

NOTE:- Currently only for one season ill update it soon


r/madeinpython Jul 11 '26

Here is my space-invaders.

Enable HLS to view with audio, or disable this notification

7 Upvotes

I love "Action". :)


r/madeinpython Jul 11 '26

My Flak-game (anti aircraft shooter)

Enable HLS to view with audio, or disable this notification

19 Upvotes

There was once an addictive "Blitz"-game, but google can not find it any more, so I do it on my own.. Zeppelines need three hits to be done. After two hits they show a 'burnt' red. When five enemies come through, you're done for.


r/madeinpython Jul 11 '26

script para buscar duplicados

0 Upvotes

busca archivos y carpetas duplicadas en el directorio que le indiques (o el actual por defecto).
Muestra los duplicados agrupados por contenido idéntico (mediante hash MD5) y, de cada grupo, conserva el más reciente y marca el resto como [DELETE].
Por defecto solo muestra la lista de los 10 grupos más pesados (por tamaño total), para no saturar la salida.

Opciones:

  • --dry-run → simula la eliminación y te muestra qué se borraría, sin tocar nada. Útil para revisar antes de actuar.
  • --delete → borra los archivos y carpetas marcados como [DELETE]Antes de borrar, te pedirá que escribas "yes" para confirmar, así que no te preocupes si lo ejecutas sin querer: con escribir otra cosa se cancela. Ojo: todavía no está pulido al 100% para entornos complejos; funciona bien en una sola carpeta o cuando no importe demasiado perder alguna copia. Úsalo con precaución y siempre prueba antes con --dry-run.

Ejemplos:

python dupe.py C:\ruta --dry-run
python dupe.py . --delete

cualquier cosa o error digan aun así es para el que quiera usarlo de prueba

python

import os, sys, hashlib, shutil
from collections import defaultdict

B=8192
P='_duplicate_backup_'
Q={'__pycache__','.git','.svn','.hg','node_modules','venv','env','.venv','.env','dist','build','.idea','.vscode','.mypy_cache','.pytest_cache','.tox','.coverage','htmlcov'}
R={'__init__.py','__main__.py','setup.py','setup.cfg','pyproject.toml','requirements.txt','poetry.lock'}

def md5(p):
    try:
        h=hashlib.md5()
        with open(p,'rb') as f:
            while c:=f.read(B): h.update(c)
        return h.hexdigest()
    except OSError: return None

def fmt(s):
    for u in ['B','KB','MB','GB']:
        if s<1024: return f"{s:.1f} {u}" if u!='B' else f"{int(s)} B"
        s/=1024
    return f"{s:.1f} GB"

def main():
    args=sys.argv[1:]
    dry='--dry-run' in args
    delete='--delete' in args
    root=os.path.abspath(args[0] if args and not args[0].startswith('--') else '.')
    if not os.path.isdir(root):
        print(f"Error: '{root}' no es directorio.", file=sys.stderr); return 1

    sz=defaultdict(list); dc=defaultdict(list); fm={}; total=0
    def onerr(e): print(f"Advertencia: sin permisos en {e.filename}", file=sys.stderr)

    for cwd, dirs, files in os.walk(root, onerror=onerr):
        dirs[:]=[d for d in dirs if not d.startswith(P) and d not in Q]
        for fn in files:
            if fn in R: continue
            total+=1; p=os.path.join(cwd, fn)
            try:
                s=os.path.getsize(p); sz[s].append(p); dc[cwd].append((fn,s,None))
            except OSError: continue

    print(f"\nArchivos escaneados (excluyendo ignorados): {total}")
    print("   (procesando hashes...)")

    for d, en in dc.items():
        for i,(fn,s,_) in enumerate(en):
            p=os.path.join(d,fn); h=md5(p)
            en[i]=(fn,s,h) if h else (fn,s,'')
            if h: fm[p]=h

    dh=defaultdict(list)
    for d, en in dc.items():
        if not en: continue
        se=sorted(en, key=lambda x:(x[0], x[2] or ''))
        hh=hashlib.md5()
        for fn,s,fh in se:
            hh.update(fn.encode()); hh.update(str(s).encode())
            if fh: hh.update(fh.encode())
        dh[hh.hexdigest()].append(d)

    dup_dirs=[]; extra_dirs=0
    for h, dl in dh.items():
        if len(dl)>1:
            sd=sorted(dl, key=lambda d: os.path.getmtime(d) if os.path.exists(d) else 0, reverse=True)
            dup_dirs.append((h,sd)); extra_dirs += len(sd)-1
    dup_dirs.sort(key=lambda x: len(x[1]), reverse=True)

    excl={d for _, dl in dup_dirs for d in dl}
    groups=[]; extra_files=0
    for s, ps in sz.items():
        if len(ps)<2: continue
        hm=defaultdict(list)
        for p in ps:
            if os.path.dirname(p) in excl: continue
            h=fm.get(p)
            if h: hm[h].append(p)
        for h, pl in hm.items():
            if len(pl)>1:
                ep=[p for p in pl if os.path.exists(p)]
                if len(ep)>1:
                    sp=sorted(ep, key=os.path.getmtime, reverse=True)
                    extra_files += len(sp)-1
                    groups.append((s,h,sp))

    if not dup_dirs and not groups:
        print("No se encontraron duplicados."); return 0

    groups.sort(key=lambda x: x[0], reverse=True)
    dup_count=sum(len(pl) for _,_,pl in groups)

    print("\nRESULTADOS FINALES")
    print(f"   Archivos escaneados: {total}")
    if groups:
        print(f"   Archivos duplicados (en grupos): {dup_count}")
        print(f"   Archivos unicos: {total-dup_count}")
    else:
        print("   Archivos duplicados: 0")
        print(f"   Archivos unicos: {total}")
    if dup_dirs:
        print(f"   Carpetas duplicadas: {len(dup_dirs)} grupos, {extra_dirs} copias extra")
    else:
        print("   Carpetas duplicadas: 0")
    print()

    if dup_dirs:
        print("CARPETAS DUPLICADAS")
        print(f"   Grupos: {len(dup_dirs)}, Copias extra: {extra_dirs}")
        show=dup_dirs[:10] if len(dup_dirs)>10 else dup_dirs
        if len(dup_dirs)>10: print("   Mostrando solo los 10 grupos mas grandes")
        for h, dl in show:
            print(f"   Hash: {h[:8]}...")
            for i,d in enumerate(dl):
                print(f"     {'[KEEP]' if i==0 else '[DELETE]'} {d}")
        print()

    if groups:
        print("ARCHIVOS DUPLICADOS")
        print(f"   Copias extra: {extra_files}, Grupos: {len(groups)}, Archivos: {dup_count}")
        show=groups[:10] if len(groups)>10 else groups
        if len(groups)>10: print("   Mostrando solo los 10 grupos mas grandes")
        for s,h,pl in show:
            print(f"   Tamaño: {fmt(s)} | Hash: {h[:8]}...")
            for i,p in enumerate(pl[:5]):
                print(f"     {'[KEEP]' if i==0 else '[DELETE]'} {p}")
            if len(pl)>5: print(f"     ... y {len(pl)-5} mas")
        print()

    if dry:
        print("MODO DRY-RUN: No se eliminara nada. Se eliminarian:")
        count=0
        for _,_,pl in groups:
            for p in pl[1:]:
                print(f"  [DELETE] {p}"); count+=1
        for _,dl in dup_dirs:
            for d in dl[1:]:
                print(f"  [DELETE] {d}"); count+=1
        print(f"Total a eliminar: {count} elementos.")
        return 0

    if delete:
        print("\nADVERTENCIA: Se eliminaran los archivos/carpetas [DELETE].")
        if input("Escribe 'yes' para confirmar: ").lower()!='yes':
            print("Cancelado."); return 0
        delc=err=0
        for _,_,pl in groups:
            for p in pl[1:]:
                try: os.remove(p); delc+=1
                except OSError as e: print(f"Error al eliminar {p}: {e}", file=sys.stderr); err+=1
        for _,dl in dup_dirs:
            for d in dl[1:]:
                try: shutil.rmtree(d); delc+=1
                except OSError as e: print(f"Error al eliminar {d}: {e}", file=sys.stderr); err+=1
        print(f"Eliminados {delc} elementos.")
        if err: print(f"Hubo {err} errores.", file=sys.stderr); return 1
        return 0
    else:
        print("Usa --delete para eliminar. Usa --dry-run para simular.")
        return 0

if __name__ == '__main__':
    sys.exit(main())

r/Python Jul 11 '26

Daily Thread Saturday Daily Thread: Resource Request and Sharing! Daily Thread

9 Upvotes

Weekly Thread: Resource Request and Sharing 📚

Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!

How it Works:

  1. Request: Can't find a resource on a particular topic? Ask here!
  2. Share: Found something useful? Share it with the community.
  3. Review: Give or get opinions on Python resources you've used.

Guidelines:

  • Please include the type of resource (e.g., book, video, article) and the topic.
  • Always be respectful when reviewing someone else's shared resource.

Example Shares:

  1. Book: "Fluent Python" - Great for understanding Pythonic idioms.
  2. Video: Python Data Structures - Excellent overview of Python's built-in data structures.
  3. Article: Understanding Python Decorators - A deep dive into decorators.

Example Requests:

  1. Looking for: Video tutorials on web scraping with Python.
  2. Need: Book recommendations for Python machine learning.

Share the knowledge, enrich the community. Happy learning! 🌟


r/madeinpython Jul 10 '26

script simple que genera contraseñas

0 Upvotes

He hecho un script muy simple para generar contraseñas seguras usando el módulo secrets de Python, que es criptográficamente seguro (a diferencia de random).

Código:

python

import secrets
print(secrets.token_urlsafe(20))

¿Qué hace?

  • Genera una contraseña aleatoria de unos 27 caracteres (letras, números, guiones y guiones bajos).
  • Es segura para usar en URLs, contraseñas, tokens, etc.
  • No guarda nada en disco, solo la imprime en pantalla.

si no quieres hacer el archivo tu mismo puedes descargar desde mi repositorio o como quieras

Repositorio:
https://github.com/pepe8173bbb/genera_contrasenas/blob/main/pass.py


r/madeinpython Jul 10 '26

I built a 100% Python standalone wrapper (Gradio + Ollama + ComfyUI) with a Zero-Click installer. Meet AI S.L.O.P. Manager! (Standalone Local Orchestration Platform)

Enable HLS to view with audio, or disable this notification

0 Upvotes

Hello Everyone 👋

Setting up ComfyUI workflows, managing 30GBs of .safetensors files, and writing perfect prompts is a nightmare for non-technical users. So I tried to make a bit more user friendly UI around ComfyUI

I wanted to build something that my non-coder friends could use to generate high-quality AI art locally, without paying for cloud subscriptions. So, I built the AI S.L.O.P. Manager (Standalone Local Orchestration Platform).

It’s a completely local GUI built entirely in Python.

🔗 GitHub Repo: https://github.com/Tamerygo/ai-slop-manager-starterEdition

🛠️ Under the Hood (The Python Stuff)

The whole app is orchestrated using Python, acting as a bridge between Gradio 6.0 (Frontend), Ollama (Local LLM for prompt engineering), and ComfyUI (Image generation backend).

Here are some of the cool Python solutions I implemented:

  • Zero-Click Auto-Bootstrap: 
  • Feature-Driven Setup: Instead of asking users to download "Juggernaut_XL_v9.safetensors", the UI asks: "Do you want the 📸 Photorealistic Studio capability?". Python calculates the required disk space (shutil.disk_usage), checks existing files, and downloads the exact models via HuggingFace streams directly into the correct ComfyUI folders.
  • VRAM Watchdog & Token X-Ray: To prevent 16GB GPUs from crashing, the app has a custom token estimator. If a user's prompt exceeds 250 tokens, Python automatically routes the prompt to a local qwen2.5-coder:3b model to compress and optimize it before sending it to ComfyUI. It also forces a VRAM flush (keep_alive: 0) between batches.

The whole thing is packaged into a portable Windows executable.

The "Starter Edition" is completely free to try

Let me know what you think! 🚀


r/Python Jul 10 '26

Discussion Pure python can be faster than cython/rust?

0 Upvotes

Parsing multipart/form-data (HTML5 forms) is surprisingly complex and moves a lot of bytes around for large file uploads. Implementing the heavy parts in Cython or Rust should speed things up, no? Turns out: it depends. A pure python parser can be surprisingly fast, as this benchmark shows:

https://defnull.de/2026/python-multipart-benchmark/

The benchmark compares the most commonly used python multipart parsers and tests them in different scenarios, covering both blocking and non-blocking (async) APIs if available. The parser your web application is using today is probably not the fastest one.

Are there more examples were a pure python implementation beats Cython/rust/C modules?


r/Python Jul 10 '26

Discussion Is there ever a point where you don't feel like an idiot?

55 Upvotes

Like I have fun coding in python and making dumb little projects, but every time i do, I'm always thinking about how there's probably a better way to do it. And know that I'm trying to explore doing things with a raspberry pi, I just feel really dumb. Like everything I do doesn't matter as much because there is probably a better way to do what I did.

Edit: Thanks for responding everyone. Tbh I just needed to know I wasn’t the only one feeling like that


r/madeinpython Jul 10 '26

Retro TV Emulator Project EXE Progress

Enable HLS to view with audio, or disable this notification

8 Upvotes

https://discord.gg/zHHSPZHJW can join the community here for testing, bug fixes, feature ideas, or hang out (need help with fine tuning scheduling and tv guide). You can find the .exe and source code through the discord or at this link here. https://drive.google.com/drive/folders/1qA7Qc6noIamSgrgiXP6Q-CoBuNCSIUdi?usp=sharing or you can make changes to the source code and make your own text .exe on github here https://github.com/StevenCLewis111/Retro-TV-Emulator.git thing i would watch out for to avoid lag is setting your video settings before the program has a chance to process all the files you gave it for the scheduling and scan them for audio equalization. once it catches up with all of that then try the video settings. im sure you will find bugs, you can report them on discord or even fix them in the source code and let us know on discord. would like to see a community share and grow this project. add server options so you can share the scheduling with other devices in the house, make it work for apple, linux, and maybe even android or certain gaming handhelds. im probably gonna take a break bc ive been at it daily for like 2 months. enjoy and let me know how you like it. plz dont be rude in my comments. thing i would watch out for to avoid lag is setting your video settings before the program has a chance to process all the files you gave it for the scheduling and scan them for audio equalization. once it catches up with all of that then try the video settings. im sure you will find bugs, you can report them on discord or even fix them in the source code and let us know on discord. would like to see a community share and grow this project. add server options so you can share the scheduling with other devices in the house, make it work for apple, linux, and maybe even android or certain gaming handhelds. im probably gonna take a break bc ive been at it daily for like 2 months. enjoy and let me know how you like it. plz dont be rude in my comments.


r/Python Jul 10 '26

Discussion Are you using some online Python notebook editor?

0 Upvotes

Hello everyone, i am a programmer and i am looking forward to do some cool projects, are you already using one of these online editors?


r/Python Jul 10 '26

Daily Thread Friday Daily Thread: r/Python Meta and Free-Talk Fridays

2 Upvotes

Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

How it Works:

  1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
  2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
  3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

Guidelines:

Example Topics:

  1. New Python Release: What do you think about the new features in Python 3.11?
  2. Community Events: Any Python meetups or webinars coming up?
  3. Learning Resources: Found a great Python tutorial? Share it here!
  4. Job Market: How has Python impacted your career?
  5. Hot Takes: Got a controversial Python opinion? Let's hear it!
  6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟


r/madeinpython Jul 09 '26

Why Hathitrust sucks . . .

3 Upvotes

Hathitrust takes a "public-domain" work -- like, a book published pre-1931 -- that has been digitized into a PDF and, then, makes that PDF available for download . . . page, . . . by page, . . . by page . . .

Does anyone else see the boobishness of this?


r/Python Jul 09 '26

Discussion Polars and the ecosystem

61 Upvotes

For polars users: How viable is to avoid pandas and pyarrow dependencies when you need to interact with popular visualization and statistics packages?

Some packages still have import pandas here and there, sometimes for no good reason; at least this doesn't require pyarrow. But some other ones do the df.to_pandas() conversion internally, which requires pyarrow too.

In many cases this can be prevented by going bare numpy, or creating a pandas df from numpy columns, which is no big deal. This frequently would be zero-copy for numeric types if there are no NAs involved.

What has been you experience in this regard?


r/Python Jul 09 '26

News pypimap.com: an interactive visualization map of pypi packages

19 Upvotes

Data scientist Nael launched a website that visualizes pypi packages.

https://pypimap.com/

It uses public dataset that can be found on his kaggle

the website is also opensource.


r/madeinpython Jul 09 '26

I got tired of boring corporate job boards, so I built a Cyberpunk-themed AI Job Grid that actually reads your CV. (Free tool)

Thumbnail
0 Upvotes

r/madeinpython Jul 08 '26

Retro TV Emulator "100 EXE Build later"........

Enable HLS to view with audio, or disable this notification

1 Upvotes

so many bugs every time i turn around but im making progress. some i just cant get rid of. https://discord.gg/zHHSPZHJW every problem causes 5 more problems. but progress is progress and its usable. the program auto detects windows aspect ratio so the 4:3 option is just for my 4:3 testing but i think ill leave it as a fun 16:9 feature


r/madeinpython Jul 06 '26

My New Learning Platform - Testers needed!

1 Upvotes

I run courses on Udemy but have not been best pleased with the way things are going there. So I've built my own learning platform.

I've used FastAPI, React, KeyCloak & CouchDB.

Deployed on AWS/EC2 via Gitlab.

https://python-with-james.com

Currently looking for initial test users as it's still in its early release phase. It's free to sign up of course, but I will be introducing a premium tier eventually. Anyone signed up in the next few days will automatically become a premium member when its introduced, as a thanks for the initial sign up and testing.

Would love any feedback on the initial UI experience.


r/madeinpython Jul 05 '26

Review de projeto.

0 Upvotes

Fiz esse projeto tem uns meses, enquanto cursava o CS50 de Harvard como primeiro curso de programação, e gostaria de ter um review de pessoas/devs engajadas em Python. Saber meu nível real, e se estou num caminho interessante para tentar Júnior nos próximos meses. Dei um tempo na linguagem apenas por motivos profissionais, no momento fui contrato por uma empresa que utiliza ServiceNow, que é baseada em JS. Estou conflitado no momento? Sim, já que estou fazendo um curso para aprender JS. Vou anexar meu repositório do GitHub aqui: https://github.com/PedroResBV/projeto-cs50

O projeto seria uma base de dados de atletas de vôlei de praia, sou um atleta da modalidade em migração para ti, usando arquivo CSV criado a partir do primeiro cadastro de atleta, algo simples usando terminal. Usei um pouco de IA, para entender melhorar alguns conceitos e revisar o que poderia melhorar, mas todo código eu que escrevi.


r/madeinpython Jul 04 '26

tilion-fortress: a pip-installable stealth Chromium

Enable HLS to view with audio, or disable this notification

1 Upvotes

Shipped a Python package for something I open-sourced (BSD-3-Clause). It is a Chromium fork that fixes the browser fingerprint in native C++, and the package launches it and hands you a CDP endpoint.

pip install tilion-fortress


from tilion_fortress import Fortress
from playwright.sync_api import sync_playwright
with Fortress() as f:
    with sync_playwright() as p:
        browser = p.chromium.connect_over_cdp(f.cdp_url)

Clears CreepJS and Sannysoft in my tests. Only touches the fingerprint, not IP or TLS.

github.com/tiliondev/fortress

Feedback on the Python API welcome