Django rest framework
Hey, everyone can you guys just suggest to me the best resource to learn django rest framework(drf) for beginners.
Also, I want to ask that I have the experience of backend development using NodeJS and express but I am confused do I have to learn about normal template based django first and then shift to drf or I can directly start with drf.
I have limited time so I want to learn it faster.
/r/djangolearning
https://redd.it/1ejge1t
Hey, everyone can you guys just suggest to me the best resource to learn django rest framework(drf) for beginners.
Also, I want to ask that I have the experience of backend development using NodeJS and express but I am confused do I have to learn about normal template based django first and then shift to drf or I can directly start with drf.
I have limited time so I want to learn it faster.
/r/djangolearning
https://redd.it/1ejge1t
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 script 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/1ejhq9s
# 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 script 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/1ejhq9s
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Website To Easily Develop Tkinter GUIs
# What My Project Does
I've been working for a while in this project where you can easily create Tkinter Interfaces.
It's a website where you can just drag and drop widgets in a figma-like interface to customize them. Afterwars, you just gotta click Translate to Code and it will translate your interface to Tkinter Code!
# Target Audience
As a wise man once said DEVELOPERS DEVELOPERS DEVELOPERS! To make your life easier when creating tkinter interfaces!
# Comparison
I used to use a website called VisualTK, but it is down since a while.
# GitHub
https://github.com/arthurdeka/CustomTkinter-Templates/tree/main?tab=readme-ov-file
(First link on README)
/r/Python
https://redd.it/1ejcbhe
# What My Project Does
I've been working for a while in this project where you can easily create Tkinter Interfaces.
It's a website where you can just drag and drop widgets in a figma-like interface to customize them. Afterwars, you just gotta click Translate to Code and it will translate your interface to Tkinter Code!
# Target Audience
As a wise man once said DEVELOPERS DEVELOPERS DEVELOPERS! To make your life easier when creating tkinter interfaces!
# Comparison
I used to use a website called VisualTK, but it is down since a while.
# GitHub
https://github.com/arthurdeka/CustomTkinter-Templates/tree/main?tab=readme-ov-file
(First link on README)
/r/Python
https://redd.it/1ejcbhe
GitHub
GitHub - arthurdeka/CustomTkinter-Templates: A collection of CustomTkinter templates for various types of widgets and simple example…
A collection of CustomTkinter templates for various types of widgets and simple example projects - arthurdeka/CustomTkinter-Templates
Python Skills for AWS
So if you want to be a great cloud engineer, you need Python scripting skills, Linux skills and some networking knowledge....What do i do
/r/Python
https://redd.it/1ejplk8
So if you want to be a great cloud engineer, you need Python scripting skills, Linux skills and some networking knowledge....What do i do
/r/Python
https://redd.it/1ejplk8
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Is Learning Django REST Framework (DRF) Worth It?
I've recently started learning Django REST Framework (DRF), and I've noticed that many methods need to be overridden for even simple tasks. This made me wonder, why can't we just create APIs using Django itself? Is creating APIs using Django insecure or what?
I'd love to hear from the community about this. Is DRF worth the extra effort? What are the main advantages of DRF over Django for API development? Any insights or experiences would be greatly appreciated!
Thanks in advance!
/r/django
https://redd.it/1ejmz25
I've recently started learning Django REST Framework (DRF), and I've noticed that many methods need to be overridden for even simple tasks. This made me wonder, why can't we just create APIs using Django itself? Is creating APIs using Django insecure or what?
I'd love to hear from the community about this. Is DRF worth the extra effort? What are the main advantages of DRF over Django for API development? Any insights or experiences would be greatly appreciated!
Thanks in advance!
/r/django
https://redd.it/1ejmz25
Reddit
From the django community on Reddit
Explore this post and more from the django community
This Flask site automatically generates Flask code for you
https://bullship.dev
/r/flask
https://redd.it/1ejbhvu
https://bullship.dev
/r/flask
https://redd.it/1ejbhvu
Reddit
From the flask community on Reddit: This Flask site automatically generates Flask code for you
Posted by Just-Indication35 - No votes and 3 comments
How to handle Blog data
Hey I've been following miguels tutorial and have a few questions:
What is the best way to handle blog data? I want to write multi page articles with gifs / images if possible. I have 2 ideas on how to handle this and wondering what is the generally accepted practice:
1. Create blog table with TEXT as field. Not sure how well it handles formatting like newline characters / whitespace etc. Requires me to then create a form / url and have to be logged into the website to write the articles. Probably easiest solution?
2. Create a directory with markdown files for my articles and have a blog table track the file location and meta data. This means I can write them in markdown somewhere else and don't need to make another form / url for writing them. Issue is how do i keep my db in sync with the blog, if the file names change, meta data changes, etc. Also how would i add new articles once the website it deployed? Copy paste somehow from my local machine to the server?
3. Another way?
Last question, how does rendering markdown work in the browser? Do i have any control over the
/r/flask
https://redd.it/1eiknlx
Hey I've been following miguels tutorial and have a few questions:
What is the best way to handle blog data? I want to write multi page articles with gifs / images if possible. I have 2 ideas on how to handle this and wondering what is the generally accepted practice:
1. Create blog table with TEXT as field. Not sure how well it handles formatting like newline characters / whitespace etc. Requires me to then create a form / url and have to be logged into the website to write the articles. Probably easiest solution?
2. Create a directory with markdown files for my articles and have a blog table track the file location and meta data. This means I can write them in markdown somewhere else and don't need to make another form / url for writing them. Issue is how do i keep my db in sync with the blog, if the file names change, meta data changes, etc. Also how would i add new articles once the website it deployed? Copy paste somehow from my local machine to the server?
3. Another way?
Last question, how does rendering markdown work in the browser? Do i have any control over the
/r/flask
https://redd.it/1eiknlx
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
I need a custom flask header
* must be flask
* must be custom and none of the defaults
* cannot wrap and not allowed to use request methods
* may not chain load off app route, route_map, or return per handle
* must be custom header
/r/flask
https://redd.it/1eiu8js
* must be flask
* must be custom and none of the defaults
* cannot wrap and not allowed to use request methods
* may not chain load off app route, route_map, or return per handle
* must be custom header
/r/flask
https://redd.it/1eiu8js
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Sideways Shooter game in Python. Python Crash Course, 3nd Edition.
Hi,
I'm new to programming and decided to pick up Python as first language. I recently completed Python Crash Course by Eric Matthes, and I must say it was a fantastic book.
I had so much fun creating the Alien Invasion game that I ended up making four variations of it.
I'm now moving on to Dead Simple Python to develop my skills while doing some solo projects.
If anyone is interested, you can check out the games I made here:
https://github.com/E-Rinaudo/first\_solo\_projects/tree/main/solo\_projects/games
Happy coding!
/r/Python
https://redd.it/1ejbvpj
Hi,
I'm new to programming and decided to pick up Python as first language. I recently completed Python Crash Course by Eric Matthes, and I must say it was a fantastic book.
I had so much fun creating the Alien Invasion game that I ended up making four variations of it.
I'm now moving on to Dead Simple Python to develop my skills while doing some solo projects.
If anyone is interested, you can check out the games I made here:
https://github.com/E-Rinaudo/first\_solo\_projects/tree/main/solo\_projects/games
Happy coding!
/r/Python
https://redd.it/1ejbvpj
GitHub
first_solo_projects/solo_projects/games at main · E-Rinaudo/first_solo_projects
A collection of my first solo Python projects done while studying Python Crash Course. - E-Rinaudo/first_solo_projects
D Self-Promotion Thread
Please post your personal projects, startups, product placements, collaboration needs, blogs etc.
Please mention the payment and pricing requirements for products and services.
Please do not post link shorteners, link aggregator websites , or auto-subscribe links.
--
Any abuse of trust will lead to bans.
Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the title.
--
Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.
/r/MachineLearning
https://redd.it/1ejkdhj
Please post your personal projects, startups, product placements, collaboration needs, blogs etc.
Please mention the payment and pricing requirements for products and services.
Please do not post link shorteners, link aggregator websites , or auto-subscribe links.
--
Any abuse of trust will lead to bans.
Encourage others who create new posts for questions to post here instead!
Thread will stay alive until next one so keep posting after the date in the title.
--
Meta: This is an experiment. If the community doesnt like this, we will cancel it. This is to encourage those in the community to promote their work by not spamming the main threads.
/r/MachineLearning
https://redd.it/1ejkdhj
Reddit
From the MachineLearning community on Reddit
Explore this post and more from the MachineLearning community
[D] Calculating the Cost of a Google Deepmind Paper
https://152334h.github.io/blog/scaling-exponents/
/r/MachineLearning
https://redd.it/1ej5h4b
https://152334h.github.io/blog/scaling-exponents/
/r/MachineLearning
https://redd.it/1ej5h4b
152334H
Calculating the Cost of a Google Deepmind Paper
Recently, GDM released a great paper titled, Scaling Exponents Across Parameterizations and Optimizers, in which they conduct over 10,000 LLM training runs to obtain optimal hyperparameters under different regimes.
After reading it (it was great), I wanted…
After reading it (it was great), I wanted…
Why is no one using full-stack python for web development? Has no one heard of the FHBH stack ??
Hey guys, I recently came across some libraries that seem to be very interesting to work with for the purpose of creating websites, but I wanted to know why no one uses them, or why they are not so widespread. I haven't had time to develop a more advanced and dynamic project with these libraries yet, but I believe that together they can be extremely useful, powerful and versatile for websites of any purpose. Maybe because no one knows about them, or because there is no benefit in using them and there are better ways to do it, but in a quick project test that I did, the dynamics of working with them seemed very interesting to me.
The libraries that I found were these:
**FastAPI**
A microframework for creating APIs, which can easily be used to create powerful websites.
**HTPY**
HTPY is a library that I recently discovered that was developed by a company that needed a better way to develop their projects with Django and created this library. It encapsulates HTML tags in Python classes, so that all HTML code can be created directly from a Python file, making it possible to use all the power that a programming language offers to generate
/r/Python
https://redd.it/1ejympc
Hey guys, I recently came across some libraries that seem to be very interesting to work with for the purpose of creating websites, but I wanted to know why no one uses them, or why they are not so widespread. I haven't had time to develop a more advanced and dynamic project with these libraries yet, but I believe that together they can be extremely useful, powerful and versatile for websites of any purpose. Maybe because no one knows about them, or because there is no benefit in using them and there are better ways to do it, but in a quick project test that I did, the dynamics of working with them seemed very interesting to me.
The libraries that I found were these:
**FastAPI**
A microframework for creating APIs, which can easily be used to create powerful websites.
**HTPY**
HTPY is a library that I recently discovered that was developed by a company that needed a better way to develop their projects with Django and created this library. It encapsulates HTML tags in Python classes, so that all HTML code can be created directly from a Python file, making it possible to use all the power that a programming language offers to generate
/r/Python
https://redd.it/1ejympc
Tiangolo
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Django Rest Framework vs Django Ninja for Api?
whats the difference between 2 and which one to choose for api development
/r/django
https://redd.it/1ejr7qj
whats the difference between 2 and which one to choose for api development
/r/django
https://redd.it/1ejr7qj
Reddit
From the django community on Reddit
Explore this post and more from the django community
db.createall() - Does not create *.db file. Help please
So I have been following this course for a few days now, and I cant seem to replicate what his code is doing. It doesn't create the \*.db file on my end. I even copied his code directly from his github and tried running, still really does not create the db file. When I run my [main.py](http://main.py) file, it runs without any errors, just doesn't generate the db file. Any ideas? Here's the code.
**website/main.py:**
from website import createapp
app = createapp() # Initialize a flask application from init.py file
if name == 'main': # Run this only when run directly from this file
app.run(debug=True)
**website/init.py:**
from flask import Flask
from flasksqlalchemy import SQLAlchemy
from os import path
# Initialze the db object
db = SQLAlchemy()
DBNAME = 'database.db'
def createapp():
app = Flask(name)
/r/flask
https://redd.it/1ejxf8j
So I have been following this course for a few days now, and I cant seem to replicate what his code is doing. It doesn't create the \*.db file on my end. I even copied his code directly from his github and tried running, still really does not create the db file. When I run my [main.py](http://main.py) file, it runs without any errors, just doesn't generate the db file. Any ideas? Here's the code.
**website/main.py:**
from website import createapp
app = createapp() # Initialize a flask application from init.py file
if name == 'main': # Run this only when run directly from this file
app.run(debug=True)
**website/init.py:**
from flask import Flask
from flasksqlalchemy import SQLAlchemy
from os import path
# Initialze the db object
db = SQLAlchemy()
DBNAME = 'database.db'
def createapp():
app = Flask(name)
/r/flask
https://redd.it/1ejxf8j
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
[P] Direct Preference Optimization (DPO) for LLM Alignment From Scratch [Jupyter Notebook]
https://github.com/rasbt/LLMs-from-scratch/blob/main/ch07/04_preference-tuning-with-dpo/dpo-from-scratch.ipynb
/r/MachineLearning
https://redd.it/1ejwg9n
https://github.com/rasbt/LLMs-from-scratch/blob/main/ch07/04_preference-tuning-with-dpo/dpo-from-scratch.ipynb
/r/MachineLearning
https://redd.it/1ejwg9n
GitHub
LLMs-from-scratch/ch07/04_preference-tuning-with-dpo/dpo-from-scratch.ipynb at main · rasbt/LLMs-from-scratch
Implement a ChatGPT-like LLM in PyTorch from scratch, step by step - rasbt/LLMs-from-scratch
Generating Docx file
Hello everyone,
I have a problem. I need to generate a DOCX file that includes some data plots and a table. I have tried all the available solutions I found online, but none of them have worked. Can you enlighten me with some ideas or suggest a new library?
Thank you.
/r/Python
https://redd.it/1ejzy2l
Hello everyone,
I have a problem. I need to generate a DOCX file that includes some data plots and a table. I have tried all the available solutions I found online, but none of them have worked. Can you enlighten me with some ideas or suggest a new library?
Thank you.
/r/Python
https://redd.it/1ejzy2l
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Scheduled task
I’ve got some basic flask apps under my belt. But nothing too advanced. I know my projects aren’t set up properly, since it’s based on the basic flask intro tutorial.
I’m planning on building a flask project for one of my clubs to run a giveaway next July. I’d like do pull names / contact info from an API, and every 30 minutes on the day of the giveaway select and text winners from entries submitted since the prior winner selection. I’ve never done anything with scheduled or background tasks.
/r/flask
https://redd.it/1ek6xnj
I’ve got some basic flask apps under my belt. But nothing too advanced. I know my projects aren’t set up properly, since it’s based on the basic flask intro tutorial.
I’m planning on building a flask project for one of my clubs to run a giveaway next July. I’d like do pull names / contact info from an API, and every 30 minutes on the day of the giveaway select and text winners from entries submitted since the prior winner selection. I’ve never done anything with scheduled or background tasks.
/r/flask
https://redd.it/1ek6xnj
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Monday Daily Thread: Project ideas!
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1ek9spq
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1ek9spq
Limitations of
Are there any limitations as to what `subprocess` can't do or tools that are known to be incompatible with subprocesses?
I am looking to build an IDE that uses subprocesses to launch code in different environments.
For example, I know it is possible for a subprocess to spawn subprocesses.
However, I don't want to get 100 hours into development only to realize something hypothetical like "oh sqlite connections don't support suprocesses" or "you can't spawn [multithreading/multiprocessing\] from subprocess"
/r/Python
https://redd.it/1ek3vxc
subprocess?Are there any limitations as to what `subprocess` can't do or tools that are known to be incompatible with subprocesses?
I am looking to build an IDE that uses subprocesses to launch code in different environments.
For example, I know it is possible for a subprocess to spawn subprocesses.
However, I don't want to get 100 hours into development only to realize something hypothetical like "oh sqlite connections don't support suprocesses" or "you can't spawn [multithreading/multiprocessing\] from subprocess"
/r/Python
https://redd.it/1ek3vxc
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Thoughts on Django Microservices Architecture
I have recently started building Django Projects which I need to connect to each other with a microservices like approach. I was wondering if there are any good references that I can take to model my projects.
Also since its microservices and will have multiple pods for a service, I would also like to understand how we handle the ratelimiting across multiple pods of a service - I am using django_ratelimit as of now
/r/django
https://redd.it/1ek1cis
I have recently started building Django Projects which I need to connect to each other with a microservices like approach. I was wondering if there are any good references that I can take to model my projects.
Also since its microservices and will have multiple pods for a service, I would also like to understand how we handle the ratelimiting across multiple pods of a service - I am using django_ratelimit as of now
/r/django
https://redd.it/1ek1cis
Reddit
From the django community on Reddit
Explore this post and more from the django community