We just launched Leapcell, deploy 20 Python websites for free
hi r/Python
Back then, I often had to pull the plug on side projects built with Python, the hosting bills and upkeep just weren’t worth it. They ended up gathering dust on GitHub.
That’s why we created **Leapcell**: a platform designed so your Python ideas can stay alive without getting killed by costs in the early stage.
**Deploy up to 20 Python websites or services for free (included in our free tier)**
Most PaaS platforms give you a single free VM (like the old Heroku model), but those machines often sit idle. Leapcell takes a different approach: with a serverless container architecture, we fully utilize compute resources and let you host multiple services simultaneously. While other platforms only let you run one free project, Leapcell lets you run up to **20 Python apps** for free.
And it’s not just websites, your Python stack can include:
* Web APIS: Django, Flask, FastAPI
* Data & automation: Playwright-based crawlers
* APIs & microservices: lightweight REST or GraphQL services
We were inspired by platforms like Vercel (multi-project hosting), but Leapcell goes further:
* **Multi-language support:** Django, Node.js, Go, Rust.
* **Two compute modes**
* ***Serverless***: cold start < 250ms, autoscaling with traffic (perfect for early-stage Django apps).
*
/r/Python
https://redd.it/1nnh6g0
hi r/Python
Back then, I often had to pull the plug on side projects built with Python, the hosting bills and upkeep just weren’t worth it. They ended up gathering dust on GitHub.
That’s why we created **Leapcell**: a platform designed so your Python ideas can stay alive without getting killed by costs in the early stage.
**Deploy up to 20 Python websites or services for free (included in our free tier)**
Most PaaS platforms give you a single free VM (like the old Heroku model), but those machines often sit idle. Leapcell takes a different approach: with a serverless container architecture, we fully utilize compute resources and let you host multiple services simultaneously. While other platforms only let you run one free project, Leapcell lets you run up to **20 Python apps** for free.
And it’s not just websites, your Python stack can include:
* Web APIS: Django, Flask, FastAPI
* Data & automation: Playwright-based crawlers
* APIs & microservices: lightweight REST or GraphQL services
We were inspired by platforms like Vercel (multi-project hosting), but Leapcell goes further:
* **Multi-language support:** Django, Node.js, Go, Rust.
* **Two compute modes**
* ***Serverless***: cold start < 250ms, autoscaling with traffic (perfect for early-stage Django apps).
*
/r/Python
https://redd.it/1nnh6g0
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Why Django is the best backend framework for the startup and mvp projects ?
I’m a startupper. I really like using Django for this kind of projects. It’s too fast and comfortable to develop. Why do you choose Django for the MVPs ? How Django’s helped you to solve your problems ?
/r/django
https://redd.it/1nno0uk
I’m a startupper. I really like using Django for this kind of projects. It’s too fast and comfortable to develop. Why do you choose Django for the MVPs ? How Django’s helped you to solve your problems ?
/r/django
https://redd.it/1nno0uk
Reddit
From the django community on Reddit
Explore this post and more from the django community
D&D Twitch bot: Update 2!
Hello! So I posted awhile back that I was making a cool twitch bot for my chatters themed on D&D and wanted to post another update here! (OG post) https://www.reddit.com/r/Python/comments/1mt2srw/dd\_twitch\_bot/
My most current updates have made some major strides!
1.) Quests now auto generate quest to quest, evolving over time at checkpoints and be much more in depth overall. Giving chatters a better story, while also allowing them multiple roll options with skill rolls tied into each class. (Things like barbarians are bad at thinking, but great at smashing! So they might not be the best at a stealth mission in a China shop...)
2.) The bot now recognizes new chatters and greets them with fanfare and a little "how to" so they are not so confused when they first arrive. And the alert helps so I know they are a first time chatter!
3.) I got all the skill rolls working, and now they are showing and updated in real time on the display. That way chatters can see at all times which skills are the best for this adventure they are on!
4.) Bosses now display across
/r/Python
https://redd.it/1nnwn2h
Hello! So I posted awhile back that I was making a cool twitch bot for my chatters themed on D&D and wanted to post another update here! (OG post) https://www.reddit.com/r/Python/comments/1mt2srw/dd\_twitch\_bot/
My most current updates have made some major strides!
1.) Quests now auto generate quest to quest, evolving over time at checkpoints and be much more in depth overall. Giving chatters a better story, while also allowing them multiple roll options with skill rolls tied into each class. (Things like barbarians are bad at thinking, but great at smashing! So they might not be the best at a stealth mission in a China shop...)
2.) The bot now recognizes new chatters and greets them with fanfare and a little "how to" so they are not so confused when they first arrive. And the alert helps so I know they are a first time chatter!
3.) I got all the skill rolls working, and now they are showing and updated in real time on the display. That way chatters can see at all times which skills are the best for this adventure they are on!
4.) Bosses now display across
/r/Python
https://redd.it/1nnwn2h
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
python-cq — Lightweight CQRS package for async Python projects
# What My Project Does
[`python-cq`](https://github.com/100nm/python-cq) is a package that helps apply CQRS principles (Command Query Responsibility Segregation) in async Python projects.
The core idea of CQRS is to separate:
* **Commands** → actions that change the state of the system.
* **Queries** → operations that only read data, without side effects.
* **Events** → facts that describe something that happened, usually triggered by commands.
With `python-cq`, handlers for commands, queries, and events are just regular Python classes decorated with `@command_handler`, `@query_handler`, or `@event_handler`.
The framework automatically detects which message type is being handled based on type hints, no need to inherit from base classes or write boilerplate.
It also integrates with dependency injection through [`python-injection`](https://github.com/100nm/python-injection), which makes it easier to manage dependencies between handlers.
Example:
```python
from dataclasses import dataclass
from injection import inject
from cq import CommandBus, RelatedEvents, command_handler, event_handler
@dataclass
class UserRegistrationCommand:
email: str
password: str
@dataclass
class UserRegistered:
user_id: int
email: str
@command_handler
class UserRegistrationHandler:
def __init__(self, events: RelatedEvents):
self.events = events
async def handle(self, command: UserRegistrationCommand):
""" register the user """
user_id = ...
/r/Python
https://redd.it/1nnimms
# What My Project Does
[`python-cq`](https://github.com/100nm/python-cq) is a package that helps apply CQRS principles (Command Query Responsibility Segregation) in async Python projects.
The core idea of CQRS is to separate:
* **Commands** → actions that change the state of the system.
* **Queries** → operations that only read data, without side effects.
* **Events** → facts that describe something that happened, usually triggered by commands.
With `python-cq`, handlers for commands, queries, and events are just regular Python classes decorated with `@command_handler`, `@query_handler`, or `@event_handler`.
The framework automatically detects which message type is being handled based on type hints, no need to inherit from base classes or write boilerplate.
It also integrates with dependency injection through [`python-injection`](https://github.com/100nm/python-injection), which makes it easier to manage dependencies between handlers.
Example:
```python
from dataclasses import dataclass
from injection import inject
from cq import CommandBus, RelatedEvents, command_handler, event_handler
@dataclass
class UserRegistrationCommand:
email: str
password: str
@dataclass
class UserRegistered:
user_id: int
email: str
@command_handler
class UserRegistrationHandler:
def __init__(self, events: RelatedEvents):
self.events = events
async def handle(self, command: UserRegistrationCommand):
""" register the user """
user_id = ...
/r/Python
https://redd.it/1nnimms
GitHub
GitHub - 100nm/python-cq: Lightweight CQRS library for async Python projects.
Lightweight CQRS library for async Python projects. - 100nm/python-cq
Tuesday Daily Thread: Advanced questions
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1no2n2e
# Weekly Wednesday Thread: Advanced Questions 🐍
Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.
## How it Works:
1. **Ask Away**: Post your advanced Python questions here.
2. **Expert Insights**: Get answers from experienced developers.
3. **Resource Pool**: Share or discover tutorials, articles, and tips.
## Guidelines:
* This thread is for **advanced questions only**. Beginner questions are welcome in our [Daily Beginner Thread](#daily-beginner-thread-link) every Thursday.
* Questions that are not advanced may be removed and redirected to the appropriate thread.
## Recommended Resources:
* If you don't receive a response, consider exploring r/LearnPython or join the [Python Discord Server](https://discord.gg/python) for quicker assistance.
## Example Questions:
1. **How can you implement a custom memory allocator in Python?**
2. **What are the best practices for optimizing Cython code for heavy numerical computations?**
3. **How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?**
4. **Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?**
5. **How would you go about implementing a distributed task queue using Celery and RabbitMQ?**
6. **What are some advanced use-cases for Python's decorators?**
7. **How can you achieve real-time data streaming in Python with WebSockets?**
8. **What are the
/r/Python
https://redd.it/1no2n2e
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Append-only time-series storage in pure Python: Chronostore (faster than CSV & Parquet)
# What My Project Does
*Chronostore* is a fast, append-only binary time-series storage engine for Python. It uses schema-defined daily files with memory-mapped zero-copy reads compatible with Pandas and NumPy. (supported backends: flat files or LMDB)
In benchmarks (10M rows of 4 float64 columns), *Chronostore* wrote in `~0.43 s` and read in `~0.24 s,` vastly outperforming CSV (`58 s` write, `7.8 s` read) and Parquet (`~2 s` write, `~0.44 s` read).
Key features:
* Schema-enforced binary storage
* Zero-copy reads via mmap / LMDB
* Daily file partitioning, append-only
* Pure Python, easy to install and integrate
* Pandas/NumPy compatible
Limitations:
* No concurrent write support
* Lacks indexing or compression
* Best performance on SSD/NVMe hardware
# Links
* 👉 [The GitHub repo](https://github.com/rundef/chronostore)
if you find it useful, a ⭐ would be amazing!
# Why I Built It
I needed a simple, minimal and high-performance local time-series store that integrates cleanly with Python data tools. Many existing solutions require servers, setup, or are too heavy. *Chronostore* is lightweight, fast, and gives you direct control over your data layout
# Target audience
* Python developers working with **IoT, sensor, telemetry, or financial tick data**
* Anyone needing **schema-controlled, high-speed local time-series persistence**
* Developers who want **fast alternatives to CSV or Parquet for time-series data**
* Hobbyists and students exploring **memory-mapped I/O
/r/Python
https://redd.it/1nnn35x
# What My Project Does
*Chronostore* is a fast, append-only binary time-series storage engine for Python. It uses schema-defined daily files with memory-mapped zero-copy reads compatible with Pandas and NumPy. (supported backends: flat files or LMDB)
In benchmarks (10M rows of 4 float64 columns), *Chronostore* wrote in `~0.43 s` and read in `~0.24 s,` vastly outperforming CSV (`58 s` write, `7.8 s` read) and Parquet (`~2 s` write, `~0.44 s` read).
Key features:
* Schema-enforced binary storage
* Zero-copy reads via mmap / LMDB
* Daily file partitioning, append-only
* Pure Python, easy to install and integrate
* Pandas/NumPy compatible
Limitations:
* No concurrent write support
* Lacks indexing or compression
* Best performance on SSD/NVMe hardware
# Links
* 👉 [The GitHub repo](https://github.com/rundef/chronostore)
if you find it useful, a ⭐ would be amazing!
# Why I Built It
I needed a simple, minimal and high-performance local time-series store that integrates cleanly with Python data tools. Many existing solutions require servers, setup, or are too heavy. *Chronostore* is lightweight, fast, and gives you direct control over your data layout
# Target audience
* Python developers working with **IoT, sensor, telemetry, or financial tick data**
* Anyone needing **schema-controlled, high-speed local time-series persistence**
* Developers who want **fast alternatives to CSV or Parquet for time-series data**
* Hobbyists and students exploring **memory-mapped I/O
/r/Python
https://redd.it/1nnn35x
GitHub
GitHub - rundef/chronostore: Fast binary time series store for Python. No DB, no server, just mmap.
Fast binary time series store for Python. No DB, no server, just mmap. - rundef/chronostore
S3Ranger - A TUI for S3 and S3-like cloud storage built using Textual
### What My Project Does
I built s3ranger, a TUI to interact with S3 and S3-like cloud storage services. It’s built with Textual and uses boto3 + awscli under the hood.
While the AWS CLI already supports most of these operations, I wanted an actual interface on top of it that feels quick and easy to use.
Some things it can do that the standard S3 console doesn’t give you:
- Download a "folder" from S3
- Rename a "folder"
- Upload a "folder"
- Delete a "folder"
### Target Audience
This project is mainly for developers who:
- Use localstack or other S3-compatible services and want a simple UI on top
- Need to do batch/folder operations that the AWS S3 web UI doesn’t provide
- Like terminal-first tools (since this is a TUI, not a web app)
It’s not meant to replace the CLI or the official console, but rather to make repetitive/local workflows faster and more visual.
--
You can run it against localstack like this:
### GitHub Link
Repo: https://github.com/Sharashchandra/s3ranger
Any feedback is appreciated!
/r/Python
https://redd.it/1nnokzl
### What My Project Does
I built s3ranger, a TUI to interact with S3 and S3-like cloud storage services. It’s built with Textual and uses boto3 + awscli under the hood.
While the AWS CLI already supports most of these operations, I wanted an actual interface on top of it that feels quick and easy to use.
Some things it can do that the standard S3 console doesn’t give you:
- Download a "folder" from S3
- Rename a "folder"
- Upload a "folder"
- Delete a "folder"
### Target Audience
This project is mainly for developers who:
- Use localstack or other S3-compatible services and want a simple UI on top
- Need to do batch/folder operations that the AWS S3 web UI doesn’t provide
- Like terminal-first tools (since this is a TUI, not a web app)
It’s not meant to replace the CLI or the official console, but rather to make repetitive/local workflows faster and more visual.
--
You can run it against localstack like this:
s3ranger --endpoint-url http://localhost:4566 --region-name us-east-1
### GitHub Link
Repo: https://github.com/Sharashchandra/s3ranger
Any feedback is appreciated!
/r/Python
https://redd.it/1nnokzl
GitHub
GitHub - Textualize/textual: The lean application framework for Python. Build sophisticated user interfaces with a simple Python…
The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser. - Textualize/textual
The Proper Way to Switch Django Branches with Divergent Migrations (Avoid Data Loss!)
Hey everyone,
Just spent half a day untangling a database nightmare after switching git branches without thinking about migrations. Learned a hard lesson and wanted to share the proper, safe way to do this when your branches have different migration histories.
# The Problem (The "Oh No" Moment)
You're working on a feature branch (
Do NOT just delete your database or migrations. There's a better way.
# The Safe Fix: Migrate Backwards Before Switching
The core idea is to reverse your current branch's migrations to a common point before you switch git branches. This keeps your database schema aligned with the code you're about to run.
# Step-by-Step Guide
1. Find the Last Common Migration
Before switching, use
python manage.py showmigrations yourappname
You'll see a list with
2. Migrate Your Database Back to that Common State
This is the
/r/django
https://redd.it/1no2rai
Hey everyone,
Just spent half a day untangling a database nightmare after switching git branches without thinking about migrations. Learned a hard lesson and wanted to share the proper, safe way to do this when your branches have different migration histories.
# The Problem (The "Oh No" Moment)
You're working on a feature branch (
feature-branch) that has new migrations (e.g., 0004_auto_202310...). You need to quickly switch back to main to check something. You run git checkout main, start the server, and... BAM. DatabaseErrors galore. Your main branch's code expects the database to be at migration 0002, but it's actually at 0004 from your feature branch. The schema is out of sync.Do NOT just delete your database or migrations. There's a better way.
# The Safe Fix: Migrate Backwards Before Switching
The core idea is to reverse your current branch's migrations to a common point before you switch git branches. This keeps your database schema aligned with the code you're about to run.
# Step-by-Step Guide
1. Find the Last Common Migration
Before switching, use
showmigrations to see what's applied. Identify the last migration that exists on both your current branch and the target branch.python manage.py showmigrations yourappname
You'll see a list with
[X] for applied migrations. Find the highest-numbered migration that is present on both branches. Let's say it's 0002.2. Migrate Your Database Back to that Common State
This is the
/r/django
https://redd.it/1no2rai
Reddit
From the django community on Reddit
Explore this post and more from the django community
StringWa.rs: Which Libs Make Python Strings 2-10× Faster?
## What My Project Does
I've put together StringWa.rs — a benchmark suite for text and sequence processing in Python. It compares
## Target Audience
This is for Python developers working with text processing at any scale — whether you're parsing config files, building NLP pipelines, or handling large-scale bioinformatics data. If you've ever wondered why your string operations are bottlenecking your application, or if you're still using packages like NLTK for basic string algorithms, this benchmark suite will show you exactly what performance you're leaving on the table.
## Comparison
Many developers still rely on outdated packages like
Some surprising findings for native
`str.find` is about 10× slower than it can be
On 4
/r/Python
https://redd.it/1nocyn3
## What My Project Does
I've put together StringWa.rs — a benchmark suite for text and sequence processing in Python. It compares
str and bytes built-ins, popular third-party libraries, and GPU/SIMD-accelerated backends on common tasks like splitting, sorting, hashing, and edit distances between pairs of strings.## Target Audience
This is for Python developers working with text processing at any scale — whether you're parsing config files, building NLP pipelines, or handling large-scale bioinformatics data. If you've ever wondered why your string operations are bottlenecking your application, or if you're still using packages like NLTK for basic string algorithms, this benchmark suite will show you exactly what performance you're leaving on the table.
## Comparison
Many developers still rely on outdated packages like
nltk (with 38 M monthly downloads) for Levenshtein distances, not realizing the same computation can be 500× faster on a single CPU core or up to 160,000× faster on a high-end GPU. The benchmarks reveal massive performance differences across the ecosystem, from built-in Python methods to modern alternatives like my own StringZilla library (just released v4 under Apache 2.0 license after months of work).Some surprising findings for native
str and bytes:`str.find` is about 10× slower than it can be
On 4
/r/Python
https://redd.it/1nocyn3
GitHub
GitHub - ashvardanian/StringWars: Comparing performance-oriented string-processing libraries for substring search, multi-pattern…
Comparing performance-oriented string-processing libraries for substring search, multi-pattern matching, hashing, edit-distances, sketching, and sorting across CPUs and GPUs in Rust 🦀 and Python 🐍 ...
Suggest the best way to learn django
Hey guys. Im learning django on my own. I love to learn by building. But I'm facing lots of errors from django framework. Do you have any advice regarding that?
/r/django
https://redd.it/1no21k2
Hey guys. Im learning django on my own. I love to learn by building. But I'm facing lots of errors from django framework. Do you have any advice regarding that?
/r/django
https://redd.it/1no21k2
Reddit
From the django community on Reddit
Explore this post and more from the django community
AttributeError
AttributeError: 'tuple' object has no attribute 'items'
from decimal import Decimal
import os
import os.path as op
from datetime import datetime as dt
from sqlalchemy import Column, Integer, DateTime
from flask import Flask, render_template, send_from_directory, url_for, redirect, request
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.event import listens_for
from markupsafe import Markup
from flask_admin import Admin, form
from flask_admin.form import rules
from flask_admin.contrib import sqla, rediscli
from flask import session as login_session
from flask_login import UserMixin, LoginManager, login_user, logout_user, login_required
from flask_bcrypt import Bcrypt
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy.orm import Mapped
from sqlalchemy.orm import mapped_column
from sqlalchemy.orm import DeclarativeBase
from sqlalchemy.orm import relationship
from sqlalchemy import select
import operator
from werkzeug.utils import secure_filename
/r/flask
https://redd.it/1no9d91
AttributeError: 'tuple' object has no attribute 'items'
from decimal import Decimal
import os
import os.path as op
from datetime import datetime as dt
from sqlalchemy import Column, Integer, DateTime
from flask import Flask, render_template, send_from_directory, url_for, redirect, request
from flask_admin import Admin
from flask_admin.contrib.sqla import ModelView
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.event import listens_for
from markupsafe import Markup
from flask_admin import Admin, form
from flask_admin.form import rules
from flask_admin.contrib import sqla, rediscli
from flask import session as login_session
from flask_login import UserMixin, LoginManager, login_user, logout_user, login_required
from flask_bcrypt import Bcrypt
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy.orm import Mapped
from sqlalchemy.orm import mapped_column
from sqlalchemy.orm import DeclarativeBase
from sqlalchemy.orm import relationship
from sqlalchemy import select
import operator
from werkzeug.utils import secure_filename
/r/flask
https://redd.it/1no9d91
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Django learning advice for web app
I'm working on a healthcare web application project this semester using Django + React + PostgreSQL. My professor has outlined requirements like multi-role authentication system (patients, doctors, admins), appointment scheduling, medical records management, doctor dashboards, prescription handling, administrative features, plus JWT authentication, role-based permissions, data encryption, and security hardening against common vulnerabilities. Also some additional features such as medication reminders and medical image/file uploading.
I'm decent with Python but pretty new to Django, and my development experience is limited - mostly just a CRUD app from my database course. Given the scope and timeline(around 15 weeks), what are the best resources to learn the technologies for the project?
Also, any advice on the ideal approach for tackling a project of this scale? Should I focus on backend first, learn everything upfront, or take a more iterative approach?
/r/django
https://redd.it/1noq728
I'm working on a healthcare web application project this semester using Django + React + PostgreSQL. My professor has outlined requirements like multi-role authentication system (patients, doctors, admins), appointment scheduling, medical records management, doctor dashboards, prescription handling, administrative features, plus JWT authentication, role-based permissions, data encryption, and security hardening against common vulnerabilities. Also some additional features such as medication reminders and medical image/file uploading.
I'm decent with Python but pretty new to Django, and my development experience is limited - mostly just a CRUD app from my database course. Given the scope and timeline(around 15 weeks), what are the best resources to learn the technologies for the project?
Also, any advice on the ideal approach for tackling a project of this scale? Should I focus on backend first, learn everything upfront, or take a more iterative approach?
/r/django
https://redd.it/1noq728
Reddit
From the django community on Reddit
Explore this post and more from the django community
django-vite static assets being served but not loading on an Nginx deployment
hello everyone, I also posted this on the djangolearning sub but I've been fighting with this problem for 4 whole days and I'm desperate. I'm trying to deploy a simple project on a local ubuntu server VM using docker. I have three containers, Postgres, nginx and Django. I used a lot of HTMX and DaisyUI, and on my dev environment they worked really nicely being served by a Bun dev server and using django-vite, now that I'm deploying, everything works perfectly fine, except for the static assets generated by django-vite. The weirdest part is the files are being delivered to the clients but not loading correctly (the app renders but only the static assets collected by Django, like icons, are being displayed. If I check the network tab on my devtools i see the django-vite files are being served). Any idea what could be causing this?
Here is my vite.config.mjs
```
import { defineConfig } from "vite";
import { resolve } from "path";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
base: "/static/",
build: {
/r/django
https://redd.it/1nol7b1
hello everyone, I also posted this on the djangolearning sub but I've been fighting with this problem for 4 whole days and I'm desperate. I'm trying to deploy a simple project on a local ubuntu server VM using docker. I have three containers, Postgres, nginx and Django. I used a lot of HTMX and DaisyUI, and on my dev environment they worked really nicely being served by a Bun dev server and using django-vite, now that I'm deploying, everything works perfectly fine, except for the static assets generated by django-vite. The weirdest part is the files are being delivered to the clients but not loading correctly (the app renders but only the static assets collected by Django, like icons, are being displayed. If I check the network tab on my devtools i see the django-vite files are being served). Any idea what could be causing this?
Here is my vite.config.mjs
```
import { defineConfig } from "vite";
import { resolve } from "path";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
base: "/static/",
build: {
/r/django
https://redd.it/1nol7b1
Reddit
From the django community on Reddit
Explore this post and more from the django community
Trouble with deploying Python programs as internal tools?
Hi all I have been trying to figure out better ways to manage internal tooling. Wondering what are everyones biggest blockers / pain-points when attempting to take a python program, whether it be a simple script, web app, or notebook, and converting it into a usable internal tool at your company?
Could be sharing it, deploying to cloud, building frontend UI, refactoring code to work better with non-technical users, etc.
/r/Python
https://redd.it/1nomupo
Hi all I have been trying to figure out better ways to manage internal tooling. Wondering what are everyones biggest blockers / pain-points when attempting to take a python program, whether it be a simple script, web app, or notebook, and converting it into a usable internal tool at your company?
Could be sharing it, deploying to cloud, building frontend UI, refactoring code to work better with non-technical users, etc.
/r/Python
https://redd.it/1nomupo
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Real-Time BLE Air Quality data into Adafruit IO using python
This project shows how to turn a BleuIO USB dongle into a tiny gateway that streams live air-quality data from a HibouAir sensor straight to Adafruit IO. The python script listens for Bluetooth Low Energy (BLE) advertising packets, decodes CO2, temperature, and humidity, and posts fresh readings to your Adafruit IO feeds every few seconds. The result is a clean, shareable dashboard that updates in real time—perfect for demos, labs, offices, classrooms, and proofs of concept.
Details of this tutorial and source code available at
https://www.bleuio.com/blog/real-time-ble-air-quality-monitoring-with-bleuio-and-adafruit-io/
/r/Python
https://redd.it/1nohze7
This project shows how to turn a BleuIO USB dongle into a tiny gateway that streams live air-quality data from a HibouAir sensor straight to Adafruit IO. The python script listens for Bluetooth Low Energy (BLE) advertising packets, decodes CO2, temperature, and humidity, and posts fresh readings to your Adafruit IO feeds every few seconds. The result is a clean, shareable dashboard that updates in real time—perfect for demos, labs, offices, classrooms, and proofs of concept.
Details of this tutorial and source code available at
https://www.bleuio.com/blog/real-time-ble-air-quality-monitoring-with-bleuio-and-adafruit-io/
/r/Python
https://redd.it/1nohze7
BleuIO - Create Bluetooth Low Energy application
Real-Time BLE Air Quality Monitoring with BleuIO and Adafruit IO - BleuIO - Create Bluetooth Low Energy application
This project shows how to turn a BleuIO USB dongle into a tiny gateway that streams live air-quality data from a HibouAir sensor straight to Adafruit IO. The script listens for Bluetooth Low Energy (BLE) advertising packets, decodes CO2, temperature, and…
Skylos dead code detector
Hola! I'm back! Yeap I've promoted this a couple of times, some of you lurkers might already know this. So anyway I'm back with quite a lot of new updates.
Skylos is yet another static analysis tool for Python codebases written in Python that detects dead code, secrets and dangerous code. Why skylos?
Some features include:
CST-safe removals: Uses LibCST to remove selected imports or functions
Framework-Aware Detection: Attempt at handling Flask, Django, FastAPI routes and decorators .. Still wip
Test File Exclusion: Auto excludes test files (you can include it back if you want)
Interactive Cleanup: Select specific items to remove from CLI
Dangerous Code detection
Secrets detection
CI/CD integration
You can read more in the repo's README
I have also recently released a new VSC extension that will give you feedback everytime you save the file. (search for skylos under the vsc marketplace). Will be releasing for other IDEs down the road.
Future plans in the next update
Expanding to more IDEs
Increasing the capability of the extension
Increasing the capabilities of searching for dead code as well as dangerous code
Target audience:
Python developers
Any collaborators/contributors will be welcome. If you found the repo useful please give it a star. If you
/r/Python
https://redd.it/1noj6sr
Hola! I'm back! Yeap I've promoted this a couple of times, some of you lurkers might already know this. So anyway I'm back with quite a lot of new updates.
Skylos is yet another static analysis tool for Python codebases written in Python that detects dead code, secrets and dangerous code. Why skylos?
Some features include:
CST-safe removals: Uses LibCST to remove selected imports or functions
Framework-Aware Detection: Attempt at handling Flask, Django, FastAPI routes and decorators .. Still wip
Test File Exclusion: Auto excludes test files (you can include it back if you want)
Interactive Cleanup: Select specific items to remove from CLI
Dangerous Code detection
Secrets detection
CI/CD integration
You can read more in the repo's README
I have also recently released a new VSC extension that will give you feedback everytime you save the file. (search for skylos under the vsc marketplace). Will be releasing for other IDEs down the road.
Future plans in the next update
Expanding to more IDEs
Increasing the capability of the extension
Increasing the capabilities of searching for dead code as well as dangerous code
Target audience:
Python developers
Any collaborators/contributors will be welcome. If you found the repo useful please give it a star. If you
/r/Python
https://redd.it/1noj6sr
Reddit
From the Python community on Reddit: Skylos dead code detector
Explore this post and more from the Python community
Django Chat (A project to learn django better)
# Starting My Django-Chat Project (Day 1 Progress)
Hey everyone!
I’ve recently started building Django-Chat, a chat-based web application where users will be able to text other members. I wanted to share my journey here to keep myself accountable and also to get feedback from the community as I go along.
What I worked on today (Day 1):
Set up a fresh Django project
Integrated Tailwind CSS + Flowbite into Django templates
Created Login & Sign Up pages
Built a User model and a signup form
Added two basic functional views to make authentication work
Why I’m sharing this
I’ve got this habit of starting projects but not finishing them . So I thought I’d share progress updates here—it’ll keep me on track and hopefully help me grow as a developer.
What’s next
Improving the UI/UX
Setting up real-time chat functionality (probably with Django Channels + WebSockets)
Slowly refining features while keeping things simple
Feedback
If you’ve got some time, I’d love for you to:
Review the GitHub repo (link below) and share any thoughts on the code
GitHub Repo: https://github.com/Nobody12here/DjangoChat
Thanks a lot, and looking forward to learning from your feedback! 🚀
/r/django
https://redd.it/1noc6wq
# Starting My Django-Chat Project (Day 1 Progress)
Hey everyone!
I’ve recently started building Django-Chat, a chat-based web application where users will be able to text other members. I wanted to share my journey here to keep myself accountable and also to get feedback from the community as I go along.
What I worked on today (Day 1):
Set up a fresh Django project
Integrated Tailwind CSS + Flowbite into Django templates
Created Login & Sign Up pages
Built a User model and a signup form
Added two basic functional views to make authentication work
Why I’m sharing this
I’ve got this habit of starting projects but not finishing them . So I thought I’d share progress updates here—it’ll keep me on track and hopefully help me grow as a developer.
What’s next
Improving the UI/UX
Setting up real-time chat functionality (probably with Django Channels + WebSockets)
Slowly refining features while keeping things simple
Feedback
If you’ve got some time, I’d love for you to:
Review the GitHub repo (link below) and share any thoughts on the code
GitHub Repo: https://github.com/Nobody12here/DjangoChat
Thanks a lot, and looking forward to learning from your feedback! 🚀
/r/django
https://redd.it/1noc6wq
GitHub
GitHub - Nobody12here/DjangoChat
Contribute to Nobody12here/DjangoChat development by creating an account on GitHub.
Plot Twist: After Years of Compiling Python, I’m Now Using AI to Speed It Up
Hi everyone,
This post: https://discuss.python.org/t/ai-python-compiler-transpile-python-to-golang-with-llms-for-10x-perf-gain-pypi-like-service-to-host-transpiled-packages/103759 motivated me to share my own journey with Python performance optimization.
As someone who has been passionate about Python performance in various ways, it's fascinating to see the diverse approaches people take towards it. There's Cython, the Faster CPython project, mypyc, and closer to my heart, Nuitka.
I started my OSS journey by contributing to Nuitka, mainly on the packaging side (support for third-party modules, their data files, and quirks), and eventually became a maintainer.
**A bit about Nuitka and its approach:**
For those unfamiliar, Nuitka is a Python compiler that translates Python code to C++ and then compiles it to machine code. Unlike transpilers that target other high-level languages, Nuitka aims for 100% Python compatibility while delivering significant performance improvements.
What makes Nuitka unique is its approach:
* It performs whole-program optimization by analyzing your entire codebase and its dependencies
* The generated C++ code mimics CPython's behavior closely, ensuring compatibility with even the trickiest Python features (metaclasses, dynamic imports, exec statements, etc.)
* It can create standalone executables that bundle Python and all dependencies, making deployment much simpler
* The optimization happens at multiple levels: from Python AST transformations to C++ compiler optimizations
One of the challenges I worked on was ensuring that
/r/Python
https://redd.it/1np0ijo
Hi everyone,
This post: https://discuss.python.org/t/ai-python-compiler-transpile-python-to-golang-with-llms-for-10x-perf-gain-pypi-like-service-to-host-transpiled-packages/103759 motivated me to share my own journey with Python performance optimization.
As someone who has been passionate about Python performance in various ways, it's fascinating to see the diverse approaches people take towards it. There's Cython, the Faster CPython project, mypyc, and closer to my heart, Nuitka.
I started my OSS journey by contributing to Nuitka, mainly on the packaging side (support for third-party modules, their data files, and quirks), and eventually became a maintainer.
**A bit about Nuitka and its approach:**
For those unfamiliar, Nuitka is a Python compiler that translates Python code to C++ and then compiles it to machine code. Unlike transpilers that target other high-level languages, Nuitka aims for 100% Python compatibility while delivering significant performance improvements.
What makes Nuitka unique is its approach:
* It performs whole-program optimization by analyzing your entire codebase and its dependencies
* The generated C++ code mimics CPython's behavior closely, ensuring compatibility with even the trickiest Python features (metaclasses, dynamic imports, exec statements, etc.)
* It can create standalone executables that bundle Python and all dependencies, making deployment much simpler
* The optimization happens at multiple levels: from Python AST transformations to C++ compiler optimizations
One of the challenges I worked on was ensuring that
/r/Python
https://redd.it/1np0ijo
Discussions on Python.org
"AI Python compiler" - Transpile Python to Golang with LLMs for 10x perf gain? PyPI-like service to host transpiled packages
TL;DR - Imagine you write the code in Python, and in CI an LLM tool rewrites it to Go, and re-exposes the Python API as Python package released with Go equivalent of maturin. You get the speed of Go, but you develop your code in Python. The users of your…
Should the Celery tasks be defined inside the Django application?
I am a little confused about where to define the tasks while working with Celery. What I've seen is that there are two ways to do it.
1. Define the tasks inside the Django application and create a celery.py as the starting point. Then create two Docker containers: one is the Django app, and the other is the Celery worker. So practically, I have two Django apps running, and I can call the Celery task from my Django app easily because it's defined in the same project by using
2. The second way is to have the Celery worker in a different project. So one Docker container will be the Django app, and the second one will be a lighter worker because it's not running the whole Django app. Now, the problem I've seen with this implementation is that because the task is defined in another project, the only way I can call them is to re-implement the task function signature again in the Django app. Therefore, I can reference it using
/r/django
https://redd.it/1np2mv6
I am a little confused about where to define the tasks while working with Celery. What I've seen is that there are two ways to do it.
1. Define the tasks inside the Django application and create a celery.py as the starting point. Then create two Docker containers: one is the Django app, and the other is the Celery worker. So practically, I have two Django apps running, and I can call the Celery task from my Django app easily because it's defined in the same project by using
task1.delay()2. The second way is to have the Celery worker in a different project. So one Docker container will be the Django app, and the second one will be a lighter worker because it's not running the whole Django app. Now, the problem I've seen with this implementation is that because the task is defined in another project, the only way I can call them is to re-implement the task function signature again in the Django app. Therefore, I can reference it using
task1.delay(). But it doesn't look right, because I will have to be aware of changing the function signature in the Django project when it changes in the Celery worker/r/django
https://redd.it/1np2mv6
Why do i keep getting cors errors on my react frontend?
"""
Django settings for complaintbackend project.
Generated by 'django-admin startproject' using Django 5.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/5.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.2/ref/settings/
"""
from pathlib import Path
from environs import Env # new
env = Env()
env.readenv()
# Build paths inside the project like this: BASEDIR / 'subdir'.
BASEDIR = Path(file).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRETKEY = env.str("SECRETKEY")
# SECURITY WARNING: don't run with debug turned on in production!
/r/django
https://redd.it/1nnw760
"""
Django settings for complaintbackend project.
Generated by 'django-admin startproject' using Django 5.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/5.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.2/ref/settings/
"""
from pathlib import Path
from environs import Env # new
env = Env()
env.readenv()
# Build paths inside the project like this: BASEDIR / 'subdir'.
BASEDIR = Path(file).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRETKEY = env.str("SECRETKEY")
# SECURITY WARNING: don't run with debug turned on in production!
/r/django
https://redd.it/1nnw760
Django Project
Django settings | Django documentation
The web framework for perfectionists with deadlines.