Open-source Flask projects to contribute to?
I’ve been working with Flask for two years, mostly on my own projects, but now I’d like to join a larger project and contribute to the open-source ecosystem.
Do you maintain or know of any projects where I could get some practice?
/r/flask
https://redd.it/1pkajq1
I’ve been working with Flask for two years, mostly on my own projects, but now I’d like to join a larger project and contribute to the open-source ecosystem.
Do you maintain or know of any projects where I could get some practice?
/r/flask
https://redd.it/1pkajq1
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
D On the essence of the diffusion model
Hi all, I am learning about diffusion models and want to understand their essence rather than just applications. My initial understanding is that diffusion models can generate a series of new data starting from isotropic Gaussian noise.
I noticed that some instructions describe the inference of the diffusion model as a denoising process, which can be represented as a set of regression tasks. However, I still find it confusing. I want to understand the essence of the diffusion model, but its derivation is rather mathematically heavy. The more abstract summaries would be helpful. Thanks in advance.
/r/MachineLearning
https://redd.it/1pkuoay
Hi all, I am learning about diffusion models and want to understand their essence rather than just applications. My initial understanding is that diffusion models can generate a series of new data starting from isotropic Gaussian noise.
I noticed that some instructions describe the inference of the diffusion model as a denoising process, which can be represented as a set of regression tasks. However, I still find it confusing. I want to understand the essence of the diffusion model, but its derivation is rather mathematically heavy. The more abstract summaries would be helpful. Thanks in advance.
/r/MachineLearning
https://redd.it/1pkuoay
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
# 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/Python
https://redd.it/1pl76y8
# 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/Python
https://redd.it/1pl76y8
D HTTP Anomaly Detection Research ?
I recently worked on a side project of anomaly detection of Malicious HTTP Requests by training only on Benign Samples - with the idea of making a firewall robust against zero day exploits, It involved working on
1. A NLP architecture to learn the semantics and structure of a safe HTTP Request and differ it from malicious requests
2. Re Training the Model on incoming safe data to improve perfomance
3. Domain Generalization across websites not in the test data.
What are the adjacent research areas/papers i can work upon and explore to improve this project ?
and what is the current SOTA of this field ?
/r/MachineLearning
https://redd.it/1pktkx6
I recently worked on a side project of anomaly detection of Malicious HTTP Requests by training only on Benign Samples - with the idea of making a firewall robust against zero day exploits, It involved working on
1. A NLP architecture to learn the semantics and structure of a safe HTTP Request and differ it from malicious requests
2. Re Training the Model on incoming safe data to improve perfomance
3. Domain Generalization across websites not in the test data.
What are the adjacent research areas/papers i can work upon and explore to improve this project ?
and what is the current SOTA of this field ?
/r/MachineLearning
https://redd.it/1pktkx6
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
VSCode extension that supports jumping to partial definition?
Hello guys, since 6.0 introduced partials, I've been looking for a VSCode extension that support jumping to the partial definition when you press CTRL + click. I've tried both https://marketplace.visualstudio.com/items?itemName=batisteo.vscode-django and https://marketplace.visualstudio.com/items?itemName=almahdi.code-django and I have even submited requests for this feature but these extensions have not been updated in a long tine. Do you guys have any solution for this? These extensions both support "jump to template". What I mean is for example, if you have this line:
return render(request, 'index.html#somepartial', {})
CTRL + clicking the template name would take you to the partial defition. Right now
return render(request, 'index.html', {})
works but adding the
/r/django
https://redd.it/1pl6stj
Hello guys, since 6.0 introduced partials, I've been looking for a VSCode extension that support jumping to the partial definition when you press CTRL + click. I've tried both https://marketplace.visualstudio.com/items?itemName=batisteo.vscode-django and https://marketplace.visualstudio.com/items?itemName=almahdi.code-django and I have even submited requests for this feature but these extensions have not been updated in a long tine. Do you guys have any solution for this? These extensions both support "jump to template". What I mean is for example, if you have this line:
return render(request, 'index.html#somepartial', {})
CTRL + clicking the template name would take you to the partial defition. Right now
return render(request, 'index.html', {})
works but adding the
'#somepartial' breaks the "jump to template" functionality./r/django
https://redd.it/1pl6stj
Visualstudio
Django - Visual Studio Marketplace
Extension for Visual Studio Code - Beautiful syntax and scoped snippets for perfectionists with deadlines
I kept bouncing between GUI frameworks and Electron, so I tried building something in between
I’ve been trying to build small desktop apps in Python for a while and honestly it was kind of frustrating
Every time I started something new, I ended up in the same place. Either I was fighting with a GUI framework that felt heavy and awkward, or I went with Electron and suddenly a tiny app turned into a huge bundle
What really annoyed me was the result. Apps were big, startup felt slow, and doing anything native always felt harder than it should be. Especially from Python
Sometimes I actually got things working in Python, but it was slow… like, slow as fk. And once native stuff got involved, everything became even more messy.
After going in circles like that for a while, I just stopped looking for the “right” tool and started experimenting on my own. That experiment slowly turned into a small project called TauPy
What surprised me most wasn’t even the tech side, but how it felt to work with it. I can tweak Python code and the window reacts almost immediately. No full rebuilds, no waiting forever.
Starting the app feels fast too. More like running a noscript than launching a full desktop framework.
I’m still very much figuring out where this
/r/Python
https://redd.it/1pl76qm
I’ve been trying to build small desktop apps in Python for a while and honestly it was kind of frustrating
Every time I started something new, I ended up in the same place. Either I was fighting with a GUI framework that felt heavy and awkward, or I went with Electron and suddenly a tiny app turned into a huge bundle
What really annoyed me was the result. Apps were big, startup felt slow, and doing anything native always felt harder than it should be. Especially from Python
Sometimes I actually got things working in Python, but it was slow… like, slow as fk. And once native stuff got involved, everything became even more messy.
After going in circles like that for a while, I just stopped looking for the “right” tool and started experimenting on my own. That experiment slowly turned into a small project called TauPy
What surprised me most wasn’t even the tech side, but how it felt to work with it. I can tweak Python code and the window reacts almost immediately. No full rebuilds, no waiting forever.
Starting the app feels fast too. More like running a noscript than launching a full desktop framework.
I’m still very much figuring out where this
/r/Python
https://redd.it/1pl76qm
Reddit
From the Python community on Reddit: I kept bouncing between GUI frameworks and Electron, so I tried building something in between
Explore this post and more from the Python community
PyPulsar — a Python-based Electron-like framework for desktop apps
# What My Project Does
**PyPulsar** is an open-source framework for building **cross-platform desktop applications** using **Python for application logic** and **HTML/CSS/JavaScript for the UI**.
It provides an Electron-inspired architecture where a Python “main” process manages the application lifecycle and communicates with a WebView-based renderer responsible for displaying the frontend.
The goal is to make it easy for Python developers to create modern desktop applications without introducing Node.js into the stack.
Repository (early-stage / WIP):
[https://github.com/dannyx-hub/PyPulsar](https://github.com/dannyx-hub/PyPulsar)
# Target Audience
PyPulsar is currently an **early-stage project** and is **not production-ready** yet.
It is primarily intended for:
* Python developers who want to build desktop apps using web technologies
* Hobbyists and open-source contributors interested in framework design
* Developers exploring alternatives to Electron with a Python-first approach
At this stage, the focus is on **architecture, API design, and experimentation**, rather than stability or long-term support guarantees.
# Comparison
PyPulsar is inspired by Electron but differs in several key ways:
* **Electron**: Uses Node.js for the main process and bundles Chromium. **PyPulsar** uses Python as the main runtime and relies on system WebViews instead of shipping a full browser.
* **Tauri**: Focuses on a Rust backend and a minimal binary size. **PyPulsar** targets Python developers who prefer Python over Rust and want a more hackable, noscriptable
/r/Python
https://redd.it/1pl2qso
# What My Project Does
**PyPulsar** is an open-source framework for building **cross-platform desktop applications** using **Python for application logic** and **HTML/CSS/JavaScript for the UI**.
It provides an Electron-inspired architecture where a Python “main” process manages the application lifecycle and communicates with a WebView-based renderer responsible for displaying the frontend.
The goal is to make it easy for Python developers to create modern desktop applications without introducing Node.js into the stack.
Repository (early-stage / WIP):
[https://github.com/dannyx-hub/PyPulsar](https://github.com/dannyx-hub/PyPulsar)
# Target Audience
PyPulsar is currently an **early-stage project** and is **not production-ready** yet.
It is primarily intended for:
* Python developers who want to build desktop apps using web technologies
* Hobbyists and open-source contributors interested in framework design
* Developers exploring alternatives to Electron with a Python-first approach
At this stage, the focus is on **architecture, API design, and experimentation**, rather than stability or long-term support guarantees.
# Comparison
PyPulsar is inspired by Electron but differs in several key ways:
* **Electron**: Uses Node.js for the main process and bundles Chromium. **PyPulsar** uses Python as the main runtime and relies on system WebViews instead of shipping a full browser.
* **Tauri**: Focuses on a Rust backend and a minimal binary size. **PyPulsar** targets Python developers who prefer Python over Rust and want a more hackable, noscriptable
/r/Python
https://redd.it/1pl2qso
GitHub
GitHub - dannyx-hub/PyPulsar: Fast, light framework to build your desktop and mobile apps
Fast, light framework to build your desktop and mobile apps - dannyx-hub/PyPulsar
RenderCV v2.5: Write your CV in YAML, version control it, get pixel-perfect PDFs
TLDR: Check out github.com/rendercv/rendercv
Been a while since the last update here. RenderCV has gotten much better, much more robust, and it's still actively maintained.
## The idea
Separate your content from how it looks. Write what you've done, and let the tool handle typography.
Run
## Why engineers love it
It's text.
Full control over every design detail. Margins, fonts, colors, spacing, alignment; all configurable in YAML.
Real-time preview. Set up live preview in VS Code and watch your PDF update as you type.
JSON Schema autocomplete. VS Code lights
/r/Python
https://redd.it/1plhus1
TLDR: Check out github.com/rendercv/rendercv
Been a while since the last update here. RenderCV has gotten much better, much more robust, and it's still actively maintained.
## The idea
Separate your content from how it looks. Write what you've done, and let the tool handle typography.
cv:
name: John Doe
email: john@example.com
sections:
experience:
- company: Anthropic
position: ML Engineer
start_date: 2023-01
highlights:
- Built large language models
- Deployed inference pipelines at scale
Run
rendercv render John_Doe_CV.yaml, get a pixel-perfect PDF. Consistent spacing. Aligned columns. Nothing out of place. Ever.## Why engineers love it
It's text.
git diff your CV changes. Review them in PRs. Your CV history is your commit history. Use LLMs to help write and refine your content.Full control over every design detail. Margins, fonts, colors, spacing, alignment; all configurable in YAML.
Real-time preview. Set up live preview in VS Code and watch your PDF update as you type.
JSON Schema autocomplete. VS Code lights
/r/Python
https://redd.it/1plhus1
GitHub
GitHub - rendercv/rendercv: Typst-based CV/resume generator for academics and engineers
Typst-based CV/resume generator for academics and engineers - rendercv/rendercv
DRF Auth Kit: A Complete Authentication Solution for Django REST Framework
Hi everyone,
I’d like to (re)introduce **DRF Auth Kit** — a comprehensive authentication package for Django REST Framework.
If you’re looking for an auth solution that provides:
* **Modern, secure authentication**: Read-only JWT cookie auth (also supports DRF Token and custom auth methods)
* **Full user authentication flow**: Sign up, sign in, password reset, change password, etc., with easy customization of views and serializers
* **Broad Django support**: Compatible with Django 4.2 through the latest 6.0
* **Social & OAuth2 login**: 50+ providers (Google, GitHub, and more) via `django-allauth`
* **Multi-factor authentication (MFA)**: Email, authenticator apps, and backup codes
* **Full typing support**: Pyright and MyPy compatible
* **Internationalization**: 57+ languages including English, Spanish, French, German, Chinese, Japanese, Korean, Vietnamese, and more
* **Accurate OpenAPI schemas**: Ideal for schema-to-code tools on the frontend
* **Highly customizable components** without breaking core functionality
# Why DRF Auth Kit?
Inspired by `django-allauth`, `dj-rest-auth`, and `django-trench`, but designed to address their common pain points:
* Correct and complete OpenAPI schemas
* End-to-end type safety
* No manual schema fixes required
* Easy customization that stays maintainable
# Perfect for:
* Teams that need reliable, accurate API documentation
* Projects that require type-safe authentication
* Developers tired of patching broken auth schemas
* Anyone who values clean, well-documented code
# How to use:
`pip install drf-auth-kit[all] # Includes MFA
/r/django
https://redd.it/1plg3be
Hi everyone,
I’d like to (re)introduce **DRF Auth Kit** — a comprehensive authentication package for Django REST Framework.
If you’re looking for an auth solution that provides:
* **Modern, secure authentication**: Read-only JWT cookie auth (also supports DRF Token and custom auth methods)
* **Full user authentication flow**: Sign up, sign in, password reset, change password, etc., with easy customization of views and serializers
* **Broad Django support**: Compatible with Django 4.2 through the latest 6.0
* **Social & OAuth2 login**: 50+ providers (Google, GitHub, and more) via `django-allauth`
* **Multi-factor authentication (MFA)**: Email, authenticator apps, and backup codes
* **Full typing support**: Pyright and MyPy compatible
* **Internationalization**: 57+ languages including English, Spanish, French, German, Chinese, Japanese, Korean, Vietnamese, and more
* **Accurate OpenAPI schemas**: Ideal for schema-to-code tools on the frontend
* **Highly customizable components** without breaking core functionality
# Why DRF Auth Kit?
Inspired by `django-allauth`, `dj-rest-auth`, and `django-trench`, but designed to address their common pain points:
* Correct and complete OpenAPI schemas
* End-to-end type safety
* No manual schema fixes required
* Easy customization that stays maintainable
# Perfect for:
* Teams that need reliable, accurate API documentation
* Projects that require type-safe authentication
* Developers tired of patching broken auth schemas
* Anyone who values clean, well-documented code
# How to use:
`pip install drf-auth-kit[all] # Includes MFA
/r/django
https://redd.it/1plg3be
Reddit
From the django community on Reddit: DRF Auth Kit: A Complete Authentication Solution for Django REST Framework
Explore this post and more from the django community
How much typing is Pythonic?
I mostly stopped writing Python right around when mypy was getting going. Coming back after a few years mostly using Typenoscript and Rust, I'm finding certain things more difficult to express than I expected, like "this argument can be anything so long as it's
Am I overthinking it? Is
if not hasattr(arg, "hash"):
raise ValueError("argument needs to be hashashable")
the one preferably obvious right way to do it?
ETA: I believe my specific problem is solved with
/r/Python
https://redd.it/1pkt94z
I mostly stopped writing Python right around when mypy was getting going. Coming back after a few years mostly using Typenoscript and Rust, I'm finding certain things more difficult to express than I expected, like "this argument can be anything so long as it's
hashable," or "this instance method is generic in one of its arguments and return value."Am I overthinking it? Is
if not hasattr(arg, "hash"):
raise ValueError("argument needs to be hashashable")
the one preferably obvious right way to do it?
ETA: I believe my specific problem is solved with
TypeVar("T", bound=typing.Hashable), but the larger question still stands./r/Python
https://redd.it/1pkt94z
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
What do you use python mainly for? what are stuffs you have built using that?
Let me go first, I use python mostly to write automation noscripts, I have built some apps using django, but they are not easy to be maintained. I have built some ai stuffs as well.
/r/Python
https://redd.it/1pleikn
Let me go first, I use python mostly to write automation noscripts, I have built some apps using django, but they are not easy to be maintained. I have built some ai stuffs as well.
/r/Python
https://redd.it/1pleikn
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
A Python tool to diagnose how functions behave when inputs are missing (None / NaN)
### What My Project Does
I built a small experimental Python tool called doubt that helps diagnose how functions behave when parts of their inputs are missing.
I encountered this issue in my day to day data science work. We always wanted to know how a piece of code/function will behave in case of missing data(NaN usually) e.g. a function to calculate average of values in a list. Think of any business KPi which gets affected by missing data.
The tool works by:
- injecting missing values (e.g.
- re-running the function against a baseline execution
- classifying the outcome as:
- crash
- silent output change
- type change
- no impact
The intent is not to replace unit tests, but to act as a diagnostic lens to identify where functions make implicit assumptions about data completeness and where defensive checks or validation might be needed.
---
### Target Audience
This is primarily aimed at:
- developers working with data pipelines, analytics, or ETL code
- people dealing with real-world, messy data where missingness is common
- early-stage debugging and code hardening rather than production enforcement
It’s currently best suited for relatively pure or low-side-effect functions and small
/r/Python
https://redd.it/1pkqz8u
### What My Project Does
I built a small experimental Python tool called doubt that helps diagnose how functions behave when parts of their inputs are missing.
I encountered this issue in my day to day data science work. We always wanted to know how a piece of code/function will behave in case of missing data(NaN usually) e.g. a function to calculate average of values in a list. Think of any business KPi which gets affected by missing data.
The tool works by:
- injecting missing values (e.g.
None, NaN, pd.NA) into function inputs one at a time- re-running the function against a baseline execution
- classifying the outcome as:
- crash
- silent output change
- type change
- no impact
The intent is not to replace unit tests, but to act as a diagnostic lens to identify where functions make implicit assumptions about data completeness and where defensive checks or validation might be needed.
---
### Target Audience
This is primarily aimed at:
- developers working with data pipelines, analytics, or ETL code
- people dealing with real-world, messy data where missingness is common
- early-stage debugging and code hardening rather than production enforcement
It’s currently best suited for relatively pure or low-side-effect functions and small
/r/Python
https://redd.it/1pkqz8u
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Universal Reddit Scraper in Python with dashboard, scheduling, and no API dependency
# What My Project Does
This project is a modular, production-ready Python tool that scrapes Reddit posts, comments, images, videos, and gallery media without using Reddit API keys or authentication.
It collects structured data from subreddits and user profiles, stores it in a normalized SQLite database, exports to CSV/Excel, and provides a Streamlit-based dashboard for analytics, search, and scraper control. A built-in scheduler allows automated, recurring scraping jobs.
The scraper uses public JSON endpoints exposed by `old.reddit.com` and multiple Redlib/Libreddit mirrors, with randomized failover, pagination handling, and rate limiting to improve reliability.
# Target Audience
This project is intended for:
Developers building Reddit-based analytics or monitoring tools
Researchers collecting Reddit datasets for analysis
Data engineers needing lightweight, self-hosted scraping pipelines
Python users who want a production-style scraper without heavy dependencies
It is designed to run locally, on servers, or in Docker for long-running use cases.
# Comparison
Compared to existing alternatives:
Unlike PRAW, this tool does not require API keys or OAuth
Unlike Selenium-based scrapers, it uses direct HTTP requests and is significantly lighter and faster
Unlike one-off noscripts, it provides a full pipeline including storage, exports, analytics, scheduling, and a web dashboard
Unlike ML-heavy solutions, it avoids large NLP libraries and keeps deployment simple
The focus is
/r/Python
https://redd.it/1plqnn3
# What My Project Does
This project is a modular, production-ready Python tool that scrapes Reddit posts, comments, images, videos, and gallery media without using Reddit API keys or authentication.
It collects structured data from subreddits and user profiles, stores it in a normalized SQLite database, exports to CSV/Excel, and provides a Streamlit-based dashboard for analytics, search, and scraper control. A built-in scheduler allows automated, recurring scraping jobs.
The scraper uses public JSON endpoints exposed by `old.reddit.com` and multiple Redlib/Libreddit mirrors, with randomized failover, pagination handling, and rate limiting to improve reliability.
# Target Audience
This project is intended for:
Developers building Reddit-based analytics or monitoring tools
Researchers collecting Reddit datasets for analysis
Data engineers needing lightweight, self-hosted scraping pipelines
Python users who want a production-style scraper without heavy dependencies
It is designed to run locally, on servers, or in Docker for long-running use cases.
# Comparison
Compared to existing alternatives:
Unlike PRAW, this tool does not require API keys or OAuth
Unlike Selenium-based scrapers, it uses direct HTTP requests and is significantly lighter and faster
Unlike one-off noscripts, it provides a full pipeline including storage, exports, analytics, scheduling, and a web dashboard
Unlike ML-heavy solutions, it avoids large NLP libraries and keeps deployment simple
The focus is
/r/Python
https://redd.it/1plqnn3
Reddit
reddit: the front page of the internet
Reddit gives you the best of the internet in one place. Get a constantly updating feed of breaking news, fun stories, pics, memes, and videos just for you. Passionate about something niche? Reddit has thousands of vibrant communities with people that share…
D How does Claude perform so well without any proprietary data?
Google has massive proprietary assets (Search, Gmail, Docs, YouTube).
Microsoft/OpenAI has GitHub, Bing, Office, and enterprise data.
xAI has direct access to Twitter/X's social data.
Meta has facebook data.
Anthropic (Claude) however, doesn't appear to own or control any comparably large proprietary data sources. Yet Claude often scores extremely well on reasoning and tasks, many times outperforming other company models.
How Anthropic (Claude) is able to beat their competitiors in model quality?
/r/MachineLearning
https://redd.it/1plg1gs
Google has massive proprietary assets (Search, Gmail, Docs, YouTube).
Microsoft/OpenAI has GitHub, Bing, Office, and enterprise data.
xAI has direct access to Twitter/X's social data.
Meta has facebook data.
Anthropic (Claude) however, doesn't appear to own or control any comparably large proprietary data sources. Yet Claude often scores extremely well on reasoning and tasks, many times outperforming other company models.
How Anthropic (Claude) is able to beat their competitiors in model quality?
/r/MachineLearning
https://redd.it/1plg1gs
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
Seriously underrated Django feature: fixtures
No, not test fixtures, but database fixtures.
I've know about django fixtures for years but I've only recently started using them, and they're utterly brilliant.
The single biggest benefit is:
Found 590 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
Running tests...
----------------------------------------------------------------------
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 590 tests in 1.560s
...that's 590 tests that complete in 1.56 seconds, using Django's test framework. Most of these tests are at the API level (I prefer nearly all testing to be against the API) with almost no mocking/patching; these are "integration" tests that go through the whole stack, middleware included. Database is sqlite.
The reason for this is: it's exceptionally fast to populate the sqlite database with fixtures. It bypasses much of the ORM, resulting in much quicker database configuration. Also, you can create suites of fixtures that truly do model real-world information, and it makes testing a breeze. In particular, it makes test setup simple, because you simply affix the fixtures to the
One (strong) recommendation: use natural
/r/django
[https://redd.it/1plqyjr
No, not test fixtures, but database fixtures.
I've know about django fixtures for years but I've only recently started using them, and they're utterly brilliant.
The single biggest benefit is:
Found 590 test(s).
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
Running tests...
----------------------------------------------------------------------
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
----------------------------------------------------------------------
Ran 590 tests in 1.560s
...that's 590 tests that complete in 1.56 seconds, using Django's test framework. Most of these tests are at the API level (I prefer nearly all testing to be against the API) with almost no mocking/patching; these are "integration" tests that go through the whole stack, middleware included. Database is sqlite.
The reason for this is: it's exceptionally fast to populate the sqlite database with fixtures. It bypasses much of the ORM, resulting in much quicker database configuration. Also, you can create suites of fixtures that truly do model real-world information, and it makes testing a breeze. In particular, it makes test setup simple, because you simply affix the fixtures to the
TestCase and you're off.One (strong) recommendation: use natural
/r/django
[https://redd.it/1plqyjr
Django Project
Fixtures | Django documentation
The web framework for perfectionists with deadlines.
Mcpwn: Security scanner for MCP servers (pure Python, zero dependencies)
#
Mcpwn: Security scanner for Model Context Protocol servers
##
What My Project Does
Mcpwn is an automated security scanner for MCP (Model Context Protocol) servers that detects RCE, path traversal, and prompt injection vulnerabilities. It uses semantic detection - analyzing response content for patterns like `uid=1000` or `root:x:0:0` instead of just looking for crashes.
**Key features:**
- Detects command injection, path traversal, prompt injection, protocol bugs
- Zero dependencies (pure Python stdlib)
- 5-second quick scans
- Outputs JSON/SARIF for CI/CD integration
- 45 passing tests
**Example:**
```bash
python mcpwn.py --quick npx -y u/modelcontextprotocol/server-filesystem /tmp
[WARNING] execute_command: RCE via command
[WARNING] Detection: uid=1000(user) gid=1000(user)
/r/Python
https://redd.it/1plruqa
#
Mcpwn: Security scanner for Model Context Protocol servers
##
What My Project Does
Mcpwn is an automated security scanner for MCP (Model Context Protocol) servers that detects RCE, path traversal, and prompt injection vulnerabilities. It uses semantic detection - analyzing response content for patterns like `uid=1000` or `root:x:0:0` instead of just looking for crashes.
**Key features:**
- Detects command injection, path traversal, prompt injection, protocol bugs
- Zero dependencies (pure Python stdlib)
- 5-second quick scans
- Outputs JSON/SARIF for CI/CD integration
- 45 passing tests
**Example:**
```bash
python mcpwn.py --quick npx -y u/modelcontextprotocol/server-filesystem /tmp
[WARNING] execute_command: RCE via command
[WARNING] Detection: uid=1000(user) gid=1000(user)
/r/Python
https://redd.it/1plruqa
Reddit
From the Python community on Reddit: Mcpwn: Security scanner for MCP servers (pure Python, zero dependencies)
Explore this post and more from the Python community
BehaveDock - A system orchestrator build for E2E testing, suited for the Behave library
I just released my new library: BehaveDock. It's a library that simplifies end-to-end testing for containerized applications. Instead of maintaing Docker Compose files, setting ports manually, and managing relevant overhead to start, seed, and teardown the containers, you define your system's components individually along with their interfaces (database, message broker, your microservices) and implement how to provision them.
The library handles:
* **Component orchestration:** Declare your components and their dependencies as type hints, get them and their details wired automatically (port number, username & password, etc.)
* **Lifecycle management:** Setup and teardown handled for you in the correct order
* **Environment swapping:** You can write implementations for any environment (Local docker, staging, bare-metal execution) and your tests don't need to change; they'll use the same interface.
Built for [Behave](https://behave.readthedocs.io/); Uses [testcontainers-python](https://testcontainers-python.readthedocs.io/). Comes with built-in providers for Kafka, PostgreSQL, Redis, RabbitMQ, and Schema Registry.
# Target Audience
This is aimed at **teams building microservices or monoliths who need reliable E2E tests**.
Ideal if you:
* Have services that depend on databases, message queues, or other infrastructure
* Want to run the same test suite against local Docker containers AND staging
* Are tired of maintaining a separate Docker Compose file just for tests
* Already use or want to use Behave for BDD-style testing
# Comparison
**vs. Docker Compose + pytest:** No external files to maintain. No manual provisioning. Dependencies are resolved in code with proper ordering. Swap from Docker to staging by changing one class; Your behavioral tests are
/r/Python
https://redd.it/1plqmm8
I just released my new library: BehaveDock. It's a library that simplifies end-to-end testing for containerized applications. Instead of maintaing Docker Compose files, setting ports manually, and managing relevant overhead to start, seed, and teardown the containers, you define your system's components individually along with their interfaces (database, message broker, your microservices) and implement how to provision them.
The library handles:
* **Component orchestration:** Declare your components and their dependencies as type hints, get them and their details wired automatically (port number, username & password, etc.)
* **Lifecycle management:** Setup and teardown handled for you in the correct order
* **Environment swapping:** You can write implementations for any environment (Local docker, staging, bare-metal execution) and your tests don't need to change; they'll use the same interface.
Built for [Behave](https://behave.readthedocs.io/); Uses [testcontainers-python](https://testcontainers-python.readthedocs.io/). Comes with built-in providers for Kafka, PostgreSQL, Redis, RabbitMQ, and Schema Registry.
# Target Audience
This is aimed at **teams building microservices or monoliths who need reliable E2E tests**.
Ideal if you:
* Have services that depend on databases, message queues, or other infrastructure
* Want to run the same test suite against local Docker containers AND staging
* Are tired of maintaining a separate Docker Compose file just for tests
* Already use or want to use Behave for BDD-style testing
# Comparison
**vs. Docker Compose + pytest:** No external files to maintain. No manual provisioning. Dependencies are resolved in code with proper ordering. Swap from Docker to staging by changing one class; Your behavioral tests are
/r/Python
https://redd.it/1plqmm8
How to implement phone number + OTP login with django-allauth?
I’m currently working on a Django project, and I have a requirement to allow users to log in using their Phone Number and an OTP (One-Time Password) via SMS, besides the standard Email/Username + Password combo.
I'd really like to use
I know that recent versions of
If anyone has implemented a Phone+OTP flow specifically with
Thanks in advance!
/r/django
https://redd.it/1pluqs8
I’m currently working on a Django project, and I have a requirement to allow users to log in using their Phone Number and an OTP (One-Time Password) via SMS, besides the standard Email/Username + Password combo.
I'd really like to use
django-allauth for auth features.I know that recent versions of
django-allauth added ACCOUNT_PHONE_VERIFICATION_ENABLED and support for phone numbers as a primary identifier, but I don't know how to implement phone number + OTP login.If anyone has implemented a Phone+OTP flow specifically with
django-allauth recently, I’d love to hear how you approached it.Thanks in advance!
/r/django
https://redd.it/1pluqs8
Reddit
From the django community on Reddit
Explore this post and more from the django community
trying to learn django for a personal project
hi hopefully this is the right flair so I'm trying to make a api in django in vs code and whenever I put in
"python manage.py startapp api"
it gives me the error of my manage.py says there is no such file or directory even though it exists
"'C:\\\\Users\\\\user\\\\OneDrive\\\\Desktop\\\\API coding learn\\\\manage.py': [Errno 2\] No such file or directory"
ive tried to select a interpreter but for some reason when I try and put it in the correct spot vscode doesnt see my manage.py file even though it exist when I look for it in file explorer outside of vs code I've been trying to figure this out for the past 2 days and I'm not sure what else to do does anyone know a fix for this?
/r/djangolearning
https://redd.it/1plqct8
hi hopefully this is the right flair so I'm trying to make a api in django in vs code and whenever I put in
"python manage.py startapp api"
it gives me the error of my manage.py says there is no such file or directory even though it exists
"'C:\\\\Users\\\\user\\\\OneDrive\\\\Desktop\\\\API coding learn\\\\manage.py': [Errno 2\] No such file or directory"
ive tried to select a interpreter but for some reason when I try and put it in the correct spot vscode doesnt see my manage.py file even though it exist when I look for it in file explorer outside of vs code I've been trying to figure this out for the past 2 days and I'm not sure what else to do does anyone know a fix for this?
/r/djangolearning
https://redd.it/1plqct8
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Sunday Daily Thread: What's everyone working on this week?
# 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 noscript 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/Python
https://redd.it/1plzvku
# 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 noscript 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/Python
https://redd.it/1plzvku
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
How to create a model to match a nested structure.
Hi I am new to Django and Im having trouble figuring out how to model the following structures.
I want to store the presets of an instruments, each preset contains many fields, and nested fields (structs), like the following scheme.
--------------
--------------
As can be seen a preset depends on many CtrlSettings, but I don't know how to describe this relationship as it do not make sense to create a table of CtrlSettings, since each CtrlSettings
/r/django
https://redd.it/1pm48ow
Hi I am new to Django and Im having trouble figuring out how to model the following structures.
I want to store the presets of an instruments, each preset contains many fields, and nested fields (structs), like the following scheme.
--------------
Preset
Name (string)
BPM (int)
Pan (int)
EffectsOrder (list of IDs)
... More fields
FxLoopSettings
SendValue (int)
Return value (int)
Mode (series or parallel)
CtrlSettings1
CtrlID (int)
EffectID (int)
ParamID (int)
ParamValue (int)
... More CtrlSettings
--------------
As can be seen a preset depends on many CtrlSettings, but I don't know how to describe this relationship as it do not make sense to create a table of CtrlSettings, since each CtrlSettings
/r/django
https://redd.it/1pm48ow
Reddit
From the django community on Reddit
Explore this post and more from the django community