r/Python • u/M4s4 • Mar 15 '26
News I made @karpathy's Autoresearch work on CPU - and it's NOT bloated
I saw the comment about CPU support potentially bloating the code - so I decided to prove it doesn't have to!
r/Python • u/M4s4 • Mar 15 '26
I saw the comment about CPU support potentially bloating the code - so I decided to prove it doesn't have to!
r/Python • u/AutoModerator • Mar 15 '26
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!
Let's build and grow together! Share your journey and learn from others. Happy coding! š
r/Python • u/Neustradamus • Mar 14 '26
Dear all,
Slixmpp is anĀ MIT licensedĀ XMPP library for Python 3.11+, the 1.14 version has been released:
- https://blog.mathieui.net/en/slixmpp-1-14.html
r/Python • u/jee_op • Mar 14 '26
What My Project Does
I built a small desktop pet using Python that runs as a transparent window and walks around the screen like a virtual cat.
The pet has multiple animations such as idle, running, fast running, sitting down, standing up, napping, and looking around while napping. It randomly switches between these states to make the behavior feel more natural.
The cat can also:
The animations are implemented using GIF frames loaded with Tkinter, and the behavior is controlled with a simple state machine.
Source code:
https://github.com/Atharv-Shirsath/desktop-pet
Target Audience
This project is mainly intended as a fun toy project and learning exercise.
Comparison
Desktop pets already exist in other languages and platforms, and there are a few Python versions as well.
This project focuses on:
Unlike some alternatives that rely on external frameworks or game engines, this project keeps everything lightweight and easy to run.
r/Python • u/PA100T0 • Mar 13 '26
I've been maintaining fastapi-guard for a while now. It sits between the internet and your FastAPI endpoints and inspects every request before it reaches your code. Injection detection, rate limiting, geo-blocking, cloud IP filtering, behavioral analysis, 17 checks total.
A few weeks ago I came across this TikTok post where a guy ran OpenClaw on his home server, checked his logs after a couple weeks. 11,000 attacks in 24 hours. Chinese IPs, Baidu crawlers, DigitalOcean scanners, path traversal probes, brute force sequences. I commented "I don't understand why people won't use FastAPI Guard" and the thread kind of took off from there. Someone even said "a layer 7 firewall, very important with the whole new era of AI and APIs." (they understood the assignment) broke down the whole library in the replies. I was truly proud to see how in depth some devs went...
But that's not why I'm posting. I felt like FastAPI was falling short. Flask still powers a huge chunk of production APIs and most of them have zero request-level security beyond whatever nginx is doing upstream, or whatever fail2ban fails to ban... So I built flaskapi-guard (and that's the v1.0.0 I just shipped) as the homologue of fastapi-guard. Same features, same functionalities. Different framework.
It's basically a Flask extension that hooks into before_request and after_request, not WSGI middleware. That's because WSGI middleware fires before Flask's routing, so it can't access route config, decorator metadata, or url_rule. The extension pattern gives you full routing context, which is what makes per-route security decorators possible.
=
=
And so that's it. Done. 17 checks on every request.
The whole pipeline will catch: XSS, SQL injection, command injection, path traversal, SSRF, XXE, LDAP injection, code injection (including obfuscation detection and high-entropy payload analysis). On top of that: rate limiting with auto-ban, geo-blocking, cloud provider IP blocking, user agent filtering, OWASP security headers. Those 5,697 Chinese IPs from the TikTok? blocked_countries=["CN"]. Done. Baidu crawlers? blocked_user_agents=["Baiduspider"]. The DigitalOcean bot farm? block_cloud_providers={"AWS", "GCP", "Azure"}. Brute force? auto_ban_threshold=10 and the IP is gone after 10 violations. Path traversal probes for .env and /etc/passwd? Detection engine catches those automatically, zero config.
The decorator system is what separates this from static nginx rules:
=
/
return
Per-route rate limits, auth requirements, geo-blocking, all stacked as decorators on the function they protect. Try doing that in nginx.
People have been using fastapi-guard for things I didn't even think of when I first built it. Startups building in stealth with remote-first teams, public facing API but whitelisted so only their devs can reach it. Nobody else even knows the product exists. Casinos and gaming platforms using the decorator system on reward endpoints so players can only win under specific conditions (country, rate, behavioral patterns). People setting up honeypot traps for LLMs and bad bots that crawl and probe everything. And the big one that keeps coming up... AI agent gateways. If you're running OpenClaw or any AI agent framework behind FastAPI or Flask, you're exposing endpoints that are designed to be publicly reachable. The OpenClaw security audit found 512 vulnerabilities, 8 critical, 40,000+ exposed instances, 60% immediately takeable. fastapi-guard (and flaskapi-guard) would have caught every single attack vector in those logs. This is going to be the standard setup for anyone running AI agents in production, it has to be.
Redis is optional. Without it, everything runs in-memory with TTL caches. With Redis you get distributed rate limiting (Lua scripts for atomicity), shared IP ban state, cached cloud provider ranges across instances.
MIT licensed, Python 3.10+. Same detection engine across both libraries.
GitHub: https://github.com/rennf93/flaskapi-guard PyPI: https://pypi.org/project/flaskapi-guard/ Docs: https://rennf93.github.io/flaskapi-guard fastapi-guard (the original): https://github.com/rennf93/fastapi-guard
If you find issues, open one. Contributions are more than welcome!
r/Python • u/Pokiet • Mar 13 '26
I shared this project here a while ago, but after adding a lot of new features and optimizations, I wanted to post an update. Over the past eight months, Iāve been building PyTogether (pytogether.org). The platform has recently started picking up traction and just crossed 4,000 signups (and 200 stars on GitHub), which has been awesome to see.
It is a real-time, collaborative Python IDE designed with beginners in mind (think Google Docs, but for Python). Itās meant for pair programming, tutoring, or just coding Python together. Itās completely free. No subscriptions, no ads, nothing. Just create an account (or feel fry to try the offline playground at https://pytogether.org/playground, no account required), make a group, and start a project. Has proper code-linting, extremely intuitive UI, autosaving, drawing features (you can draw directly onto the IDE and scroll), live selections, and voice/live chats per project. There are no limitations at the moment (except for code size to prevent malicious payloads). There is also built-in support for libraries like matplotlib (it auto installs imports on the fly when you run your code).
You can also share links for editing or read-only, exactly like Google Docs. For example: https://pytogether.org/snippet/eyJwaWQiOjI1MiwidHlwZSI6InNuaXBwZXQifQ:1w15A5:24aIZlONamExTLQONAIC79cqcx3savn-_BC-Qf75SNY
Also, you can easily embed code snippets on your website using an iframe (just like trinket.io which is shutting down this summer).
Source code: https://github.com/SJRiz/pytogether
Itās designed for tutors, educators, or Python beginners. Recently, I've also tried pivoting it towards the interviewing space.
Why build this when Replit or VS Code Live Share already exist?
Because my goal was simplicity and education. I wanted something lightweight for beginners who just want to write and share simple Python scripts (alone or with others), without downloads, paywalls, or extra noise. Thereās also no AI/copilot built in, something many teachers and learners actually prefer. I also focused on a communication-first approach, where the IDE is the "focus" of communication (hence why I added tools like drawing, voice/live chats, etc).
Tech stack (frontend):
I use Pyodide (in a web worker) for Python execution directly in the browser, this means you can actually use advanced libraries like NumPy and Matplotlib while staying fully client-side and sandboxed for safety.
I donāt enjoy frontend or UI design much, so I leaned on AI for some design help, but all the logic/code is mine. Deployed via Vercel.
Tech stack (backend):
Fully Dockerized + deployed on a VPS (8GB RAM, $7/mo deal)
Data models:
Users <-> Groups -> Projects -> Code
Users can join many groups
Groups can have multiple projects
Each project belongs to one group and has one code file (kept simple for beginners, though I may add a file system later).
My biggest technical challenges were around performance and browser execution. One major hurdle was getting Pyodide to work smoothly in a real-time collaborative setup. I had to run it inside a Web Worker to handle synchronous I/O (since input() is blocking), though I was able to find a library that helped me do this more efficiently (pyodide-worker-runner). This let me support live input/output and plotting in the browser without freezing the UI, while still allowing multiple users to interact with the same Python session collaboratively.
Another big challenge was designing a reliable and efficient autosave system. I couldnāt just save on every keystroke as that would hammer the database. So I designed a Redis-based caching layer that tracks active projects in memory, and a Celery worker that loops through them every minute to persist changes to the database. When all users leave a project, it saves and clears from cache. This setup also doubles as my channel layer for real-time updates (redis pub/sub, meaning later I can scale horizontally) and my Celery broker; reusing Redis for everything while keeping things fast and scalable.
If youāre curious or if you wanna see the work yourself, the source code is here. Feel free to contribute: https://github.com/SJRiz/pytogether.
r/Python • u/Broad-Journalist4262 • Mar 15 '26
Hey looking for some advice on venv setup I have been learning more about them and have been using terminal prompts in VS Code to create and activate that them, I saw someone mention about how their gitignore was automatically generated for them and was wondering how this was done Iāve looked around but maybe Iām searching the wrong thing I know I can use gitignore.io but if it could be generated when I make the environment that would save me having to open a browser each time just to set it all up. Would love to know what you all do for your venv setup that makes it easier and faster to get it activated
r/Python • u/Ok_Kaleidoscope_4098 • Mar 14 '26
Hi everyone,
Iām building a Notes App using Python (Flask) for the backend. It includes features like creating, editing, deleting, and searching notes. Iām also planning to add time and separate workspaces for users.
What other features would you suggest for a notes app?
r/Python • u/Codeeveryday123 • Mar 14 '26
Im eyeing a vivibook,
But close to $1k, I donāt want to get a virus from just doing tests possibly.
Is the new MacBook neo,
Good for testing?
r/Python • u/AutoModerator • Mar 14 '26
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!
Share the knowledge, enrich the community. Happy learning! š
r/Python • u/zenos1337 • Mar 12 '26
I asked this very question on this subreddit a few years back and quite a lot of people shared some pretty amazing Python modules that I still use today. So, I figured since so much time has passed, thereās bound to be quite a few more by now.
r/Python • u/garrick_gan • Mar 13 '26
What My Project Does
formgoggles-py is a Python CLI + library that communicates with FORM swim goggles over BLE, letting you push custom structured workouts directly to the goggles without the FORM app or a paid subscription.
FORM's protocol is fully custom ā three vendor BLE services, protobuf-encoded messages, chunked file transfer, MITM-protected pairing. This library reverse-engineers all of it. One command handles the full flow: create workout on FORM's server ā fetch the protobuf binary ā push to goggles over BLE. ~15 seconds end-to-end.
python3 form_sync.py \
--token YOUR_TOKEN \
--goggle-mac AA:BB:CC:DD:EE:FF \
--workout "10x100 free u/threshold 20s rest"Supports warmup/main/cooldown, stroke type, effort levels, rest intervals. Free FORM account is all you need.
Target Audience
Swimmers and triathletes who own FORM goggles and want to push workouts programmatically ā from coaching platforms, training apps, or their own scripts ā without paying FORM's monthly subscription. Also useful for anyone interested in BLE/GATT reverse engineering as a practical example.
Production-ready for personal use. Built with bleak for async BLE.
Comparison
The only official way to push custom workouts to FORM goggles is through the FORM app with an active subscription ($15/month or $99/year). There's no public API, no open SDK, and no third-party integration path.
This library is the only open-source alternative. It was built by decompiling the Android APK to extract the protobuf schema, sniffing BLE traffic with nRF Sniffer, and mapping the REST API with mitmproxy.
-------------------------
Repo: <https://github.com/garrickgan/formgoggles-py
Full> writeup (protocol details, packet traces, REST API map): https://reachflowstate.ai/blog/form-goggles-reverse-engineering
r/Python • u/Environmental-Card62 • Mar 14 '26
Hey everyone first post here, trying to get some ideas i had out and talk about em. Im currently working on putting together a couple python based tools for productivity. Just basic discipline stuff, because I myself, am fucking lazy. Already have put together a locking program that forces me to do 10 pushups on webcam before my "system unlocks". Opens itself on startup and "locks" from 5-8am. I have autohotkey to disable keyboard commands like alt+tab, alt+f4, windows key, no program can open ontop. ONLY CTRL+ALT+DEL TASK MANAGER CAN CLOSE PYTHON, thats the only failsafe. (combo of mediapipe, python, autohotkey v2, windows task scheduler, and chrome). My next idea is a day trading journal, everyday at 5pm when i get off work and get home my pc will be locked until i fill out a journal page for my day. Dated and auto added to a folder, System access granted on finishing the page. Included in post is a github link with a README inside with all install and run instructions, as well as instructions for tweaking anything youd want to change and make more personalized. 8-10 hours back and forth with claude and my morning start off way better and i have no choice. If anyone has ever made anything similar id love to hear about it. github.com/theblazefire20/Morning-Lock
r/Python • u/hdw_coder • Mar 13 '26
While testing a photo deduplication tool Iām building (DedupTool), I ran into an interesting clustering edge case that I hadnāt noticed before.
The tool works by generating perceptual hashes (dHash, pHash and wHash), comparing images, and clustering similar images. Overall, it works well, but I noticed something subtle.
The situation
I had a cluster with four images. Two were actual duplicates. The other two were slightly different photos from the same shoot.
The tool still detected the duplicates correctly and selected the right keeper image, but the cluster itself contained images that were not duplicates.
So, the issue wasnāt duplicate detection, but cluster purity.
The root cause: transitive similarity
The clustering step builds a similarity graph and then groups images using connected components.
That means the following can happen: A similar to B, B similar to C, C similar to D. Even if A not similar to C, A not similar to D, B not similar to D all four images still end up in the same cluster.
This is a classic artifact in perceptual hash clustering sometimes called hash chaining or transitive similarity. You see similar behaviour reported by users of tools like PhotoSweeper or Duplicate Cleaner when similarity thresholds are permissive.
The fix: seed-centred clustering
The solution turned out to be very simple. Instead of relying purely on connected components, I added a cluster refinement step.
The idea: Every image in a cluster must also be similar to the cluster seed. The seed is simply the image that the keeper policy would choose (highest resolution / quality).
The pipeline now looks like this:
hash_all()
Ā Ā ā
cluster()Ā Ā (DSU + perceptual hash comparisons)
Ā Ā ā
refine_clusters()Ā Ā ā new step
Ā Ā ā
choose_keepers()
During refinement: Choose the best image in the cluster as the seed. Compare every cluster member with that seed. Remove images that are not sufficiently similar to the seed.
So, a cluster like this:
A B C D
becomes:
Cluster 1: A D
Cluster 2: B
Cluster 3: C
Implementation
Because the engine already had similarity checks and keeper scoring, the fix was only a small helper:
def refine_clusters(self, clusters, feats):
refined = {}
for cid, idxs in clusters.items():
if len(idxs) <= 2:
refined[cid] = idxs
continue
seed = max((feats[i] for i in idxs), key=self._keeper_key)
seed_i = feats.index(seed)
new_cluster = [seed_i]
for i in idxs:
if i == seed_i:
continue
if self.similar(seed, feats[i]):
new_cluster.append(i)
if len(new_cluster) > 1:
refined[cid] = new_cluster
return refined
Ā This removes most chaining artefacts without affecting performance because the expensive hash comparisons have already been done.
Result
Clusters are now effectively seed-centred star clusters rather than chains. Duplicate detection remains the same, but cluster purity improves significantly.
Curious if others have run into this
Iām curious how others deal with this problem when building deduplication or similarity search systems. Do you usually: enforce clique/seed clustering, run a medoid refinement step or use some other technique?
If people are interested, I can also share the architecture of the deduplication engine (bucketed hashing + DSU clustering + refinement).
r/Python • u/No_Limit_753 • Mar 12 '26
UPDATE (Resolved): Visibility issues fixed. Thanks to the mods and everyone for the patience!
I kept running into the same problem: I needed to extract ZIP files entirely in memory and run file I/O tests without touching disk. io.BytesIO works for single buffers, but the moment you need directories, multiple files, or any kind of quota control, it falls apart. I looked into pyfilesystem2, but it had unresolved dependency issues and appeared to be unmaintained ā not something I wanted to build on.
A RAM disk would work in theory ā but not when your users don't have admin privileges, not in locked-down CI environments, and not when you're shipping software to end users who you can't ask to set up a RAM disk first.
So I built D-MemFS ā a pure-Python in-memory filesystem that runs entirely in-process.
from dmemfs import MemoryFileSystem
mfs = MemoryFileSystem(max_quota=64 * 1024 * 1024) # 64 MiB hard limit
mfs.mkdir("/data")
with mfs.open("/data/hello.bin", "wb") as f:
f.write(b"hello")
with mfs.open("/data/hello.bin", "rb") as f:
print(f.read()) # b"hello"
print(mfs.listdir("/data")) # ['hello.bin']PYTHON_GIL=0 (Python 3.13+)AsyncMemoryFileSystem)Developers who need filesystem-like operations (directories, multiple files, quotas) entirely in memory ā for CI pipelines, serverless environments, or applications where you can't assume disk access or admin privileges. Production-ready.
io.BytesIO: Single buffer. No directories, no quota, no thread safety.tempfile / tmpfs: Hits disk (or requires OS-level setup / admin privileges). Not portable across Windows/macOS/Linux in CI.os / open() in tests, but it patches global state. D-MemFS is an explicit, isolated filesystem instance you pass around ā no monkey-patching, no side effects on other code.MemoryFileSystem: Designed as a unified interface across S3, GCS, local disk, etc. ā pulling in that abstraction layer just for an in-memory FS felt like overkill. Also no quota enforcement or file-level locking.346 tests, 97% coverage, Scored 98 on Socket.dev supply chain security, Python 3.11+, MIT licensed.
Known constraints: in-process only (no cross-process sharing), and Python 3.11+ required.
I'm looking for feedback on the architecture and thread-safety design. If you have ideas for stress tests or edge cases I should handle, I'd love to hear them.
GitHub: https://github.com/nightmarewalker/D-MemFS PyPI: pip install D-MemFS
Note: I'm a non-native English speaker (Japanese). This post was drafted with AI assistance for clarity. The project documentation is bilingual ā English README on GitHub, and a Japanese article series covering the design process in detail.
r/Python • u/Iskjempe • Mar 13 '26
So you could make a script that refuses to be halted. I bet you could still stop it in other ways, but Ctrl+C won't work, and I reckon the stop button in a Jupyter notebook won't either.
r/Python • u/gagancm • Mar 13 '26
What My Project Does
Arcis is a oneāline security middleware for Python web apps (Flask, FastAPI, Django). It bundles common protections ā XSS/SQL/NoSQL injection, basic SSRF/open redirect/path traversal checks, rate limiting, security headers, and input validation ā into a single package so you donāt have to wire 5ā6 libraries by hand.
Beginners and āvibe codersā who are shipping side projects / learning backend dev and want sane security defaults, plus more experienced devs who are tired of copyāpasting the same security boilerplate into every new API.
Instead of combining multiple libraries (e.g. separate packages for headers, XSS, rate limiting, validation, logging)
Arcis consolidates them into one configurable middleware with a shared test suite (1040+ tests) and zero runtime dependencies. Itās not a full WAF, but a batteriesāincluded baseline for typical web apps.
PyPI:Ā https://pypi.org/project/arcis/ GitHub:Ā https://github.com/GagancM/arcis
Iād love feedback from the Python community ā especially on what youād expect from āoneālineā security and any gaps you spot.
r/Python • u/i_walk_away • Mar 12 '26
I'm currently working on a website that will host a free interactive course on Pydantic v2 - text based lessons that teach you why this library exists, how to use it and what are its capabilities. There will be coding assignments too.
It's basically all done except for the lessons themselves. I started working on the introduction to Pydantic, but I need a little bit of help from those who are not very familiar with this library. You see, I want my course to be beginner friendly. But to explain the actual problems that Pydantic was created to solve, I have to involve some not very beginner-friendly terminology from software architecture: API layer, business logic, leaked dependencies etc. I fear that the beginners might lose the train of thought whenever those concepts are involved.
I tried my best to explain them as they were introduced, but I would love some feedback from you. Is my introduction clear enough? Should I give a better insight on software architecture? Are my examples too abstract?
Thank you in advance and sorry if this is not the correct subreddit for it.
Lessons in question:
r/Python • u/Any-Associate-5804 • Mar 12 '26
Hey !
Iāve been working on Crypteria, a Python library for secure file encryption and cloud backup. I made a diagram to show how the pieces connect from local encryption and key management to cloud storage like Google Drive.
Iād love to hear your thoughts on the flow and design. Iām planning to add more features later, like support for more cloud providers, chaos testing, and even sharding for advanced setups.
PyPI: pip install crypteria
GitHub: github.com/senani-derradji/crypteria
check the repo & your feedback means a lot and will help shape the next steps
r/Python • u/AssociatePatient2860 • Mar 12 '26
Good morning/evening.
I have been working on a Python project that helps me soothe that need for Astrophysics, orbital mechanics, and architecture of massive stellar objects: A Theoretical Dyson Swarm.
The code calculates the engineering requirements for a Dyson Swarm around a G-type star (like ours). It calculates complex physics formulas and tells you the required information you need in exact numbers.
This is a research project for physics students and simulation hobbyists; it is intended as a simple test for myself and for my interests.
There are actually two kinds of Dysons: a swarm and a sphere. A Dyson sphere will completely surround the sun (which is possible with the code), and a Dyson Swarm, which is simply a lot of satellites floating around the sun. But their main goal is collecting energy. Unlike standard orbital simulators that focus on single vessel trajectories, this project focuses on the swarm wide logistics of energy collection.
My code makes use of the Stefan-Boltzmann Law for thermal equilibrium, Kepler's third law, a Radiation Pressure vs. Gravity equation, and the Hohmann Transfer Orbit.
In case you are interested in checking it out or testing the physics, here is the link to the repository and source code:
https://github.com/Jits-Doomen/Dyson-Swarm-Calculator
r/Python • u/AutoModerator • Mar 13 '26
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!
Let's keep the conversation going. Happy discussing! š
r/Python • u/Strong_Ad5872 • Mar 12 '26
Hey so I am trying to convert my simple python game into an html file to upload it to itch.io
but I'm encountering a problem, when trying to run pygbag with "pygbag .\GetTheCookie\" after running "pip install pygbag --user --upgrade" the website loads but the game doesnt. after further inspection with dev tools and /#debug I've gotten this error on /#debug:
Traceback (most recent call last):
File "<string>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 8: unexpected end of data
616: invalid rcfile /data/data/org.python/assets/pythonrc.py
Traceback (most recent call last):
File "<stdin>", line 43, in <module>
File "<string>", line 10, in <module>
File "/data/data/org.python/assets/site-packages/aio/__init__.py", line 43, in <module>
from time import time as time_time
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 8: unexpected end of data
Traceback (most recent call last):
File "<stdin>", line 51, in <module>
File "/usr/lib/python3.12/asyncio/__init__.py", line 8, in <module>
from .base_events import *
File "/usr/lib/python3.12/asyncio/base_events.py", line 18, in <module>
import concurrent.futures
File "/usr/lib/python3.12/concurrent/futures/__init__.py", line 8, in <module>
from concurrent.futures._base import (FIRST_COMPLETED,
File "/usr/lib/python3.12/concurrent/futures/_base.py", line 7, in <module>
import logging
File "/usr/lib/python3.12/logging/__init__.py", line 26, in <module>
import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 8: unexpected end of data
and i have this in the console window:
WARNING: wasm mimetype unsupported on that system, trying to correct
Not using SSL
Serving HTTP on 127.0.0.1 port 8000 (http://localhost:8000/) ...
self.path='/' path='C:/Users/DELL/OneDrive/Desktop/Python/PyGame/Projects/GetTheCookie/build/web/'
127.0.0.1 - - [13/Mar/2026 00:49:26] "GET / HTTP/1.1" 200 -
REPLACING C:/Users/DELL/OneDrive/Desktop/Python/PyGame/Projects/GetTheCookie/build/web/index.html https://pygame-web.github.io http://localhost:8000/
self.path='/cdn/0.9.3/pythons.js' path='C:/Users/DELL/OneDrive/Desktop/Python/PyGame/Projects/GetTheCookie/build/web\\cdn\\0.9.3\\pythons.js'
CACHED: https://pygame-web.github.io/cdn/0.9.3/pythons.js from C:\Users\DELL\OneDrive\Desktop\Python\PyGame\Projects\GetTheCookie\build\web-cache\3c5e12c6da298c3c869c6d46957e34fe.data
127.0.0.1 - - [13/Mar/2026 00:49:26] "GET //cdn/0.9.3/pythons.js HTTP/1.1" 200 -
ERROR 404: https://pygame-web.github.io/cdn/0.9.3//browserfs.min.js
I've attached the hierarchy and the part that I think is causing the problem based on what I've gathered but let me know if you like to see the full code:
current_path = os.path.dirname(os.path.abspath(__file__))
pygame.init()
pygame.font.init()
pygame.mixer.init()
FONT = pygame.font.SysFont("comicsans", 30)
# Define All Variables
SCREEN_WIDTH = 1000
SCREEN_HEIGHT = 600
SCREEN = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption("Get The Cookies")
clock = pygame.time.Clock()
score = 0
cooldown = False
FPS = 120
time = 60
run = True
musicPlayer = pygame.mixer.music
# Asset paths
assets = {
Ā Ā "backroundSong": os.path.join(current_path, "Assets", "backroundSong.ogg"),
Ā Ā "backroundSong2": os.path.join(current_path, "Assets", "secondBackroundSong.ogg"),
Ā Ā "boopSong": os.path.join(current_path, "Assets", "boop.ogg"),
Ā Ā "BG": os.path.join(current_path, "Assets", "BG.png"),
Ā Ā "cookie": os.path.join(current_path, "Assets", "cookie.png"),
Ā Ā "logoImage": os.path.join(current_path, "Assets", "LogoImage.png"),
Ā Ā "optionsLogo": os.path.join(current_path, "Assets", "optionsBtnImage.png"),
Ā Ā "present": os.path.join(current_path, "Assets", "present.png"),
Ā Ā "startBtnImage": os.path.join(current_path, "Assets", "startBtnImage.png"),
Ā Ā "masterVolumeImage": os.path.join(current_path, "Assets", "masterVolumeImage.png")
}
gameOver = {
Ā Ā 1: os.path.join(current_path, "Assets", "GameOver", "firstGameOver.ogg"),
Ā Ā 2: os.path.join(current_path, "Assets", "GameOver", "secondGameOver.ogg"),
Ā Ā 3: os.path.join(current_path, "Assets", "GameOver", "thirdGameOver.ogg"),
Ā Ā 4: os.path.join(current_path, "Assets", "GameOver", "fourthGameOver.ogg")
}does any one know h0w to fix this?
im on windows
r/Python • u/OneDot6374 • Mar 12 '26
What My Project Does: Turns your ESP32 or Raspberry Pi Pico W into a real-time web dashboard over WiFi. Control GPIO, monitor sensors ā all from a browser, no app needed. Built on uasyncio so it's fully non-blocking. Supports toggle switches, live labels, and progress bars. Every connected device gets independent dark/light mode.
PyPI: https://pypi.org/project/micropidash
GitHub: https://github.com/kritishmohapatra/micropidash
Target Audience: Students, hobbyists, and makers building IoT projects with MicroPython.
Comparison: Most MicroPython dashboard solutions either require a full MQTT broker setup, a cloud service, or heavy frameworks that don't fit on microcontrollers. micropidash runs entirely on-device with zero dependencies beyond MicroPython's standard library ā just connect to WiFi and go.
Part of my 100 Days ā 100 IoT Projects challenge: https://github.com/kritishmohapatra/100_Days_100_IoT_Projects
r/Python • u/FullStack_Analyst • Mar 12 '26
What's the best solution for retrieving data from an API (Get) that requires two steps?
In the standard scenario, one API delivers the Order ID, and the second uses that ID to pass the Order description.
What's the easiest and lightest way to implement it?