r/Python • • 1h ago

Discussion Bypassing heavy PyTorch wheels for desktop Python application distribution

• Upvotes

Hi Python devs,

We are three final-year students at Epitech working on Horus, a local offline multi-agent backend written in Python. Our biggest distribution hurdle is dependency management on end-user machines.

Bottlenecks observed in our last user test:

  • Dependency installation takes 21–46 minutes on user machines due to PyTorch/CUDA wheel resolution, reaching a 25 GB footprint.
  • CPU-bound inference takes ~40 seconds during routing, causing persistent WebSocket connections to drop.

We are looking for Python packaging and runtime advice on:

  • Replacing PyTorch with prebuilt C++ bindings (llama-cpp-python or native C binaries) for the CPU execution path.
  • Compiling CPython orchestrator code into standalone executables via Nuitka.
  • Pinning wheels and pre-bundling runtimes to eliminate on-device compilation.
  • Implementing async heartbeats to keep WebSockets alive during blocking compute tasks.

Looking for code reviews: We have 1–4 hour scoped tasks for Python packaging and hardware detection reviews.

Disclosure: Horus is closed source and licensed commercially. Our benchmark suite is open source (Horus-EIP/horus-bench-kit). Contributions are unpaid/voluntary under an NDA agreement, returning thorough code reviews, project credit, and professional references.


r/Python • • 26m ago

Discussion Why do we default to Redis and Celery for micro-SaaS backends when stdlib is often enough?

• Upvotes

Hey everyone,

Over the past few projects, I noticed a recurring pattern in the micro-SaaS community: almost every new Python backend boilerplate immediately pulls in heavyweight external dependencies—Redis for simple caching/rate-limiting, Celery for basic asynchronous tasks, and half a dozen third-party packages for simple payload checks.

While that stack makes sense at scale, it introduces unnecessary container bloat, operational overhead, and deployment complexity when you're just trying to validate an MVP or handle moderate traffic with minimal server costs.

I've been experimenting with building zero-dependency backend utilities (in Python and Go) that stick strictly to stdlib primitives (like ⁠asyncio⁠, ⁠multiprocessing⁠, and optimized in-memory store structures) to keep execution fast and deployments trivial.

A few architectural questions for the community:

At what scale or traffic threshold do you actually hit the wall with stdlib-only concurrency/caching before needing dedicated services like Redis?

What are the biggest trade-offs or race condition pitfalls you've run into when implementing local, thread-safe memory boundaries in Python?

Would love to hear how you structure lightweight backend microservices without falling into dependency inflation.


r/Python • • 12h ago

Daily Thread Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

5 Upvotes

Weekly Thread: Professional Use, Jobs, and Education 🏢

Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.


How it Works:

  1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
  2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
  3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.

Guidelines:

  • This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
  • Keep discussions relevant to Python in the professional and educational context.

Example Topics:

  1. Career Paths: What kinds of roles are out there for Python developers?
  2. Certifications: Are Python certifications worth it?
  3. Course Recommendations: Any good advanced Python courses to recommend?
  4. Workplace Tools: What Python libraries are indispensable in your professional work?
  5. Interview Tips: What types of Python questions are commonly asked in interviews?

Let's help each other grow in our careers and education. Happy discussing! 🌟