Step-by-step guide to deploy your FastAPI app using Railway, Dokku on a VPS, or AWS EC2 — with real
[https://fastlaunchapi.dev/blog/how-to-deploy-fastapi-app/](https://fastlaunchapi.dev/blog/how-to-deploy-fastapi-app/)
# How to Deploy a FastAPI App (Railway, Dokku, AWS EC2)
Once you’ve finished building your FastAPI app and tested it locally, the next big step is getting it online so others can use it. Deployment can seem a little overwhelming at first, especially if you're deciding between different hosting options, but it doesn’t have to be.
In this guide, I’ll walk you through how to deploy a FastAPI application using three different platforms. Each option suits a slightly different use case, whether you're experimenting with a personal project or deploying something more production-ready.
We’ll cover:
* **Railway**, for quick and easy deployments with minimal setup
* **Dokku**, a self-hosted solution that gives you more control while keeping things simple
* **AWS EC2**, for when you need full control over your server environment
/r/Python
https://redd.it/1mdkmvd
[https://fastlaunchapi.dev/blog/how-to-deploy-fastapi-app/](https://fastlaunchapi.dev/blog/how-to-deploy-fastapi-app/)
# How to Deploy a FastAPI App (Railway, Dokku, AWS EC2)
Once you’ve finished building your FastAPI app and tested it locally, the next big step is getting it online so others can use it. Deployment can seem a little overwhelming at first, especially if you're deciding between different hosting options, but it doesn’t have to be.
In this guide, I’ll walk you through how to deploy a FastAPI application using three different platforms. Each option suits a slightly different use case, whether you're experimenting with a personal project or deploying something more production-ready.
We’ll cover:
* **Railway**, for quick and easy deployments with minimal setup
* **Dokku**, a self-hosted solution that gives you more control while keeping things simple
* **AWS EC2**, for when you need full control over your server environment
/r/Python
https://redd.it/1mdkmvd
FastLaunchAPI
How to Deploy a FastAPI App
Step-by-step guide to deploy your FastAPI app using Railway, Dokku on a VPS, or AWS EC2 — with real examples and pro tips.
How to properly render select2 widget in a modal window?
Hi, i have a Book model that has a authors field which is a ManyToMany field to Author model.
I'm using django-autocomplete-light to render a select2 widget in my templates that will allow me to select more than one authors when creating new books. (Using ModelSelect2Multiple)
So the field renders OK in a regular html page. But when i try to render the same exact form in a DaisyUI modal window, the dropdown menu that it should open will be opened in the back of the modal window (like i can see it is being displayed behind the modal window).
Here is my form:
class BookForm(forms.ModelForm):
class Meta:
model = Book
fields = (
'title',
'authors',
)
widgets = {
'authors': autocomplete.ModelSelect2Multiple(
/r/djangolearning
https://redd.it/1md535t
Hi, i have a Book model that has a authors field which is a ManyToMany field to Author model.
I'm using django-autocomplete-light to render a select2 widget in my templates that will allow me to select more than one authors when creating new books. (Using ModelSelect2Multiple)
So the field renders OK in a regular html page. But when i try to render the same exact form in a DaisyUI modal window, the dropdown menu that it should open will be opened in the back of the modal window (like i can see it is being displayed behind the modal window).
Here is my form:
class BookForm(forms.ModelForm):
class Meta:
model = Book
fields = (
'title',
'authors',
)
widgets = {
'authors': autocomplete.ModelSelect2Multiple(
/r/djangolearning
https://redd.it/1md535t
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Is it a sin to serve just the password reset from Django directly?
Right. Ive been avoiding asking thinking I will eventually fix this but no dice. It’s nearly midnight(wrecked), I’m now in bed(fiance will kill me if I wake her), spiritually defeated(it's temporary), and here we are.
I’m building a personal project with a decoupled setup: DRF as the backend and a super minimal HTML and JS(it's as vanilla as you can get) frontend... essentially a glorified test harness. Nothing fancy, just enough to click buttons and cry.
Here’s the problem: I can't get the password reset form to show up properly after clicking the reset link that gets emailed. The link to send the reset email works fine when I use Django’s built-in templates on port 8000. But when I try to handle it through my frontend setup? Nada. Just silence and broken dreams(empty index file).
So now I’m wondering would it really be that bad if I just let Django serve this one thing directly? Let it have its moment in the spotlight with the password reset form while the rest of the app sticks to the decoupled API and JS plan?
Is this a common workaround? A sign of weakness? A pact with the devil? Just looking for some wisdom (or permission) from
/r/django
https://redd.it/1mdla52
Right. Ive been avoiding asking thinking I will eventually fix this but no dice. It’s nearly midnight(wrecked), I’m now in bed(fiance will kill me if I wake her), spiritually defeated(it's temporary), and here we are.
I’m building a personal project with a decoupled setup: DRF as the backend and a super minimal HTML and JS(it's as vanilla as you can get) frontend... essentially a glorified test harness. Nothing fancy, just enough to click buttons and cry.
Here’s the problem: I can't get the password reset form to show up properly after clicking the reset link that gets emailed. The link to send the reset email works fine when I use Django’s built-in templates on port 8000. But when I try to handle it through my frontend setup? Nada. Just silence and broken dreams(empty index file).
So now I’m wondering would it really be that bad if I just let Django serve this one thing directly? Let it have its moment in the spotlight with the password reset form while the rest of the app sticks to the decoupled API and JS plan?
Is this a common workaround? A sign of weakness? A pact with the devil? Just looking for some wisdom (or permission) from
/r/django
https://redd.it/1mdla52
Reddit
From the django community on Reddit
Explore this post and more from the django community
Proxy for using LSP in a Docker container
I just solved a specific problem: handling the LSP inside a Docker container without requiring the libraries to be installed on the host. This was focused in Python using Pyright and Ruff, but can be extensible to another language.
https://github.com/richardhapb/lsproxy
/r/Python
https://redd.it/1mdq489
I just solved a specific problem: handling the LSP inside a Docker container without requiring the libraries to be installed on the host. This was focused in Python using Pyright and Ruff, but can be extensible to another language.
https://github.com/richardhapb/lsproxy
/r/Python
https://redd.it/1mdq489
GitHub
GitHub - richardhapb/lsproxy: An LSP proxy to run LSP inside Docker containers.
An LSP proxy to run LSP inside Docker containers. Contribute to richardhapb/lsproxy development by creating an account on GitHub.
Looking for advice on a crash course
Hey everyone, I am a hobbyist that hasn't tinkered with django much for about 5+ years. I have previously only made very simple apps like a building directory in the past.
I am looking to create a new application and would like to re-familiarize myself with django and am hoping someone may be able to recommend a course covering the current version. I'm willing to pay for a course (I previously used Jose Portillo's course on udemy).
/r/django
https://redd.it/1mdr8qe
Hey everyone, I am a hobbyist that hasn't tinkered with django much for about 5+ years. I have previously only made very simple apps like a building directory in the past.
I am looking to create a new application and would like to re-familiarize myself with django and am hoping someone may be able to recommend a course covering the current version. I'm willing to pay for a course (I previously used Jose Portillo's course on udemy).
/r/django
https://redd.it/1mdr8qe
Reddit
From the django community on Reddit
Explore this post and more from the django community
Real‑world ML course with personalized gamified challenges—feedback wanted on structure & format! 🎓
Hi everyone — I've been lurking these subreddits for years and finally wrapped up a course that’s very much inspired by what I’ve learned from this community.
I previously created a Udemy course—but in retrospect it felt too one‑size‑fits‑all and lacked engagement. Feedback showed that it wasn’t personalized enough, and students tends to drop off without reaching applied concepts.
So this iteration (on [Uphop.ai](https://www.uphop.ai/app/c/02d00637-0d71-40b3-af0b-ace55c2b6378?code=e12cd)) has been designed from scratch to tackle those issues:
* **Practice games at the end of every unit**, not just quiz questions—scenario-based immersive tasks. It’s true gamification applied to learning design, which literatures show can really boost engagement and performance when tailored to individual user preferences.
* **Hyper‑personalized experience**: learners get to pick challenges or paths that suit their goals, pacing, and interests, instead of being forced into a rigid progression.
* **Core modules**: Supervised/Unsupervised Learning, NLP, Deep Learning, AI ethics, Cloud deployments.
I’d love your honest feedback on:
1. Does the idea of challenge-based “games” at the end of modules sound motivating to you?
2. Would a hyper-personalized track (choose‑your‑own‑challenge or order) make a difference in how you'd stick with a course?
3. How balanced does the path from foundations → advanced topics sound? Any parts you’d reorder or expand?
The first unit is completely
/r/Python
https://redd.it/1mdvynt
Hi everyone — I've been lurking these subreddits for years and finally wrapped up a course that’s very much inspired by what I’ve learned from this community.
I previously created a Udemy course—but in retrospect it felt too one‑size‑fits‑all and lacked engagement. Feedback showed that it wasn’t personalized enough, and students tends to drop off without reaching applied concepts.
So this iteration (on [Uphop.ai](https://www.uphop.ai/app/c/02d00637-0d71-40b3-af0b-ace55c2b6378?code=e12cd)) has been designed from scratch to tackle those issues:
* **Practice games at the end of every unit**, not just quiz questions—scenario-based immersive tasks. It’s true gamification applied to learning design, which literatures show can really boost engagement and performance when tailored to individual user preferences.
* **Hyper‑personalized experience**: learners get to pick challenges or paths that suit their goals, pacing, and interests, instead of being forced into a rigid progression.
* **Core modules**: Supervised/Unsupervised Learning, NLP, Deep Learning, AI ethics, Cloud deployments.
I’d love your honest feedback on:
1. Does the idea of challenge-based “games” at the end of modules sound motivating to you?
2. Would a hyper-personalized track (choose‑your‑own‑challenge or order) make a difference in how you'd stick with a course?
3. How balanced does the path from foundations → advanced topics sound? Any parts you’d reorder or expand?
The first unit is completely
/r/Python
https://redd.it/1mdvynt
datatrees & xdatatrees Release: Improved Forward Reference Handling and New XML Field Types
Just released a new version of the `datatrees` and `xdatatrees` libraries with several key updates.
* `datatrees 0.3.6`: An extension for Python `dataclasses`.
* `xdatatrees 0.1.2`: A declarative XML serialization library for `datatrees`.
# Key Changes:
**1. Improved Forward Reference Diagnostics (**`datatrees`**)** Using an undefined forward reference (e.g., `'MyClass'`) no longer results in a generic `NameError`. The library now raises a specific `TypeError` that clearly identifies the unresolved type hint and the class it belongs to, simplifying debugging.
**2. New Field Type:** `TextElement` **(**`xdatatrees`**)** This new field type directly maps a class attribute to a simple XML text element.
* **Example Class:**
​
@xdatatree
class Product:
name: str = xfield(ftype=TextElement)
* **Resulting XML:**
```xml
<product><name>My Product</name></product>
**3. New Field Type:** `TextContent` **(**`xdatatrees`**)** This new field type maps a class attribute to the text content of its parent XML element, which is essential for handling mixed-content XML.
* **Example Class:**
​
@xdatatree
class Address:
label: str = xfield(ftype=Attribute)
/r/Python
https://redd.it/1mdzcyf
Just released a new version of the `datatrees` and `xdatatrees` libraries with several key updates.
* `datatrees 0.3.6`: An extension for Python `dataclasses`.
* `xdatatrees 0.1.2`: A declarative XML serialization library for `datatrees`.
# Key Changes:
**1. Improved Forward Reference Diagnostics (**`datatrees`**)** Using an undefined forward reference (e.g., `'MyClass'`) no longer results in a generic `NameError`. The library now raises a specific `TypeError` that clearly identifies the unresolved type hint and the class it belongs to, simplifying debugging.
**2. New Field Type:** `TextElement` **(**`xdatatrees`**)** This new field type directly maps a class attribute to a simple XML text element.
* **Example Class:**
​
@xdatatree
class Product:
name: str = xfield(ftype=TextElement)
* **Resulting XML:**
```xml
<product><name>My Product</name></product>
**3. New Field Type:** `TextContent` **(**`xdatatrees`**)** This new field type maps a class attribute to the text content of its parent XML element, which is essential for handling mixed-content XML.
* **Example Class:**
​
@xdatatree
class Address:
label: str = xfield(ftype=Attribute)
/r/Python
https://redd.it/1mdzcyf
Reddit
From the Python community on Reddit: datatrees & xdatatrees Release: Improved Forward Reference Handling and New XML Field Types
Explore this post and more from the Python community
How to encrypt the database?
I've seen many apps say their data is encrypted. I've personally never heard of encryption in django.
How to encrypt the data, (when) is that actually necessary?
/r/django
https://redd.it/1mdysok
I've seen many apps say their data is encrypted. I've personally never heard of encryption in django.
How to encrypt the data, (when) is that actually necessary?
/r/django
https://redd.it/1mdysok
Reddit
From the django community on Reddit
Explore this post and more from the django community
Flask - AI-powered Image Search App using OpenAI’s CLIP model - Step by Step!!
https://youtu.be/38LsOFesigg?si=RgTFuHGytW6vEs3t
Learn how to build an AI-powered Image Search App using OpenAI’s CLIP model and Flask — step by step!
This project shows you how to:
Generate embeddings for images using CLIP.
Perform text-to-image search.
Build a Flask web app to search and display similar images.
Run everything on CPU — no GPU required!
GitHub Repo: https://github.com/datageekrj/Flask-Image-Search-YouTube-Tutorial
AI, image search, CLIP model, Python tutorial, Flask tutorial, OpenAI CLIP, image search engine, AI image search, computer vision, machine learning, search engine with AI, Python AI project, beginner AI project, flask AI project, CLIP image search
/r/flask
https://redd.it/1me0i1t
https://youtu.be/38LsOFesigg?si=RgTFuHGytW6vEs3t
Learn how to build an AI-powered Image Search App using OpenAI’s CLIP model and Flask — step by step!
This project shows you how to:
Generate embeddings for images using CLIP.
Perform text-to-image search.
Build a Flask web app to search and display similar images.
Run everything on CPU — no GPU required!
GitHub Repo: https://github.com/datageekrj/Flask-Image-Search-YouTube-Tutorial
AI, image search, CLIP model, Python tutorial, Flask tutorial, OpenAI CLIP, image search engine, AI image search, computer vision, machine learning, search engine with AI, Python AI project, beginner AI project, flask AI project, CLIP image search
/r/flask
https://redd.it/1me0i1t
YouTube
Build a Smart Image Search App with OpenAI CLIP + Flask (Step-by-Step Tutorial)
Learn how to build an AI-powered Image Search App using OpenAI’s CLIP model and Flask — step by step!
This project shows you how to:
- Generate embeddings for images using CLIP.
- Perform text-to-image search.
- Build a Flask web app to search and display…
This project shows you how to:
- Generate embeddings for images using CLIP.
- Perform text-to-image search.
- Build a Flask web app to search and display…
OAuth/API Authorization Redirects to Wrong App - Flask/Strava API
Hey all,
I'm building a small web app with a Flask backend and Vue frontend. I'm trying to use the Strava API for user authentication, but I'm running into a very strange problem.
When a user tries to log in, my Flask backend correctly uses my application's Client ID to build the authorization URL. However, the resulting page is for a completely different app called "Simon's Journey Viz" (with its own name, description, and scopes).
I've double-checked my Client ID/Secret, cleared my browser's cache, and even verified my app.py is loading the correct credentials. I've also found that I can't manage my own Strava API app (I can't delete it or create a new one).
Has anyone seen a similar OAuth/API redirect issue where the wrong application is triggered on the authorization page? Could this be related to a specific Flask configuration or something on the API's server-side?
Any insights or potential solutions would be much appreciated!
Thanks
/r/flask
https://redd.it/1me12p8
Hey all,
I'm building a small web app with a Flask backend and Vue frontend. I'm trying to use the Strava API for user authentication, but I'm running into a very strange problem.
When a user tries to log in, my Flask backend correctly uses my application's Client ID to build the authorization URL. However, the resulting page is for a completely different app called "Simon's Journey Viz" (with its own name, description, and scopes).
I've double-checked my Client ID/Secret, cleared my browser's cache, and even verified my app.py is loading the correct credentials. I've also found that I can't manage my own Strava API app (I can't delete it or create a new one).
Has anyone seen a similar OAuth/API redirect issue where the wrong application is triggered on the authorization page? Could this be related to a specific Flask configuration or something on the API's server-side?
Any insights or potential solutions would be much appreciated!
Thanks
/r/flask
https://redd.it/1me12p8
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Using TailwindCss in django
Hey guys,
Recently I built a project and wanted to use tailwindcss for the frontend because you know it saves time and energy and I thought oh I will just use it in Django templates it can't be that bad right.... oh boy I was wrong. So without further ado here is everything I learned trying to put tailwindcss in Django templates using the https://github.com/MrBin99/django-vite package :)
1. Follow this tutorial for basic setup: https://www.youtube.com/watch?v=wgN04Byqi9c
This tutorial explains everything really well and it came out after the tailwindcss 4 update so it is up to date as well because I had a whole heap of pain trying to understand why nothing was working only to realize I was trying to install an outdated tailwindcss package.
2. Trying to remember to include the three tags(
{% load djangovite %}
<head>
{% vitehmrclient %}
{% viteasset '<path to your assets>' %}
</head>
in every single page is an absolute nightmare so Django templating becomes 10x more useful trust me.
3. Django-vite in production is an absolute nightmare because firstly
/r/django
https://redd.it/1me3j8l
Hey guys,
Recently I built a project and wanted to use tailwindcss for the frontend because you know it saves time and energy and I thought oh I will just use it in Django templates it can't be that bad right.... oh boy I was wrong. So without further ado here is everything I learned trying to put tailwindcss in Django templates using the https://github.com/MrBin99/django-vite package :)
1. Follow this tutorial for basic setup: https://www.youtube.com/watch?v=wgN04Byqi9c
This tutorial explains everything really well and it came out after the tailwindcss 4 update so it is up to date as well because I had a whole heap of pain trying to understand why nothing was working only to realize I was trying to install an outdated tailwindcss package.
2. Trying to remember to include the three tags(
{% load djangovite %}
<head>
{% vitehmrclient %}
{% viteasset '<path to your assets>' %}
</head>
in every single page is an absolute nightmare so Django templating becomes 10x more useful trust me.
3. Django-vite in production is an absolute nightmare because firstly
/r/django
https://redd.it/1me3j8l
GitHub
GitHub - MrBin99/django-vite: Integration of ViteJS in a Django project.
Integration of ViteJS in a Django project. Contribute to MrBin99/django-vite development by creating an account on GitHub.
Friday Daily Thread: r/Python Meta and Free-Talk Fridays
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1mehndi
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1mehndi
Redditinc
Reddit Rules
Reddit Rules - Reddit
Can't deploy Flask application in Render
I'm having trouble trying to deploy my Flask backend in Render. I keep getting the same error:
gunicorn.errors.AppImportError: Failed to find attribute 'app' in 'app'. I had to hide some other information
This is my app.py and it's not inside any other file:
# app.py
from flask import Flask
def createapp():
app = Flask(name)
CORS(app)
if name == 'main':
createapp().run(debug=True, port=5000)
/r/flask
https://redd.it/1menxd3
I'm having trouble trying to deploy my Flask backend in Render. I keep getting the same error:
gunicorn.errors.AppImportError: Failed to find attribute 'app' in 'app'. I had to hide some other information
This is my app.py and it's not inside any other file:
# app.py
from flask import Flask
def createapp():
app = Flask(name)
CORS(app)
if name == 'main':
createapp().run(debug=True, port=5000)
/r/flask
https://redd.it/1menxd3
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
What are some good projects for resume
I am currently learning django and wanted to know some projects that would be good to be put on my resume
Pls Help Me
/r/django
https://redd.it/1mens9t
I am currently learning django and wanted to know some projects that would be good to be put on my resume
Pls Help Me
/r/django
https://redd.it/1mens9t
Reddit
From the django community on Reddit
Explore this post and more from the django community
Why Python's deepcopy() is surprisingly slow (and better alternatives)
I've been running into performance bottlenecks in the wild where `copy.deepcopy()` was the bottleneck. After digging into it, I discovered that deepcopy can actually be slower than even serializing and deserializing with pickle or json in many cases!
I wrote up my findings on why this happens and some practical alternatives that can give you significant performance improvements: https://www.codeflash.ai/post/why-pythons-deepcopy-can-be-so-slow-and-how-to-avoid-it
**TL;DR:** deepcopy's recursive approach and safety checks create memory overhead that often isn't worth it. The post covers when to use alternatives like shallow copy + manual handling, pickle round-trips, or restructuring your code to avoid copying altogether.
Has anyone else run into this? Curious to hear about other performance gotchas you've discovered in commonly-used Python functions.
/r/Python
https://redd.it/1mehrc0
I've been running into performance bottlenecks in the wild where `copy.deepcopy()` was the bottleneck. After digging into it, I discovered that deepcopy can actually be slower than even serializing and deserializing with pickle or json in many cases!
I wrote up my findings on why this happens and some practical alternatives that can give you significant performance improvements: https://www.codeflash.ai/post/why-pythons-deepcopy-can-be-so-slow-and-how-to-avoid-it
**TL;DR:** deepcopy's recursive approach and safety checks create memory overhead that often isn't worth it. The post covers when to use alternatives like shallow copy + manual handling, pickle round-trips, or restructuring your code to avoid copying altogether.
Has anyone else run into this? Curious to hear about other performance gotchas you've discovered in commonly-used Python functions.
/r/Python
https://redd.it/1mehrc0
www.codeflash.ai
Codeflash - Why Python’s deepcopy Can Be So Slow (and How to Avoid It)
The comprehensive copying by deepcopy is convenient but expensive. In this post we discuss why is deepcopy is expensive, and show how avoiding the slowdown associated with deepcopy can lead to upto 180x speedups.
Just built a Django REST API starter template
Yo, what's up guys! Check out this Django REST API template I built. It's got email verification, JWT auth, and some sweet-looking email templates. You can't log in until you've verified your email, which is pretty neat.
I also added the debug toolbar and browsable API, so setting up a new project is super fast. This thing saves me so much time.
If you're into Django, give it a try. It might save you some time too!
GitHub:https://github.com/Alien501/django-drf-template
/r/djangolearning
https://redd.it/1meq04t
Yo, what's up guys! Check out this Django REST API template I built. It's got email verification, JWT auth, and some sweet-looking email templates. You can't log in until you've verified your email, which is pretty neat.
I also added the debug toolbar and browsable API, so setting up a new project is super fast. This thing saves me so much time.
If you're into Django, give it a try. It might save you some time too!
GitHub:https://github.com/Alien501/django-drf-template
/r/djangolearning
https://redd.it/1meq04t
GitHub
GitHub - Alien501/django-drf-template
Contribute to Alien501/django-drf-template development by creating an account on GitHub.
How can i avoid users from accessing the django admin dashboard page when they try to navigate to it using the url in the adress bar
In development users can navigate to my app urls by putting the url manually in the adress bar at the top of the browser what can be a more practical way to prevent normal users from accessing the admin login page?
/r/django
https://redd.it/1mel0pv
In development users can navigate to my app urls by putting the url manually in the adress bar at the top of the browser what can be a more practical way to prevent normal users from accessing the admin login page?
/r/django
https://redd.it/1mel0pv
Reddit
From the django community on Reddit
Explore this post and more from the django community
Documentation generator for Flask+React apps
Hi folks,
I built a tool that reads your Flask app code (plus React frontend) and automatically generates API and UI documentation from it.
It's called AutoDocAI. You upload a zipped project, and it returns clean Markdown docs for your backend routes and frontend components.
I'd love for flask devs here to give it a try. Especially, against a bit more complex apps that could benefit from docs.
I'd be happy to jump on a zoom* call with eager developers who would be happy to discuss this project along with testing it.
Just zip and upload your Flask+React codebase and upload it. And you'll get a zipped folder with your app's documentation in markdown format.
Appreciate any feedback, bugs, or suggestions. 🙏
Thanks!
*On a free Zoom account but I'll be happy to catch up over any other video conf app.
Update: I'm okay with apps that are not important, but can be valuable from an evaluation perspective. At this stage, I'm only willing to test whether this is effective. If there's a need, I'll build an offline binary that can work with local, Ollama integration too.
/r/flask
https://redd.it/1mermm1
Hi folks,
I built a tool that reads your Flask app code (plus React frontend) and automatically generates API and UI documentation from it.
It's called AutoDocAI. You upload a zipped project, and it returns clean Markdown docs for your backend routes and frontend components.
I'd love for flask devs here to give it a try. Especially, against a bit more complex apps that could benefit from docs.
I'd be happy to jump on a zoom* call with eager developers who would be happy to discuss this project along with testing it.
Just zip and upload your Flask+React codebase and upload it. And you'll get a zipped folder with your app's documentation in markdown format.
Appreciate any feedback, bugs, or suggestions. 🙏
Thanks!
*On a free Zoom account but I'll be happy to catch up over any other video conf app.
Update: I'm okay with apps that are not important, but can be valuable from an evaluation perspective. At this stage, I'm only willing to test whether this is effective. If there's a need, I'll build an offline binary that can work with local, Ollama integration too.
/r/flask
https://redd.it/1mermm1
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Feedback for an orchestration project
I have a project in mind that I want feedback about.
The project consists:
\- Server with a REST-API
\- Multiple agent with a REST-API
Both REST-API's will be made through flask-restful.
The communication should be initiated by the server through SSL connection and the agent should respond. And what the server will do: asking to execute command like statuses, changing configuration of an specific application and restart the application. The agent does the actual execution.
So the type of data is not realtime, so there is no need to use websockets.
But I can't rap my head around about the following:
\- Is it wise to have multi-agent architecture with REST-api's on both sides or is there a better way?
\- In case of multiple agents that potentially generate a lot of traffic: Should I use a message broker and in what way in case of the REST-API's?
\- What else do I need to take into consideration? (I already thought about authentication and authorization, what is going to be token-based and ACL's)
/r/flask
https://redd.it/1mexvj3
I have a project in mind that I want feedback about.
The project consists:
\- Server with a REST-API
\- Multiple agent with a REST-API
Both REST-API's will be made through flask-restful.
The communication should be initiated by the server through SSL connection and the agent should respond. And what the server will do: asking to execute command like statuses, changing configuration of an specific application and restart the application. The agent does the actual execution.
So the type of data is not realtime, so there is no need to use websockets.
But I can't rap my head around about the following:
\- Is it wise to have multi-agent architecture with REST-api's on both sides or is there a better way?
\- In case of multiple agents that potentially generate a lot of traffic: Should I use a message broker and in what way in case of the REST-API's?
\- What else do I need to take into consideration? (I already thought about authentication and authorization, what is going to be token-based and ACL's)
/r/flask
https://redd.it/1mexvj3
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Forget metaclasses; Python’s
Think you need a metaclass? You probably just need
Most people reach for metaclasses when customizing subclass behaviour. But in many cases,
What is
It’s a hook that gets automatically called on the base class whenever a new subclass is defined. Think of it like a class-level
# Why use it?
Validate or register subclasses
Enforce class-level interfaces or attributes
Automatically inject or modify subclass properties
Avoid the complexity of full metaclasses
# Example: Plugin Auto-Registration
class PluginBase:
plugins =
def initsubclass(cls, **kwargs):
super().initsubclass(kwargs)
print(f"Registering: {cls.name}")
PluginBase.plugins.append(cls)
class PluginA(PluginBase): pass
class PluginB(PluginBase): pass
print(PluginBase.plugins)
Output:
Registering: PluginA
Registering: PluginB
/r/Python
https://redd.it/1mevs3i
__init_subclass__ is all you really needThink you need a metaclass? You probably just need
__init_subclass__; Python’s underused subclass hook.Most people reach for metaclasses when customizing subclass behaviour. But in many cases,
__init_subclass__ is exactly what you need; and it’s been built into Python since 3.6.What is
__init_subclass__**?**It’s a hook that gets automatically called on the base class whenever a new subclass is defined. Think of it like a class-level
__init__, but for subclassing; not instancing.# Why use it?
Validate or register subclasses
Enforce class-level interfaces or attributes
Automatically inject or modify subclass properties
Avoid the complexity of full metaclasses
# Example: Plugin Auto-Registration
class PluginBase:
plugins =
def initsubclass(cls, **kwargs):
super().initsubclass(kwargs)
print(f"Registering: {cls.name}")
PluginBase.plugins.append(cls)
class PluginA(PluginBase): pass
class PluginB(PluginBase): pass
print(PluginBase.plugins)
Output:
Registering: PluginA
Registering: PluginB
/r/Python
https://redd.it/1mevs3i
Reddit
From the Python community on Reddit
Explore this post and more from the Python community