Port Issue
For Intro to Software Engineering class, deployed Flask App in Docker Container to Azure. Can connect on port 5000 (http://{ ipaddress}:5000) outside of university wifi network, but does not connect when within university wifi. Is this a port issue? Can someone suggest why this might be and what I may need to do to fix it? Thanks.
/r/flask
https://redd.it/12g547w
For Intro to Software Engineering class, deployed Flask App in Docker Container to Azure. Can connect on port 5000 (http://{ ipaddress}:5000) outside of university wifi network, but does not connect when within university wifi. Is this a port issue? Can someone suggest why this might be and what I may need to do to fix it? Thanks.
/r/flask
https://redd.it/12g547w
Reddit
r/flask on Reddit: Port Issue
Posted by u/Adamcp2013 - No votes and 3 comments
Trying to deploy a flask app to a custom domain
Hi friends, I’m still new to Python, but I made a simple flask app that I want to share with the world. I have a domain, and I hosting through Dreamhost. Ive looked around the internet for a tutorial or guide that can walk me through making it go live on my custom domain via Dreamhost. They have a tool called Passenger, specifically for Python and Ruby apps, but has anyone tried that? Any tips or youtube links you can point me to?
Would it be easier to add Wordpress to my domain and try to upload my flask app through that? Thanks
/r/flask
https://redd.it/12g0zp3
Hi friends, I’m still new to Python, but I made a simple flask app that I want to share with the world. I have a domain, and I hosting through Dreamhost. Ive looked around the internet for a tutorial or guide that can walk me through making it go live on my custom domain via Dreamhost. They have a tool called Passenger, specifically for Python and Ruby apps, but has anyone tried that? Any tips or youtube links you can point me to?
Would it be easier to add Wordpress to my domain and try to upload my flask app through that? Thanks
/r/flask
https://redd.it/12g0zp3
Reddit
r/flask on Reddit: Trying to deploy a flask app to a custom domain
Posted by u/MacheteRuxpin - 1 vote and 3 comments
Can't assign variable in Jupyter
I'm new to learning python. I'm using jupyter notebook. But I'm unable to assigning variables. Everytime I assign variable it say variable in undefined. Can anyone help?
/r/JupyterNotebooks
https://redd.it/12fw11y
I'm new to learning python. I'm using jupyter notebook. But I'm unable to assigning variables. Everytime I assign variable it say variable in undefined. Can anyone help?
/r/JupyterNotebooks
https://redd.it/12fw11y
Reddit
r/JupyterNotebooks on Reddit: Can't assign variable in Jupyter
Posted by u/Tanu_Saha - No votes and 1 comment
How to use Flask to check if files exist in existing Application
I have an application that fetches historical data from an api for and inputted date range. The application caches the data so that it can be used from the cache if desired. Now I need to write a flask app that checks if the data is in the cache, and if it isn't then fetch the data and cache. This is a stepping stone towards being able to use the flask app to run numerous requests at once but I am struggling to understand how I use flask at this stage. Many of the tutorials online seem to be focused on using flask for web applications and I am struggling to wrap my head around how to use flask for my challenge. Can anyone explain how flask would lend its self to my task, so that I can write the logic for it to check if the data is in the cache?
/r/flask
https://redd.it/12fjefs
I have an application that fetches historical data from an api for and inputted date range. The application caches the data so that it can be used from the cache if desired. Now I need to write a flask app that checks if the data is in the cache, and if it isn't then fetch the data and cache. This is a stepping stone towards being able to use the flask app to run numerous requests at once but I am struggling to understand how I use flask at this stage. Many of the tutorials online seem to be focused on using flask for web applications and I am struggling to wrap my head around how to use flask for my challenge. Can anyone explain how flask would lend its self to my task, so that I can write the logic for it to check if the data is in the cache?
/r/flask
https://redd.it/12fjefs
Reddit
r/flask on Reddit: How to use Flask to check if files exist in existing Application
Posted by u/According_Aide_489 - 6 votes and 7 comments
Sunday Daily Thread: What's everyone working on this week?
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/12g2rk1
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/12g2rk1
Reddit
r/Python on Reddit: Sunday Daily Thread: What's everyone working on this week?
Posted by u/Im__Joseph - 5 votes and 1 comment
I want to create a website displaying tables/statistics similar to Basketball Reference. Does Django make sense?
So, I have a small league that I run with friends and I think it’d be cool to make a website for it.
I want it to have a table with stats for each player page like this
And one for each game like this
My ideal project is at a far smaller scale (like 100 individual games rather than 100k lol) and less complex (not as many variables and what not) but the structure is similar
So, a few questions:
- Is Django the right tool for something like this? Are there better options?
- My current skills are Python and basically nothing else. What is most important for me to learn? I assume SQL/MySQL to deal with the database (I just have csv files atm). Frontend perhaps too? Not sure how much of that can be avoided with templates and what not
- Given my lack of knowledge, is this perhaps too ambitious for a beginner?
/r/django
https://redd.it/12gb2z8
So, I have a small league that I run with friends and I think it’d be cool to make a website for it.
I want it to have a table with stats for each player page like this
And one for each game like this
My ideal project is at a far smaller scale (like 100 individual games rather than 100k lol) and less complex (not as many variables and what not) but the structure is similar
So, a few questions:
- Is Django the right tool for something like this? Are there better options?
- My current skills are Python and basically nothing else. What is most important for me to learn? I assume SQL/MySQL to deal with the database (I just have csv files atm). Frontend perhaps too? Not sure how much of that can be avoided with templates and what not
- Given my lack of knowledge, is this perhaps too ambitious for a beginner?
/r/django
https://redd.it/12gb2z8
Basketball-Reference.com
LeBron James Stats, Height, Weight, Position, Draft Status and more | Basketball-Reference.com
Checkout the latest stats of LeBron James. Get info about his position, age, height, weight, draft status, shoots, school and more on Basketball-Reference.com
how to keep the front end and back end models in sync?
Hi all,
I am contemplating a mobile app with a flutter front end and DRF for back end. Coming from django templates, I never had to worry about duplicating the models. Are there any smart way to go DRY on this or is that a necessary evil?
I am conceptually attracted to server side rendering. Anyone has successfully implemented this on a mobile app?
Thanks
/r/django
https://redd.it/12gf5vo
Hi all,
I am contemplating a mobile app with a flutter front end and DRF for back end. Coming from django templates, I never had to worry about duplicating the models. Are there any smart way to go DRY on this or is that a necessary evil?
I am conceptually attracted to server side rendering. Anyone has successfully implemented this on a mobile app?
Thanks
/r/django
https://redd.it/12gf5vo
Reddit
r/django on Reddit: how to keep the front end and back end models in sync?
Posted by u/explodedgiraffe - 10 votes and 6 comments
what is the best way to send notification to a mobile app from django?
Hi there. I am working on a feature to send notification from django to a mobile app and I read about fcm-django, but I don't know if it is the best approach. what do you think? is there a better approach?
/r/django
https://redd.it/12giio8
Hi there. I am working on a feature to send notification from django to a mobile app and I read about fcm-django, but I don't know if it is the best approach. what do you think? is there a better approach?
/r/django
https://redd.it/12giio8
Reddit
r/django on Reddit: what is the best way to send notification to a mobile app from django?
Posted by u/Hewett555 - 5 votes and 3 comments
How to test Absract Views in Django
Hello django fellas, i currently working and AbstractViews in Django that looks like this
how to test this ?
/r/django
https://redd.it/12gkkb3
Hello django fellas, i currently working and AbstractViews in Django that looks like this
python
class MyAbstractView(AnotherAbstract):
argument1 = ...
argument2 = ...
def dispath():
...
def foo():
...
def bar():
...
how to test this ?
/r/django
https://redd.it/12gkkb3
Reddit
r/django on Reddit: How to test Absract Views in Django
Posted by u/mad-skidipap - 2 votes and 3 comments
Linode vs Render.com
I'm looking to deploy a Web Service with a Flask back-end. I want to hear from folks about their experience self-hosting with Linode vs. using Render.com, or other cloud hosting, with respect to utility and cost to both users and developers.
/r/flask
https://redd.it/12gndu7
I'm looking to deploy a Web Service with a Flask back-end. I want to hear from folks about their experience self-hosting with Linode vs. using Render.com, or other cloud hosting, with respect to utility and cost to both users and developers.
/r/flask
https://redd.it/12gndu7
Reddit
r/flask on Reddit: Linode vs Render.com
Posted by u/TikTok_Pi - 5 votes and 5 comments
I want to connect the cctv camera to jupyter notebook. Camera is connected to laptop and live video coming on web interface. But when i try to open cctv camera (In device manager, under camera i am unable see the cctv camera i am only able to see my inbuilt laptop camera) in jupyter shows one camera
when i tried another code by using url and username, password .still not working. can somebody suggest the way to do?
/r/JupyterNotebooks
https://redd.it/12grgeb
when i tried another code by using url and username, password .still not working. can somebody suggest the way to do?
/r/JupyterNotebooks
https://redd.it/12grgeb
Reddit
r/JupyterNotebooks on Reddit: I want to connect the cctv camera to jupyter notebook. Camera is connected to laptop and live video…
Posted by u/No-Advantage-36 - 1 vote and 1 comment
Why didn't Python become popular until long after its creation?
Python was invented in 1994, two years before Java.
Given it's age, why didn't Python become popular or even widely known about, until much later?
/r/Python
https://redd.it/12glkw4
Python was invented in 1994, two years before Java.
Given it's age, why didn't Python become popular or even widely known about, until much later?
/r/Python
https://redd.it/12glkw4
Reddit
r/Python on Reddit: Why didn't Python become popular until long after its creation?
Posted by u/TheBodyPolitic1 - 327 votes and 188 comments
Monday Daily Thread: Project ideas!
Comment any project ideas beginner or advanced in this thread for others to give a try! If you complete one make sure to reply to the comment with how you found it and attach some source code! If you're looking for project ideas, you might be interested in checking out Al Sweigart's, "The Big Book of Small Python Projects" which provides a list of projects and the code to make them work.
/r/Python
https://redd.it/12h0ihl
Comment any project ideas beginner or advanced in this thread for others to give a try! If you complete one make sure to reply to the comment with how you found it and attach some source code! If you're looking for project ideas, you might be interested in checking out Al Sweigart's, "The Big Book of Small Python Projects" which provides a list of projects and the code to make them work.
/r/Python
https://redd.it/12h0ihl
Reddit
r/Python on Reddit: Monday Daily Thread: Project ideas!
Posted by u/Im__Joseph - No votes and no comments
Comprehensive Reddit Saved Posts Downloader - retrieves almost all content ever saved
Hi all, I made a post about this a couple of days ago, but I've made some pretty massive changes since then and I wanted to share it again. I'm super happy with the results.
To recap, this program backs up all of your saved posts on Reddit, obtaining media such as Reddit galleries, Imgur albums, gifs, videos, etc. It stores a local log of all of the files downloaded/skipped.
Since last posting, I've added the ability to load your entire saved post record using information provided by Reddit. However, I noticed that a lot of the content had been deleted or removed, making up about a quarter of all my posts. So now I've implemented the ability to retrieve this information from pushshift and the wayback machine, and it works very well. For reference, I downloaded about 3500 posts from 5+ years back and only had around 200 fail.
Let me know how my code looks and if there's anything I could improve on. Thanks!
https://github.com/aeluro1/geddit
/r/Python
https://redd.it/12fzdu2
Hi all, I made a post about this a couple of days ago, but I've made some pretty massive changes since then and I wanted to share it again. I'm super happy with the results.
To recap, this program backs up all of your saved posts on Reddit, obtaining media such as Reddit galleries, Imgur albums, gifs, videos, etc. It stores a local log of all of the files downloaded/skipped.
Since last posting, I've added the ability to load your entire saved post record using information provided by Reddit. However, I noticed that a lot of the content had been deleted or removed, making up about a quarter of all my posts. So now I've implemented the ability to retrieve this information from pushshift and the wayback machine, and it works very well. For reference, I downloaded about 3500 posts from 5+ years back and only had around 200 fail.
Let me know how my code looks and if there's anything I could improve on. Thanks!
https://github.com/aeluro1/geddit
/r/Python
https://redd.it/12fzdu2
GitHub
GitHub - aeluro1/geddit: Reddit Content Manager
Reddit Content Manager. Contribute to aeluro1/geddit development by creating an account on GitHub.
Using flask, I made a word puzzle game, Syllacrostic. Please let me know what you think, there is a new puzzle daily.
http://www.syllacrostic.com
/r/flask
https://redd.it/12gqize
http://www.syllacrostic.com
/r/flask
https://redd.it/12gqize
Syllacrostic
Syllacrostic is a free, daily word puzzle that challenges your vocabulary and critical thinking skills.
DRF Performance (How bad is this code?)
Hello, I'm building out a web app for construction companies. My stack is currently nginx -> nextjs -> DRF. Everything runs super smoothly when ever there are only 2-5 users active. However when running a loadster test and running 15 concurrent bots with basic actions on the app . It gets super slow. I mean like after 2 minutes of stress testing the app becomes unusuable and endpoints take \~15 seconds to respond. I also added django slik to understand whats happening. First I thought it was my badly written endpoints, but after optimising them and seeing what silky had to say - I can't quite understand what's happening.
The couple last super slow request of the stress test:
https://preview.redd.it/w5uaxz062ysa1.png?width=1749&format=png&auto=webp&v=enabled&s=1202a1bb21a99cbaed6f26217da94426b73ca25e
As you can see the time spent on queries is not too bad. If we take a look for example at the 15s endpoint(first one from the silk screenshot) it's pretty simple in princible imo.
class GetOrderItems(APIView):
permission_classes = [OrderItemIsPartOfCompany | WorkerIsPartOfCompany]
@silk_profile(name='Get OrdersItems for Order')
def get(self, request, order_id):
/r/django
https://redd.it/12h0kf1
Hello, I'm building out a web app for construction companies. My stack is currently nginx -> nextjs -> DRF. Everything runs super smoothly when ever there are only 2-5 users active. However when running a loadster test and running 15 concurrent bots with basic actions on the app . It gets super slow. I mean like after 2 minutes of stress testing the app becomes unusuable and endpoints take \~15 seconds to respond. I also added django slik to understand whats happening. First I thought it was my badly written endpoints, but after optimising them and seeing what silky had to say - I can't quite understand what's happening.
The couple last super slow request of the stress test:
https://preview.redd.it/w5uaxz062ysa1.png?width=1749&format=png&auto=webp&v=enabled&s=1202a1bb21a99cbaed6f26217da94426b73ca25e
As you can see the time spent on queries is not too bad. If we take a look for example at the 15s endpoint(first one from the silk screenshot) it's pretty simple in princible imo.
class GetOrderItems(APIView):
permission_classes = [OrderItemIsPartOfCompany | WorkerIsPartOfCompany]
@silk_profile(name='Get OrdersItems for Order')
def get(self, request, order_id):
/r/django
https://redd.it/12h0kf1
Ruff: one Python linter to rule them all
https://blog.jerrycodes.com/ruff-the-python-linter/
/r/Python
https://redd.it/12ha6mc
https://blog.jerrycodes.com/ruff-the-python-linter/
/r/Python
https://redd.it/12ha6mc
Jerry Codes
Ruff: one Python linter to rule them all
Ruff, a ridiculously fast Python linter, has been gaining some serious traction recently. No wonder as it's providing close to feature parity with a dozen of linting tools most of which were previously the go-to for the majority of Python projects. Not only…
Microgreens knowledge database: Check Out My Next.js and Django Powered Website 🌱
https://microgreensdb.com
For my new hobby, I decided to create a knowledge database. It took me roughly two days from start to first deploy. I chose to use Next.js because of its static page generation, which allows me to host my backend in one region and scale using the frontend. The metadata was generated using ChatGPT, with seed information from a variety of sources ranging from YouTube to ebooks. At the moment, the seed images are just placeholders. My next goal is to crawl seed prices from different stores and display them.
Please feel free to ask any questions!
/r/django
https://redd.it/12her1o
https://microgreensdb.com
For my new hobby, I decided to create a knowledge database. It took me roughly two days from start to first deploy. I chose to use Next.js because of its static page generation, which allows me to host my backend in one region and scale using the frontend. The metadata was generated using ChatGPT, with seed information from a variety of sources ranging from YouTube to ebooks. At the moment, the seed images are just placeholders. My next goal is to crawl seed prices from different stores and display them.
Please feel free to ask any questions!
/r/django
https://redd.it/12her1o
Microgreensdb
Microgreens knowledge database - microgreensdb
microgreensdb is a knowledge database for microgreens that offers a comprehensive collection of information on growing, cultivation, varieties, uses, and recipes.
How to Integrate Django with React - Free Sample & LIVE Demo in comments
https://blog.appseed.us/how-to-integrate-django-with-react/
/r/django
https://redd.it/12hk2il
https://blog.appseed.us/how-to-integrate-django-with-react/
/r/django
https://redd.it/12hk2il
AppSeed Blog
How to Integrate Django with React (With Sample)
Learn how to integrate Django with React and use the full power from both frameworks - Free sample included.