django outstanding token
hello, how the rest_framework_simplejwt in django suppose to be stateless and when i use rest_framework_simplejwt.token_blacklist to logout the user and put in the blacklist, it create an outstanding token table in the database and store the non expired tokens.
/r/django
https://redd.it/1dvk3dr
hello, how the rest_framework_simplejwt in django suppose to be stateless and when i use rest_framework_simplejwt.token_blacklist to logout the user and put in the blacklist, it create an outstanding token table in the database and store the non expired tokens.
/r/django
https://redd.it/1dvk3dr
Reddit
From the django community on Reddit
Explore this post and more from the django community
Tips for learning rest framework
So I'm starting to learn REST framework and need some advice. I'm new to backend development, so can anyone give me advice on how to start, how long it might take, best practices, and what I should focus on?
/r/django
https://redd.it/1dvb9yj
So I'm starting to learn REST framework and need some advice. I'm new to backend development, so can anyone give me advice on how to start, how long it might take, best practices, and what I should focus on?
/r/django
https://redd.it/1dvb9yj
Reddit
From the django community on Reddit
Explore this post and more from the django community
My first gui app (youtube to mp3)
What my project does : Download youtube mp4 video and convert them to mp3.
Target audience : E for everyone.
Comparison : My app has a youtube page integrated in it for ease of use.
Do you guys have some improvement that could be done to the code?
check out the project : https://gitlab.com/sand0ftime1/tube2mp3
I want to make the progress bar work at the same time as the download and also i have some bugs in the todo list.
/r/Python
https://redd.it/1dvltza
What my project does : Download youtube mp4 video and convert them to mp3.
Target audience : E for everyone.
Comparison : My app has a youtube page integrated in it for ease of use.
Do you guys have some improvement that could be done to the code?
check out the project : https://gitlab.com/sand0ftime1/tube2mp3
I want to make the progress bar work at the same time as the download and also i have some bugs in the todo list.
/r/Python
https://redd.it/1dvltza
GitLab
Sands0ft / tube2mp3 · GitLab
Storing the password safely
Hello ,
In my project, First the User fill out the register form including password for his account. This data is stored in temporary database. Secondly , If the admin approves him, he/she is registered as user. I am using CustomUser and Custom usermanager. The password which i am saving in temporary database when a user submit form is in plain format. And when the admin approves, it get hashed. I want to store hashed password in temporary database as well. When i use inbuilt mechanisms like make_password, the password get hashed twice , while storing in temp. database and also while storing in Custom User database. How to solve this problem ? I want to hash or secure the password in temp. database while being able to login /logout /authenticate ?
/r/django
https://redd.it/1dvv06l
Hello ,
In my project, First the User fill out the register form including password for his account. This data is stored in temporary database. Secondly , If the admin approves him, he/she is registered as user. I am using CustomUser and Custom usermanager. The password which i am saving in temporary database when a user submit form is in plain format. And when the admin approves, it get hashed. I want to store hashed password in temporary database as well. When i use inbuilt mechanisms like make_password, the password get hashed twice , while storing in temp. database and also while storing in Custom User database. How to solve this problem ? I want to hash or secure the password in temp. database while being able to login /logout /authenticate ?
/r/django
https://redd.it/1dvv06l
Reddit
From the django community on Reddit
Explore this post and more from the django community
Streaming Using Django
I have developed a web App and it is audio streaming for songs ( a project for resume ) problem I am facing is LATENCY. While loading home page data which list out available songs ( although I used pagination) and while select a song get to the page where user get to play the song took time to load the song ( although from django I am using 'StreamingHttpResponse' library to stream the data but in fronted where I am using just javascript not able to capture packet by packet and wait to capture whole data ) how to reduce these latencies???
/r/django
https://redd.it/1dvuhxp
I have developed a web App and it is audio streaming for songs ( a project for resume ) problem I am facing is LATENCY. While loading home page data which list out available songs ( although I used pagination) and while select a song get to the page where user get to play the song took time to load the song ( although from django I am using 'StreamingHttpResponse' library to stream the data but in fronted where I am using just javascript not able to capture packet by packet and wait to capture whole data ) how to reduce these latencies???
/r/django
https://redd.it/1dvuhxp
Reactive Notebook for Python - An Alternative to Jupyter Notebook
What the Project Does :
Marimo is an open-source reactive notebook for Python: reproducible, git-friendly, executable, shareable as apps.
Run a cell or interact with a UI element, and Marimo automatically runs dependent cells (or marks them as stale), keeping code and outputs consistent. Marimo notebooks are stored as pure Python, executable as scripts, and deployable as apps.
Target Audience :
The project is primarily aimed at data scientists, researchers, and educators. They can make featureful, interactive, and beautiful notebooks that let users filter, slice, and drill-down to their heart's content. Marimo can also enable them to build maintainable internal tools using just Python, without the hassle of custom frontends, infra, endpoints, and deployments.
Comparison :
vs JupyterLite - a WASM powered Jupyter running in the browser. However, it is not reactive like Marimo.
vs IPyflow - a reactive notebook for Python implemented as a Jupyter kernel. However, it is not WASM compatible.
vs Jupyter - marimo is a reinvention of the Python notebook as a reproducible, interactive, and shareable Python program that can be executed as scripts or deployed as interactive web apps - without the need of extensions or additional infrastructure
GitHub repository: https://github.com/marimo-team/marimo
/r/Python
https://redd.it/1dvs2d6
What the Project Does :
Marimo is an open-source reactive notebook for Python: reproducible, git-friendly, executable, shareable as apps.
Run a cell or interact with a UI element, and Marimo automatically runs dependent cells (or marks them as stale), keeping code and outputs consistent. Marimo notebooks are stored as pure Python, executable as scripts, and deployable as apps.
Target Audience :
The project is primarily aimed at data scientists, researchers, and educators. They can make featureful, interactive, and beautiful notebooks that let users filter, slice, and drill-down to their heart's content. Marimo can also enable them to build maintainable internal tools using just Python, without the hassle of custom frontends, infra, endpoints, and deployments.
Comparison :
vs JupyterLite - a WASM powered Jupyter running in the browser. However, it is not reactive like Marimo.
vs IPyflow - a reactive notebook for Python implemented as a Jupyter kernel. However, it is not WASM compatible.
vs Jupyter - marimo is a reinvention of the Python notebook as a reproducible, interactive, and shareable Python program that can be executed as scripts or deployed as interactive web apps - without the need of extensions or additional infrastructure
GitHub repository: https://github.com/marimo-team/marimo
/r/Python
https://redd.it/1dvs2d6
GitHub
GitHub - marimo-team/marimo: A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script…
A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor....
sql-compare: package to compare SQL schemas
## What My Project Does
This package allows to compare two SQL files (or strings) to know whether their statements are the same or not. The comparison doesn't care about the order of the columns in a table or the order of the values in an enumerator. It also excludes irrelevant data like comments.
GitHub repository
PyPI
Its main usage is to compare the schemas of two databases (e.g. staging and production).
At Mergify, we use it in our test suite to check that the migration scripts generated by Alembic will create the database schema expected by the SQLAlchemy models. I wrote a blog post about the creation of the package.
## Target Audience
We use it in our CI/CD. This package is meant for testing mainly, but it could be used for something else probably.
This package is ready for production.
We have been using it at Mergify for several months now. Our test suite fails whenever Alembic misses something in a migration script. We deliver to production several times a day thanks to that.
## Comparison
We didn't find any suitable alternative.
Alembic can compare a database schema with SQLAlchemy models, but it doesn't detect every differences.
We used migra in the past, but it is not maintained anymore.
/r/Python
https://redd.it/1dvsqk7
## What My Project Does
This package allows to compare two SQL files (or strings) to know whether their statements are the same or not. The comparison doesn't care about the order of the columns in a table or the order of the values in an enumerator. It also excludes irrelevant data like comments.
GitHub repository
PyPI
Its main usage is to compare the schemas of two databases (e.g. staging and production).
At Mergify, we use it in our test suite to check that the migration scripts generated by Alembic will create the database schema expected by the SQLAlchemy models. I wrote a blog post about the creation of the package.
## Target Audience
We use it in our CI/CD. This package is meant for testing mainly, but it could be used for something else probably.
This package is ready for production.
We have been using it at Mergify for several months now. Our test suite fails whenever Alembic misses something in a migration script. We deliver to production several times a day thanks to that.
## Comparison
We didn't find any suitable alternative.
Alembic can compare a database schema with SQLAlchemy models, but it doesn't detect every differences.
We used migra in the past, but it is not maintained anymore.
/r/Python
https://redd.it/1dvsqk7
PyPI
sql-compare
Compare SQL schemas
Help with database commits from a form.
Hello! I'm pretty new to Flask and struggling with transferring data from a form to an SQL Database. The form is within a modal, which works perfectly and will redirect back to the main page once the form is submitted. However, the data from the form is not transferred to the SQL Database that I have associated with this project. I'm sure I'm missing something quite simple, help would be appreciated! If any more code screenshots are needed please let me know.
HTML Template for registration modal: https://i.imgur.com/VIdNGOs.png
Index routing function where the form data is sent to: https://i.imgur.com/zp41FA2.png
/r/flask
https://redd.it/1dw5tqj
Hello! I'm pretty new to Flask and struggling with transferring data from a form to an SQL Database. The form is within a modal, which works perfectly and will redirect back to the main page once the form is submitted. However, the data from the form is not transferred to the SQL Database that I have associated with this project. I'm sure I'm missing something quite simple, help would be appreciated! If any more code screenshots are needed please let me know.
HTML Template for registration modal: https://i.imgur.com/VIdNGOs.png
Index routing function where the form data is sent to: https://i.imgur.com/zp41FA2.png
/r/flask
https://redd.it/1dw5tqj
Imgur
Discover the magic of the internet at Imgur, a community powered entertainment destination. Lift your spirits with funny jokes, trending memes, entertaining gifs, inspiring stories, viral videos, and so much more from users.
Reduce number of models
I currently have:
- ORM model, courtest of SQLAlchemy
- Form model, courtesy of WTForms
- Model logic in routes... Which mostly calls ORM class methods.
How can I consolidate all of that? Any best practices I need to be aware of?
/r/flask
https://redd.it/1dvnq52
I currently have:
- ORM model, courtest of SQLAlchemy
- Form model, courtesy of WTForms
- Model logic in routes... Which mostly calls ORM class methods.
How can I consolidate all of that? Any best practices I need to be aware of?
/r/flask
https://redd.it/1dvnq52
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
I'm a flask addict, convince me to switch to Django
I've been developing web apps with Flask for a while now and love its simplicity and flexibility. It's lightweight and allows me to pick and choose the components I need. However, I've heard a lot about Django's "batteries-included" philosophy and its robust feature set.
Everyone around me says that Django is way better, I really tried to switch but it's really hard.
Convince me why I should give Django a shot!
/r/django
https://redd.it/1dw5q0w
I've been developing web apps with Flask for a while now and love its simplicity and flexibility. It's lightweight and allows me to pick and choose the components I need. However, I've heard a lot about Django's "batteries-included" philosophy and its robust feature set.
Everyone around me says that Django is way better, I really tried to switch but it's really hard.
Convince me why I should give Django a shot!
/r/django
https://redd.it/1dw5q0w
Reddit
From the django community on Reddit
Explore this post and more from the django community
Emotion classification & Analysis
Hello everyone,
I want to share my project that built using flask about in machine learning where user can express there emotion and classify at the following (Sad, Joy, Love, Anger, Fear, Surprice). We use a CNB model for text classification with the accuracy of 88%.
You can try it here:
https://emotionclassification.pythonanywhere.com
Note:
The prediction may encounter a unexpected expression result.
Source code:
- Github
/r/flask
https://redd.it/1dvr9t0
Hello everyone,
I want to share my project that built using flask about in machine learning where user can express there emotion and classify at the following (Sad, Joy, Love, Anger, Fear, Surprice). We use a CNB model for text classification with the accuracy of 88%.
You can try it here:
https://emotionclassification.pythonanywhere.com
Note:
The prediction may encounter a unexpected expression result.
Source code:
- Github
/r/flask
https://redd.it/1dvr9t0
Pythonanywhere
Emotion classification & Analysis
Classify text based on emotional states
Geolocate an IP address and perform WHOIS domain lookup in Flask
https://blog.ip2location.com/knowledge-base/how-to-use-ip2location-io-and-ip2whois-in-flask/#reddit
/r/flask
https://redd.it/1dvq6f5
https://blog.ip2location.com/knowledge-base/how-to-use-ip2location-io-and-ip2whois-in-flask/#reddit
/r/flask
https://redd.it/1dvq6f5
IP2Location.com
How to use IP2Location.io and IP2WHOIS in Flask? | IP2Location.com
Learn on how to use IP2Location.io and IP2WHOIS Python SDK in Flask to lookup geolocation and domain WHOIS information.
Django AI Assistant - Open-source Lib Launch
Hey folks, we’ve just launched an open-source library called Django AI Assistant, and we’d love your feedback!
What It Does:
* **Function/Tool Calling**: Simplifies complex AI implementations with easy-to-use Python classes
* **Retrieval-Augmented Generation**: Enhance AI functionalities efficiently.
* **Full Django Integration**: AI can access databases, check permissions, send emails, manage media files, and call external APIs effortlessly.
How You Can Help:
1. Try It: [https://github.com/vintasoftware/django-ai-assistant/](https://github.com/vintasoftware/django-ai-assistant/)
2. ▶️ [Watch the Demo](https://www.youtube.com/watch?v=bSJv4OIKLog&ab_channel=VintaSoftware)
3. 📖 [Read the Docs](https://vintasoftware.github.io/django-ai-assistant/latest/get-started/)
4. Test It & Break Things: Integrate it, experiment, and see what works (and what doesn’t).
5. Give Feedback: Drop your thoughts here or on our GitHub issues page.
Your input will help us make this lib better for everyone. Thanks!
/r/djangolearning
https://redd.it/1dw6i4z
Hey folks, we’ve just launched an open-source library called Django AI Assistant, and we’d love your feedback!
What It Does:
* **Function/Tool Calling**: Simplifies complex AI implementations with easy-to-use Python classes
* **Retrieval-Augmented Generation**: Enhance AI functionalities efficiently.
* **Full Django Integration**: AI can access databases, check permissions, send emails, manage media files, and call external APIs effortlessly.
How You Can Help:
1. Try It: [https://github.com/vintasoftware/django-ai-assistant/](https://github.com/vintasoftware/django-ai-assistant/)
2. ▶️ [Watch the Demo](https://www.youtube.com/watch?v=bSJv4OIKLog&ab_channel=VintaSoftware)
3. 📖 [Read the Docs](https://vintasoftware.github.io/django-ai-assistant/latest/get-started/)
4. Test It & Break Things: Integrate it, experiment, and see what works (and what doesn’t).
5. Give Feedback: Drop your thoughts here or on our GitHub issues page.
Your input will help us make this lib better for everyone. Thanks!
/r/djangolearning
https://redd.it/1dw6i4z
GitHub
GitHub - vintasoftware/django-ai-assistant: Integrate AI Assistants with Django to build intelligent applications
Integrate AI Assistants with Django to build intelligent applications - vintasoftware/django-ai-assistant