Hosting Django project on Azure
Hello everyone,
I'm seeking some advice on hosting my Django-based project on Azure. I've used Docker-compose to build the project, but I'm feeling lost and unsure about which approach to take. Should I set up Kubernetes AKS or Azure Containers Instance? Or should I stick with the Containers Web App, or perhaps not use Docker at all?
Additionally, I'm not sure whether I should use Azure Postgres or a containerized database, which can be a bit of a pain to set up. I'm also curious about which Azure features I should use to ensure that my project runs smoothly on Azure.
My project utilizes multiple containers, including Redis, Celery, Flower, and Traefik. Can anyone offer any tips or guidance?
Thank you. π
/r/django
https://redd.it/12yhv5o
Hello everyone,
I'm seeking some advice on hosting my Django-based project on Azure. I've used Docker-compose to build the project, but I'm feeling lost and unsure about which approach to take. Should I set up Kubernetes AKS or Azure Containers Instance? Or should I stick with the Containers Web App, or perhaps not use Docker at all?
Additionally, I'm not sure whether I should use Azure Postgres or a containerized database, which can be a bit of a pain to set up. I'm also curious about which Azure features I should use to ensure that my project runs smoothly on Azure.
My project utilizes multiple containers, including Redis, Celery, Flower, and Traefik. Can anyone offer any tips or guidance?
Thank you. π
/r/django
https://redd.it/12yhv5o
Reddit
r/django on Reddit: Hosting Django project on Azure
Posted by u/fahddaher - 16 votes and 16 comments
In a nutshell, how do you tell the difference between API and Microservices in Python?
/r/Python
https://redd.it/12yq1e9
/r/Python
https://redd.it/12yq1e9
Reddit
r/Python on Reddit: In a nutshell, how do you tell the difference between API and Microservices in Python?
Posted by u/selva-online - 9 votes and 21 comments
I uploaded a Python Machine Learning Project video on Youtube - Predicting Incomes using Sci-kit Learn
Hey everyone, I uploaded a new video on my YouTube channel where I walk through a Python Machine Learning project using sci-kit learn to predict incomes based on individual data. In the video, I provide the data set and walk through each step of the project. Thanks, have a great day!
https://www.youtube.com/watch?v=47EzTeIuHYo
/r/Python
https://redd.it/12yo1kr
Hey everyone, I uploaded a new video on my YouTube channel where I walk through a Python Machine Learning project using sci-kit learn to predict incomes based on individual data. In the video, I provide the data set and walk through each step of the project. Thanks, have a great day!
https://www.youtube.com/watch?v=47EzTeIuHYo
/r/Python
https://redd.it/12yo1kr
YouTube
Python Machine Learning Project - Income Classification
Thanks for watching my video. Some other videos I published:
- Python Data Analysis Project: https://www.youtube.com/watch?v=xuSx4jpsTz8
- Python Machine Learning Project: https://www.youtube.com/watch?v=47EzTeIuHYo
- Python Course: https://www.youtube.β¦
- Python Data Analysis Project: https://www.youtube.com/watch?v=xuSx4jpsTz8
- Python Machine Learning Project: https://www.youtube.com/watch?v=47EzTeIuHYo
- Python Course: https://www.youtube.β¦
Flask 2.3.0 released
https://flask.palletsprojects.com/en/2.3.x/changes/#version-2-3-0
/r/flask
https://redd.it/12ytmlk
https://flask.palletsprojects.com/en/2.3.x/changes/#version-2-3-0
/r/flask
https://redd.it/12ytmlk
Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/12z0gle
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/12z0gle
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
dictf - An extended Python dict implementation that supports multiple key selection with a pretty syntax.
Hi, everyone! I'm not sure if this is useful to anyone because it's a problem you can easily solve with a dict comprehension, but I love a pretty syntax, so I made this: https://github.com/Eric-Mendes/dictf
It can be especially useful for filtering huge dicts before turning into a DataFrame, with the same pandas syntax.
Already on pypi: https://pypi.org/project/dictf/
It enables you to use dicts as shown below:
dictf example
/r/Python
https://redd.it/12ywtn8
Hi, everyone! I'm not sure if this is useful to anyone because it's a problem you can easily solve with a dict comprehension, but I love a pretty syntax, so I made this: https://github.com/Eric-Mendes/dictf
It can be especially useful for filtering huge dicts before turning into a DataFrame, with the same pandas syntax.
Already on pypi: https://pypi.org/project/dictf/
It enables you to use dicts as shown below:
dictf example
/r/Python
https://redd.it/12ywtn8
GitHub
GitHub - Eric-Mendes/dictf: An extended Python dict implementation that supports multiple key selection with a pretty syntax.
An extended Python dict implementation that supports multiple key selection with a pretty syntax. - GitHub - Eric-Mendes/dictf: An extended Python dict implementation that supports multiple key sel...
My experience upgrading project from Flask v1 to v2
I've had one pretty big project which still was running Flask v.1. Finally decided it's time for v.2 which is now a couple years since initial release. A lot of dependencies were upgraded. There was a fair bit of syntax that I had to change, most of the changes were related to SQLAlchemy, WTForms, Jinja filters. Some parameters were renamed. Some parameters that were positional are now named. Some standard form validations stopped working. I could not test everything because the app is fairly big, so some errors occurred in production and were promptly fixed. But every day I discover some new issues. Flask console, which was running fine before upgrade, does not work, I still can't fix it. Flask-Migrate is also broken, I can't run any migrations.
More specifically, trying to load Flask console throws these 2 errors:
flask.cli.NoAppException: While importing 'wsgi', an ImportError was raised
ModuleNotFoundError: No module named 'wsgi'
And Flask-Migrate complains about db connection:
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'user'@'host' (using password: YES)")
The connection is configured using SQLALCHEMY_DATABASE_URI in config, and works fine when the Flask server is running, but for some reason
/r/flask
https://redd.it/12z9wnn
I've had one pretty big project which still was running Flask v.1. Finally decided it's time for v.2 which is now a couple years since initial release. A lot of dependencies were upgraded. There was a fair bit of syntax that I had to change, most of the changes were related to SQLAlchemy, WTForms, Jinja filters. Some parameters were renamed. Some parameters that were positional are now named. Some standard form validations stopped working. I could not test everything because the app is fairly big, so some errors occurred in production and were promptly fixed. But every day I discover some new issues. Flask console, which was running fine before upgrade, does not work, I still can't fix it. Flask-Migrate is also broken, I can't run any migrations.
More specifically, trying to load Flask console throws these 2 errors:
flask.cli.NoAppException: While importing 'wsgi', an ImportError was raised
ModuleNotFoundError: No module named 'wsgi'
And Flask-Migrate complains about db connection:
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1045, "Access denied for user 'user'@'host' (using password: YES)")
The connection is configured using SQLALCHEMY_DATABASE_URI in config, and works fine when the Flask server is running, but for some reason
/r/flask
https://redd.it/12z9wnn
Reddit
r/flask on Reddit: My experience upgrading project from Flask v1 to v2
Posted by u/mangoed - No votes and no comments
Do any of you code to de-stress?
I work as a mechanical engr/program manager in the biomedical field, but love to hobby code on the side. I enjoy scraping datasets, from real estate to car auction websites, and running different analyses on it. Simple up front metrics, sorting, and deeper ML stuff with scikit.
I've recently cut down on drinking almost entirely and have found myself gravitating towards my laptop at the end of the day to just toy around with code.
There is something oddly comforting about seeing all the multi colored code in VScode. Something pleasantly pleasing about expanding your knowledge to learn better and simpler ways to code things. And something rewarding about getting results that you'll probably never use again after dedicating hours and sometimes weeks of work.
I hope this feeling doesn't fade.. I used to love photography in HS, but started making money doing it and lost most of my passion for it.
/r/Python
https://redd.it/12z56v6
I work as a mechanical engr/program manager in the biomedical field, but love to hobby code on the side. I enjoy scraping datasets, from real estate to car auction websites, and running different analyses on it. Simple up front metrics, sorting, and deeper ML stuff with scikit.
I've recently cut down on drinking almost entirely and have found myself gravitating towards my laptop at the end of the day to just toy around with code.
There is something oddly comforting about seeing all the multi colored code in VScode. Something pleasantly pleasing about expanding your knowledge to learn better and simpler ways to code things. And something rewarding about getting results that you'll probably never use again after dedicating hours and sometimes weeks of work.
I hope this feeling doesn't fade.. I used to love photography in HS, but started making money doing it and lost most of my passion for it.
/r/Python
https://redd.it/12z56v6
Reddit
r/Python on Reddit: Do any of you code to de-stress?
Posted by u/uifreiurfmsldkmfn - 30 votes and 13 comments
Help - no such file or directory but was fully functioning earlier
Hey all,
I was using JupyterLite and the notebook was doing everything I needed it to until I started getting "error no such file or directory" later in the day. I hadn't changed anything to the csv file's location and even played around with different names, paths, copy path, ect.
I have used Jupyter Notebooks online in the past and haven't seen anything like this. Currently in the process of downloading it for Windows and am going to see how that goes.
Thanks in advance!
/r/JupyterNotebooks
https://redd.it/12yt8xq
Hey all,
I was using JupyterLite and the notebook was doing everything I needed it to until I started getting "error no such file or directory" later in the day. I hadn't changed anything to the csv file's location and even played around with different names, paths, copy path, ect.
I have used Jupyter Notebooks online in the past and haven't seen anything like this. Currently in the process of downloading it for Windows and am going to see how that goes.
Thanks in advance!
/r/JupyterNotebooks
https://redd.it/12yt8xq
Reddit
r/JupyterNotebooks on Reddit: Help - no such file or directory but was fully functioning earlier
Posted by u/jasmme - 1 vote and no comments
GitHub - nicolas-van/win-cmd-escaper: A Python library to properly handle escaping of command line arguments in Windows' CMD.exe and Powershell.
https://github.com/nicolas-van/win-cmd-escaper
/r/Python
https://redd.it/12z6nby
https://github.com/nicolas-van/win-cmd-escaper
/r/Python
https://redd.it/12z6nby
GitHub
GitHub - nicolas-van/win-cmd-escaper: A Python library to properly handle escaping of command line arguments in Windows' CMD.exeβ¦
A Python library to properly handle escaping of command line arguments in Windows' CMD.exe and Powershell. - nicolas-van/win-cmd-escaper
A Comprehensive Guide to Python Dictionaries: Understanding and Implementing
https://mrexamples.hashnode.dev/a-comprehensive-guide-to-python-dictionaries-understanding-and-implementing
/r/flask
https://redd.it/12zct19
https://mrexamples.hashnode.dev/a-comprehensive-guide-to-python-dictionaries-understanding-and-implementing
/r/flask
https://redd.it/12zct19
Mrexamples
A Comprehensive Guide to Python Dictionaries
We are discussing Python dictionaries, hoping that it would help the learners. Python is a powerful programming language that offers various data structures
Debugging a Mixed Python and C Language Stack
https://developer.nvidia.com/blog/debugging-mixed-python-and-c-language-stack/
/r/Python
https://redd.it/12zhl45
https://developer.nvidia.com/blog/debugging-mixed-python-and-c-language-stack/
/r/Python
https://redd.it/12zhl45
NVIDIA Technical Blog
Debugging a Mixed Python and C Language Stack
Debugging is difficult. Debugging across multiple languages is especially challenging, and debugging across devices often requires a team with varying skill sets and expertise to reveal the underlyingβ¦
urllib3 v2.0.0 is now generally available!
https://sethmlarson.dev/urllib3-2.0.0
/r/Python
https://redd.it/12zrs9n
https://sethmlarson.dev/urllib3-2.0.0
/r/Python
https://redd.it/12zrs9n
Seth Michael Larson
urllib3 v2.0.0 is now generally available
urllib3 v1.0 was first published 12 years ago in 2011 and has served the Python community beyond anyone's dreams.
Since that time, urllib3 has been installed over 8 billion times to become the most...
Since that time, urllib3 has been installed over 8 billion times to become the most...
A Cheat Sheet on using OpenAI's API in Python (PDF Download Link)
This cheat sheet summarizes the most important commands to use OpenAI models and DALL-E in a standard Python environment (
PDF source link (download): https://blog.finxter.com/openapi-cheat-sheet/
https://preview.redd.it/ayb4885s29wa1.png?width=720&format=png&auto=webp&v=enabled&s=b1e947041bdc5b01b072890978087ab2eae1ead8
/r/Python
https://redd.it/12zmlge
This cheat sheet summarizes the most important commands to use OpenAI models and DALL-E in a standard Python environment (
pip install openai).PDF source link (download): https://blog.finxter.com/openapi-cheat-sheet/
https://preview.redd.it/ayb4885s29wa1.png?width=720&format=png&auto=webp&v=enabled&s=b1e947041bdc5b01b072890978087ab2eae1ead8
/r/Python
https://redd.it/12zmlge
You wrote some code but it was waste
Have it ever happened to you that you have a good idea for a project, you start building the project giving it most of your time and after days you come to know that there was an way way to do it
I always wanted to create a website that will do something unique, I just wanted to show off my website in college.
So i got an idea of creating a flask python website, and after completing it i was just going to host it on pythonanywhere and then i realised that the whole website can be made without using flask with just html
I worked with modules like pillow, os, shutil only to know that there was a really easy way to do all that, at this point i'm like shocked because i experienced something like this for the first time....
/r/Python
https://redd.it/12zpfam
Have it ever happened to you that you have a good idea for a project, you start building the project giving it most of your time and after days you come to know that there was an way way to do it
I always wanted to create a website that will do something unique, I just wanted to show off my website in college.
So i got an idea of creating a flask python website, and after completing it i was just going to host it on pythonanywhere and then i realised that the whole website can be made without using flask with just html
I worked with modules like pillow, os, shutil only to know that there was a really easy way to do all that, at this point i'm like shocked because i experienced something like this for the first time....
/r/Python
https://redd.it/12zpfam
Reddit
r/Python on Reddit: You wrote some code but it was waste
Posted by u/big-brar - 10 votes and 27 comments
I need help to deploy my flask blog app!!
Hi everyone I'm a software engineering student and I need help to deploy my blog application that I recently build with flask and it's my first ever project in web development. The problem is that I use a package structure :
βββ flaskblog
β βββ forms.py
β βββ __init__.py
β βββ models.py
β βββ __pycache__
β β βββ forms.cpython-310.pyc
β β βββ __init__.cpython-310.pyc
β β βββ models.cpython-310.pyc
β β βββ routes.cpython-310.pyc
β βββ routes.py
β βββ static
β β βββ main.css
β β βββ profile_pics
β β βββ default.jpg
β βββ templates
β βββ about.html
β βββ account.html
β βββ create_post.html
β βββ home.html
β βββ layout.html
β βββ login.html
β βββ post.html
β βββ register.html
βββ instance
β βββ site.db
βββ requirements.txt
βββ run.py
Can anyone suggest me a free platform
/r/flask
https://redd.it/1302nwq
Hi everyone I'm a software engineering student and I need help to deploy my blog application that I recently build with flask and it's my first ever project in web development. The problem is that I use a package structure :
βββ flaskblog
β βββ forms.py
β βββ __init__.py
β βββ models.py
β βββ __pycache__
β β βββ forms.cpython-310.pyc
β β βββ __init__.cpython-310.pyc
β β βββ models.cpython-310.pyc
β β βββ routes.cpython-310.pyc
β βββ routes.py
β βββ static
β β βββ main.css
β β βββ profile_pics
β β βββ default.jpg
β βββ templates
β βββ about.html
β βββ account.html
β βββ create_post.html
β βββ home.html
β βββ layout.html
β βββ login.html
β βββ post.html
β βββ register.html
βββ instance
β βββ site.db
βββ requirements.txt
βββ run.py
Can anyone suggest me a free platform
/r/flask
https://redd.it/1302nwq
Speeding up a Django view from 1000ms to <300ms
https://buttondown.email/blog/speeding-up-a-django-view
/r/django
https://redd.it/12zxusx
https://buttondown.email/blog/speeding-up-a-django-view
/r/django
https://redd.it/12zxusx
Buttondown
Speeding up a Django view
Step by step insights into cutting the email view's TTFB by 70%
Best practice for postgres partitioning
Hey all!
I am looking for the best libary to work with postgres (13.X +) partitioning,
I have used until now 'django-pg-partitioning' but it is no longer maintned and not supported in newer djagno versions.
I am familiar with 'django-postgres-extra' but I have a problem with this package since it generates automatically the 'default' partition and can only be removed manually from the migrations (or am I missing something?)
Thank you all.
/r/django
https://redd.it/130bwrw
Hey all!
I am looking for the best libary to work with postgres (13.X +) partitioning,
I have used until now 'django-pg-partitioning' but it is no longer maintned and not supported in newer djagno versions.
I am familiar with 'django-postgres-extra' but I have a problem with this package since it generates automatically the 'default' partition and can only be removed manually from the migrations (or am I missing something?)
Thank you all.
/r/django
https://redd.it/130bwrw
Reddit
r/django on Reddit: Best practice for postgres partitioning
Posted by u/SnooPredictions8336 - No votes and no comments
Automatically Open Notebooks
Hey everyone, I'm fairly new to Jupyter Notebooks, but I love them! I've been using one to keep track of things I find tricky while I'm learning F#. Does anyone know of an extension or setting that would allow me to have quick access to my notebooks without having to go and open it every time I open a new folder? I'm doing some training through the Exercism website and doing the challenges locally. Let me know if you have any ideas!
Thanks!
/r/JupyterNotebooks
https://redd.it/12zvl8o
Hey everyone, I'm fairly new to Jupyter Notebooks, but I love them! I've been using one to keep track of things I find tricky while I'm learning F#. Does anyone know of an extension or setting that would allow me to have quick access to my notebooks without having to go and open it every time I open a new folder? I'm doing some training through the Exercism website and doing the challenges locally. Let me know if you have any ideas!
Thanks!
/r/JupyterNotebooks
https://redd.it/12zvl8o
Reddit
r/JupyterNotebooks on Reddit: Automatically Open Notebooks
Posted by u/Interesting-Editor85 - 1 vote and no comments
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/1303x3j
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/1303x3j
Reddit
r/Python on Reddit: Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
Posted by u/Im__Joseph - 1 vote and no comments