Introducing drf-api-action : Empowering Django REST Framework with Enhanced Functionality
Hi all,
I created a project named drf-api-action which Obtains web framework benefits for making API Python packages
What is drf-api-action?
drf-api-action is an ingenious extension to the popular rest_framework package, introducing a decorator called api_action.
Building upon the foundation of the existing action decorator, this new addition transforms a REST API call in a class view into a straightforward function call.
With this decorator, you can effortlessly create an instance of the view and explicitly invoke its functions.
✨ Key Benefits:
1. Arguments Validation: Ensure the integrity of your API by effortlessly validating arguments.
2. Pagination: Seamlessly implement pagination within your API functions.
3. Clear Separation of Concerns: Enjoy a clean separation between function signature and business logic, enhancing code readability.
4. Database Model Accessibility: Easily access Django DB models in other libraries or web services.
And Many More! : drf-api-action opens the door to many advantages, making DRF even more versatile for your projects.
GitHub Repository: Check out the code on GitHub
Dive Deeper on Medium: Read the in-depth article on Medium
If you find drf-api-action beneficial for your projects, show your support by starring the GitHub repository. Your stars help us grow and motivate us to continue enhancing this powerful tool for the DRF community.
# #Django #RESTFramework
/r/django
https://redd.it/186o89g
Hi all,
I created a project named drf-api-action which Obtains web framework benefits for making API Python packages
What is drf-api-action?
drf-api-action is an ingenious extension to the popular rest_framework package, introducing a decorator called api_action.
Building upon the foundation of the existing action decorator, this new addition transforms a REST API call in a class view into a straightforward function call.
With this decorator, you can effortlessly create an instance of the view and explicitly invoke its functions.
✨ Key Benefits:
1. Arguments Validation: Ensure the integrity of your API by effortlessly validating arguments.
2. Pagination: Seamlessly implement pagination within your API functions.
3. Clear Separation of Concerns: Enjoy a clean separation between function signature and business logic, enhancing code readability.
4. Database Model Accessibility: Easily access Django DB models in other libraries or web services.
And Many More! : drf-api-action opens the door to many advantages, making DRF even more versatile for your projects.
GitHub Repository: Check out the code on GitHub
Dive Deeper on Medium: Read the in-depth article on Medium
If you find drf-api-action beneficial for your projects, show your support by starring the GitHub repository. Your stars help us grow and motivate us to continue enhancing this powerful tool for the DRF community.
# #Django #RESTFramework
/r/django
https://redd.it/186o89g
GitHub
GitHub - Ori-Roza/drf-api-action: drf-api-action elevates Django Rest Framework testing with the action_api fixture, simplifying…
drf-api-action elevates Django Rest Framework testing with the action_api fixture, simplifying REST endpoint testing to a seamless, function-like experience. - Ori-Roza/drf-api-action
Native PyPI support in Pixi (conda package manager written in Rust)
https://prefix.dev/blog/pypi_support_in_pixi
/r/Python
https://redd.it/186rp72
https://prefix.dev/blog/pypi_support_in_pixi
/r/Python
https://redd.it/186rp72
prefix.dev
Unleashing PyPI support in pixi
We've deeply integrated PyPI packages into pixi.toml's - read more ...
Materio - Bootstrap Django Admin Dashboard Template
Hello Everyone,
I would like to share a brand new [Materio Bootstrap 5 Django Admin Template](https://themeselection.com/item/materio-bootstrap-django-admin-template/). It provides 10 useful applications like email, chat, academy, logistics, etc. that enable you to get started and build your applications faster. Besides, it also comes with 75+ Basic and advanced Cards for eCommerce Analytics, CRM, Statistics, and Interactive Charts.
Additionally, Materio Django Admin Dashboard has 15+ Front pages including a dedicated landing page and other most commonly used pages, saving you time and effort in launching your app.
Create eye-catching, high-quality, and responsive web applications with ease.
**Features:**
* Built with **Django 4**
* Using CSS Framework **Bootstrap 5.3.2**
* **CRUD Example**
* **Docker** for Faster Development
* **Vertical and horizontal** layouts
* Default, Bordered & Semi-dark themes
* **Light, Dark, and system** mode support
* Internationalization/i18n & RTL Ready
* **Python-Dotenv:** Environment variables
* Theme Config
* **5 Dashboard**
* **10 Pre-Built Apps**
* **15+ Front Pages &** Much more....!!
Hope you all like it.
Feel free to provide you
/r/django
https://redd.it/186ofvp
Hello Everyone,
I would like to share a brand new [Materio Bootstrap 5 Django Admin Template](https://themeselection.com/item/materio-bootstrap-django-admin-template/). It provides 10 useful applications like email, chat, academy, logistics, etc. that enable you to get started and build your applications faster. Besides, it also comes with 75+ Basic and advanced Cards for eCommerce Analytics, CRM, Statistics, and Interactive Charts.
Additionally, Materio Django Admin Dashboard has 15+ Front pages including a dedicated landing page and other most commonly used pages, saving you time and effort in launching your app.
Create eye-catching, high-quality, and responsive web applications with ease.
**Features:**
* Built with **Django 4**
* Using CSS Framework **Bootstrap 5.3.2**
* **CRUD Example**
* **Docker** for Faster Development
* **Vertical and horizontal** layouts
* Default, Bordered & Semi-dark themes
* **Light, Dark, and system** mode support
* Internationalization/i18n & RTL Ready
* **Python-Dotenv:** Environment variables
* Theme Config
* **5 Dashboard**
* **10 Pre-Built Apps**
* **15+ Front Pages &** Much more....!!
Hope you all like it.
Feel free to provide you
/r/django
https://redd.it/186ofvp
ThemeSelection
Materio Dashboard PRO - Django 5
Build responsive web apps easily with Materio Dashboard PRO - Django 5. Best Django admin with basic CRUD functionality & role-based auth.
Python scripts for FanDuel and DraftKings
Anyone interested in helping making code for gambling sites I been in contract with Sportradar it’s a company that keeps track of nba stats and data so you’ll get pace of play, player usage, player points, rebounds, assist etc
/r/Python
https://redd.it/18704rx
Anyone interested in helping making code for gambling sites I been in contract with Sportradar it’s a company that keeps track of nba stats and data so you’ll get pace of play, player usage, player points, rebounds, assist etc
/r/Python
https://redd.it/18704rx
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/18744bp
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/18744bp
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
I made a tool that generates template for you typed function like golang
https://x.com/RomanMatweenko/status/1729872546483642456?s=20
Suppose you've got a simple \#python function with types typed in. It'd be cool to have a tool that can generate test templates based on the types, right, like GOlang can? That's what this project about
original function we want to generate test template
simple result
VScode extension https://github.com/RomanMIzulin/python\_unittest\_vscode can be found in market by unittest_generator
/r/Python
https://redd.it/186r0gt
https://x.com/RomanMatweenko/status/1729872546483642456?s=20
Suppose you've got a simple \#python function with types typed in. It'd be cool to have a tool that can generate test templates based on the types, right, like GOlang can? That's what this project about
original function we want to generate test template
simple result
VScode extension https://github.com/RomanMIzulin/python\_unittest\_vscode can be found in market by unittest_generator
/r/Python
https://redd.it/186r0gt
X (formerly Twitter)
Роман Матвеенко (@RomanMatweenko) on X
Suppose you've got a simple #python function with types typed in. It'd be cool to have a tool that can generate test templates based on the types, right, like GOlang can? That's what this project about https://t.co/ZY5oSAKVvJ
I Have no Idea what to do
from flask import Flask, request, current_app, redirect, render_template, url_for, session, flash
from edit_form import NewForm, EditForm
app = Flask(__name__)
app.config['SECRET_KEY'] = '48a89ef0b9a63e63dc8a5ca21fc1871d'
blog = [{'id':1, 'author':'Tai', 'title': 'First post', 'content':'This is the content of post 1'},
{'id':2, 'author':'Kay', 'title': 'Second post', 'content':'This is the content of post 2'}]
@app.route('/', methods = ['POST','GET'] )
def index():
return render_template('homepage.html', blog_dic=blog)
@app.route('/post/<int:post_id>')
def post(post_id):
selected_post = next(( i for i in blog if i['id'] == post_id), None)
if selected_post:
return render_template('actual_blog_post.html', blog_dic=blog, detail_2=selected_post)
else:
return 'Post not found', 404
@app.route('/post/new_post', methods = ['POST','GET'] )
def new_post():
blog_add = {}
nw_post = NewForm()
if nw_post.validate_on_submit():
blog_add = {
'id': len(blog) + 1,
'author': nw_post.author.data,
'title': nw_post.title.data,
'content': nw_post.new_post.data
/r/flask
https://redd.it/1872zqr
from flask import Flask, request, current_app, redirect, render_template, url_for, session, flash
from edit_form import NewForm, EditForm
app = Flask(__name__)
app.config['SECRET_KEY'] = '48a89ef0b9a63e63dc8a5ca21fc1871d'
blog = [{'id':1, 'author':'Tai', 'title': 'First post', 'content':'This is the content of post 1'},
{'id':2, 'author':'Kay', 'title': 'Second post', 'content':'This is the content of post 2'}]
@app.route('/', methods = ['POST','GET'] )
def index():
return render_template('homepage.html', blog_dic=blog)
@app.route('/post/<int:post_id>')
def post(post_id):
selected_post = next(( i for i in blog if i['id'] == post_id), None)
if selected_post:
return render_template('actual_blog_post.html', blog_dic=blog, detail_2=selected_post)
else:
return 'Post not found', 404
@app.route('/post/new_post', methods = ['POST','GET'] )
def new_post():
blog_add = {}
nw_post = NewForm()
if nw_post.validate_on_submit():
blog_add = {
'id': len(blog) + 1,
'author': nw_post.author.data,
'title': nw_post.title.data,
'content': nw_post.new_post.data
/r/flask
https://redd.it/1872zqr
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
What are the best Python libraries to make map visualizations?
I am interested in making either world maps or maps of countries and their states/provinces and color them based on certain values. Are there any Python libraries that are good at this or how would you recommend going about this?
/r/Python
https://redd.it/186kux2
I am interested in making either world maps or maps of countries and their states/provinces and color them based on certain values. Are there any Python libraries that are good at this or how would you recommend going about this?
/r/Python
https://redd.it/186kux2
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
R Google DeepMind: 2.2 million new materials discovered using GNN (380k most stable, 736 already validated in labs)
Materials discovery is critical but tough. New materials enable big innovations like batteries or LEDs. But there are \~infinitely many combinations to try. Testing for them experimentally is slow and expensive.
So scientists and engineers want to simulate and screen materials on computers first. This can check way more candidates before real-world experiments. However, models historically struggled at accurately predicting if materials are stable.
Researchers at DeepMind made a system called GNoME that uses graph neural networks and active learning to push past these limits.
GNoME models materials' crystal structures as graphs and predicts formation energies. It actively generates and filters candidates, evaluating the most promising with simulations. This expands its knowledge and improves predictions over multiple cycles.
The authors introduced new ways to generate derivative structures that respect symmetries, further diversifying discoveries.
The results:
1. GNoME found 2.2 million new stable materials - equivalent to 800 years of normal discovery.
2. Of those, 380k were the most stable and candidates for validation.
3. 736 were validated in external labs. These include a totally new diamond-like optical material and another that may be a superconductor.
Overall this demonstrates how scaling up deep learning can massively speed up materials innovation. As data and models improve together, it'll accelerate solutions
/r/MachineLearning
https://redd.it/18779rp
Materials discovery is critical but tough. New materials enable big innovations like batteries or LEDs. But there are \~infinitely many combinations to try. Testing for them experimentally is slow and expensive.
So scientists and engineers want to simulate and screen materials on computers first. This can check way more candidates before real-world experiments. However, models historically struggled at accurately predicting if materials are stable.
Researchers at DeepMind made a system called GNoME that uses graph neural networks and active learning to push past these limits.
GNoME models materials' crystal structures as graphs and predicts formation energies. It actively generates and filters candidates, evaluating the most promising with simulations. This expands its knowledge and improves predictions over multiple cycles.
The authors introduced new ways to generate derivative structures that respect symmetries, further diversifying discoveries.
The results:
1. GNoME found 2.2 million new stable materials - equivalent to 800 years of normal discovery.
2. Of those, 380k were the most stable and candidates for validation.
3. 736 were validated in external labs. These include a totally new diamond-like optical material and another that may be a superconductor.
Overall this demonstrates how scaling up deep learning can massively speed up materials innovation. As data and models improve together, it'll accelerate solutions
/r/MachineLearning
https://redd.it/18779rp
Reddit
From the MachineLearning community on Reddit: [R] Google DeepMind: 2.2 million new materials discovered using GNN (380k most stable…
Explore this post and more from the MachineLearning community
Oh my god, Django admin page is SO cool!
Hah, I'm new to Django and just started using the admin page with my own project after following the tutorial...
When I easily created a model and then found all the FIELDS JUST APPEARED ON THE ADMIN PAGE. HOLY MOLY.
What incredible convenience. So like... how do other popular backend frameworks do it? Do you have to write your own page to handle this?
/r/django
https://redd.it/187c0e1
Hah, I'm new to Django and just started using the admin page with my own project after following the tutorial...
When I easily created a model and then found all the FIELDS JUST APPEARED ON THE ADMIN PAGE. HOLY MOLY.
What incredible convenience. So like... how do other popular backend frameworks do it? Do you have to write your own page to handle this?
/r/django
https://redd.it/187c0e1
Reddit
From the django community on Reddit
Explore this post and more from the django community
Serial Port Datalogging to a CSV (comma separated file) file on Linux using Arduino Uno and Python
https://www.youtube.com/watch?v=OWVQXgEMSEE
/r/Python
https://redd.it/187b85i
https://www.youtube.com/watch?v=OWVQXgEMSEE
/r/Python
https://redd.it/187b85i
YouTube
Serial Port Datalogging to a CSV (comma separated file) file on Linux using Arduino Uno and Python
Do like and Subscribe,
Links to Code, Design Files, Website Tutorials Below,
Full Code Explanation : https://www.youtube.com/watch?v=hpHv4Iux6_s
Datalogger Hardware Assembly: https://youtu.be/OrigmVd3aYI
Tutorial : https://www.xanthium.in/python-data-acquisition…
Links to Code, Design Files, Website Tutorials Below,
Full Code Explanation : https://www.youtube.com/watch?v=hpHv4Iux6_s
Datalogger Hardware Assembly: https://youtu.be/OrigmVd3aYI
Tutorial : https://www.xanthium.in/python-data-acquisition…
Maximize Web Development with Django HTMX
https://7.dev/maximize-web-development-with-django-htmx/
/r/djangolearning
https://redd.it/187j7qv
https://7.dev/maximize-web-development-with-django-htmx/
/r/djangolearning
https://redd.it/187j7qv
Dashboard using Flask with dataframe
Alright so i initially created a dashboard with streamlit which displays a dataframe with multiple columns and would let me sort it by parameters. Due to changes to their service my app isn't working anymore.
I recently been looking for alternatives and been trying to wrap my head around flask and i'm curious If it is even possible to do what i'm trying to do.
I have a seperate server running which gathers the data and creates and calculates the dataframes using python logic and stores it every 15 min as a CSV both locally and on a database (using Deta). I would want the flask app to load the csv file every few Minutes or on refresh and display it as a table.
While the first part is rather easy i'm curious If there are options to create an interactive and filterable table. Especialy from a dataframe/CSV file.
So far i got it to output the whole dataframe as a standard bootstrap table. What is the best approach to create a table with it that has Filters, pages and search functions. I imagine i would have to create the Filter function in python logic?
/r/flask
https://redd.it/187eblt
Alright so i initially created a dashboard with streamlit which displays a dataframe with multiple columns and would let me sort it by parameters. Due to changes to their service my app isn't working anymore.
I recently been looking for alternatives and been trying to wrap my head around flask and i'm curious If it is even possible to do what i'm trying to do.
I have a seperate server running which gathers the data and creates and calculates the dataframes using python logic and stores it every 15 min as a CSV both locally and on a database (using Deta). I would want the flask app to load the csv file every few Minutes or on refresh and display it as a table.
While the first part is rather easy i'm curious If there are options to create an interactive and filterable table. Especialy from a dataframe/CSV file.
So far i got it to output the whole dataframe as a standard bootstrap table. What is the best approach to create a table with it that has Filters, pages and search functions. I imagine i would have to create the Filter function in python logic?
/r/flask
https://redd.it/187eblt
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Django model validators don't work in django shell?
I've heard that validators don't work when saving model in django shell?
Does that mean if I use django orm as standalone in some script the validators will also not work?
/r/djangolearning
https://redd.it/187ojon
I've heard that validators don't work when saving model in django shell?
Does that mean if I use django orm as standalone in some script the validators will also not work?
/r/djangolearning
https://redd.it/187ojon
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Advent of Code 2023 - r/Python Edition
# Join the 2023 Advent of Code Challenge with Python!
Hey Pythonistas! 🐍
It's almost that exciting time of the year again! The Advent of Code 2023 is just around the corner, and we're inviting everyone to join in the fun!
## What is Advent of Code?
Advent of Code is an annual online event that runs from December 1st to December 25th. Each day, a new coding challenge is released—two puzzles that are part of a continuing story. It's a fantastic way to improve your coding skills and get into the holiday spirit!
You can read more about it here.
## Why Python?
Python is a great choice for these challenges due to its readability and wide range of libraries. Whether you're a beginner or an experienced coder, Python makes solving these puzzles both fun and educational.
## How to Participate?
1. **Sign Up/In**.
2. Join the r/Python private leaderboard with code
3. Start solving the puzzles released each day using Python.
4. Share your solutions and discuss strategies with the community.
## Join the r/Python Leaderboard!
We can have up to 200 people in a private leaderboard, so this may go over poorly - but you can join us with the following code:
## How to Share Your Solutions?
You can join
/r/Python
https://redd.it/187t9yq
# Join the 2023 Advent of Code Challenge with Python!
Hey Pythonistas! 🐍
It's almost that exciting time of the year again! The Advent of Code 2023 is just around the corner, and we're inviting everyone to join in the fun!
## What is Advent of Code?
Advent of Code is an annual online event that runs from December 1st to December 25th. Each day, a new coding challenge is released—two puzzles that are part of a continuing story. It's a fantastic way to improve your coding skills and get into the holiday spirit!
You can read more about it here.
## Why Python?
Python is a great choice for these challenges due to its readability and wide range of libraries. Whether you're a beginner or an experienced coder, Python makes solving these puzzles both fun and educational.
## How to Participate?
1. **Sign Up/In**.
2. Join the r/Python private leaderboard with code
2186960-67024e323. Start solving the puzzles released each day using Python.
4. Share your solutions and discuss strategies with the community.
## Join the r/Python Leaderboard!
We can have up to 200 people in a private leaderboard, so this may go over poorly - but you can join us with the following code:
2186960-67024e32## How to Share Your Solutions?
You can join
/r/Python
https://redd.it/187t9yq
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
django on gunicorn and nginx in kubernetes
Hi, i am trying to deploy django app with gunicorn and nginx as reverse proxy in kubernetes while also using ingress in kubernetes. Ingress will have field
/r/djangolearning
https://redd.it/187ikr7
Hi, i am trying to deploy django app with gunicorn and nginx as reverse proxy in kubernetes while also using ingress in kubernetes. Ingress will have field
path so that i can connect to my app by url like www.myexternalip.com/mydjangoapp/ but I don't know what is best way to do it so that I do not have to edit urls.py in my app in order to be able to add any prefix (the /mydjangoapp part to my url) inside the ingress yaml. If i set it without prefix or if i add prefix and then edit urls.py for that same prefix then it works, but I think it is very much not elegant to edit app in order to serve it on arbitrary url.../r/djangolearning
https://redd.it/187ikr7
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Build, Visualize and Launch Big Data DAGs in Python
https://www.taipy.io/posts/build-visualize-and-launch-big-data-dags
/r/Python
https://redd.it/187m1g6
https://www.taipy.io/posts/build-visualize-and-launch-big-data-dags
/r/Python
https://redd.it/187m1g6
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
How to Deploy Flask App to Vercel for Free
I just wrote a tutorial on how to deploy a Flask app to Vercel for Free as the old tutorials on the Internet don't work anymore since Vercel changed their API.
https://wisecode.blog/deploy-flask-vercel
/r/flask
https://redd.it/187q0p7
I just wrote a tutorial on how to deploy a Flask app to Vercel for Free as the old tutorials on the Internet don't work anymore since Vercel changed their API.
https://wisecode.blog/deploy-flask-vercel
/r/flask
https://redd.it/187q0p7
wisecode.blog
How to Deploy Flask App to Vercel (Free) - WiseCode
Learn how to deploy a Flask app to Vercel for free in simple steps.
If Python is built in C/C++, why can't it be built from source cross-platform?
I was looking into the built from source docs:
https://devguide.python.org/getting-started/setup-building/
And it seems we don't have simple cross platform make command or CLI command.
Why is this so hard to do?
Is there a tutorial where I can compile from source on linux for windows, linux and mac?
/r/Python
https://redd.it/187kr86
I was looking into the built from source docs:
https://devguide.python.org/getting-started/setup-building/
And it seems we don't have simple cross platform make command or CLI command.
Why is this so hard to do?
Is there a tutorial where I can compile from source on linux for windows, linux and mac?
/r/Python
https://redd.it/187kr86
Python Developer's Guide
Setup and building
These instructions cover how to get a working copy of the source code and a compiled version of the CPython interpreter (CPython is the version of Python available from https://www.python.org/). It...