Pip has dropped support for Python 2
https://pip.pypa.io/en/stable/news/#id1
/r/Python
https://redd.it/l41dz7
https://pip.pypa.io/en/stable/news/#id1
/r/Python
https://redd.it/l41dz7
reddit
Pip has dropped support for Python 2
Posted in r/Python by u/pauloxnet • 24 points and 0 comments
os.path vs pathlib?
One short question, how and when do you use this modules?
​
For a very long time I only used os.path, but recently I discovered pathlib. My short answer:
os.path, if I just want to check if the path exists or just a few actions.
And pathlib for complicated tasks, like a base folder in various functions or class.
​
What do you think about this?
/r/Python
https://redd.it/l45ojr
One short question, how and when do you use this modules?
​
For a very long time I only used os.path, but recently I discovered pathlib. My short answer:
os.path, if I just want to check if the path exists or just a few actions.
And pathlib for complicated tasks, like a base folder in various functions or class.
​
What do you think about this?
/r/Python
https://redd.it/l45ojr
reddit
os.path vs pathlib?
One short question, how and when do you use this modules? For a very long time I only used os.path, but recently I discovered pathlib....
SimpleGUIBuilder - A GUI for designing Python GUI's for PySimpleGUI
Hello Python people :)
I don't really like doing frontend but I really like the idea of giving my backend/terminal programs something more pleasurable to interact with and look at.
That's when I came across PySimpleGUI, a simple solution to quickly give my programs an interactive front. Shortly, it allows you to quickly create a GUI by designing its layout and then map it to your backend code.
But in checking it out I found I wanted more and had an idea: It would be nice if PySimpleGUI and therefore GUI making was in itself more interactive.
And that's how SimpleGUIBuilder came to be: A GUI for creating/designing GUI layouts for PySimpleGUI, made with PySimpleGUI.
I hope this will be useful to people :)
You can get it in the releases and check out more info here in github.
Short preview
/r/Python
https://redd.it/l46dz4
Hello Python people :)
I don't really like doing frontend but I really like the idea of giving my backend/terminal programs something more pleasurable to interact with and look at.
That's when I came across PySimpleGUI, a simple solution to quickly give my programs an interactive front. Shortly, it allows you to quickly create a GUI by designing its layout and then map it to your backend code.
But in checking it out I found I wanted more and had an idea: It would be nice if PySimpleGUI and therefore GUI making was in itself more interactive.
And that's how SimpleGUIBuilder came to be: A GUI for creating/designing GUI layouts for PySimpleGUI, made with PySimpleGUI.
I hope this will be useful to people :)
You can get it in the releases and check out more info here in github.
Short preview
/r/Python
https://redd.it/l46dz4
GitHub
GitHub - PySimpleGUI/PySimpleGUI: Python GUIs for Humans! PySimpleGUI is the top-rated Python application development environment.…
Python GUIs for Humans! PySimpleGUI is the top-rated Python application development environment. Launched in 2018 and actively developed, maintained, and supported in 2024. Transforms tkinter, Qt, ...
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!
/r/Python
https://redd.it/l4b3uy
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!
/r/Python
https://redd.it/l4b3uy
reddit
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...
AF Questions on a github repo / second guessing myself for a job interview
Hello,
I’m interviewing for a flask developer position and part of the process is this:
“Use Case: Building a Cloud Portal
After looking around to leverage other gov code, you find an available repo to use as a portal for your future cloud portal. Before using it, you want to review the instructions, deploy the system locally to your computer, and provide technical feedback on the README.md file that you could use to streamline the local deployment of the application.
After getting the system running, you are excited to show your work and setup a demo for the application for us to see.
The repo is locating here: https://github.com/dod-ccpo/atst”
After attempting to deploy this application on multiple systems (mac os, windows, linux and docker) I’m unable to for a multitude of reasons,
My questions are the following: Is this code base fucked or what? What’s the point of using poetry (first time ive ever seen it) when better alternatives exist? Why reinvent the wheel? Why the hell would you want to use one script rules them all? Is this repo a test and it’s not meant to at work at all and they want to see what I say?
And also, for the record the docker deployment doesn’t
/r/flask
https://redd.it/l4clcy
Hello,
I’m interviewing for a flask developer position and part of the process is this:
“Use Case: Building a Cloud Portal
After looking around to leverage other gov code, you find an available repo to use as a portal for your future cloud portal. Before using it, you want to review the instructions, deploy the system locally to your computer, and provide technical feedback on the README.md file that you could use to streamline the local deployment of the application.
After getting the system running, you are excited to show your work and setup a demo for the application for us to see.
The repo is locating here: https://github.com/dod-ccpo/atst”
After attempting to deploy this application on multiple systems (mac os, windows, linux and docker) I’m unable to for a multitude of reasons,
My questions are the following: Is this code base fucked or what? What’s the point of using poetry (first time ive ever seen it) when better alternatives exist? Why reinvent the wheel? Why the hell would you want to use one script rules them all? Is this repo a test and it’s not meant to at work at all and they want to see what I say?
And also, for the record the docker deployment doesn’t
/r/flask
https://redd.it/l4clcy
GitHub
dod-ccpo/atat
Contribute to dod-ccpo/atat development by creating an account on GitHub.
Pyston 2.1 Is Blowing Past Python 3.8/3.9 Performance
https://www.phoronix.com/scan.php?page=news_item&px=Pyston-2.1-vs-Python-3.8-3.9
/r/Python
https://redd.it/l478fq
https://www.phoronix.com/scan.php?page=news_item&px=Pyston-2.1-vs-Python-3.8-3.9
/r/Python
https://redd.it/l478fq
Phoronix
Pyston 2.1 Is Blowing Past Python 3.8/3.9 Performance - Phoronix
Phoronix is the leading technology website for Linux hardware reviews, open-source news, Linux benchmarks, open-source benchmarks, and computer hardware tests.
Hiring Senior Backend Engineer | HR SaaS (Remote)
HI!
My team is looking for a skilled Senior Backend Engineer to join our growing 4-person engineering team. We're looking for someone with deep experience in Django Rest Framework and how it fits into a SaaS product.
Tech stack: Vue+Django, but open to other backgrounds
Compensation: $120k-150k base
Location: Remote (open to global applicants // we have team members in USA, Canada, and Europe // no visa transfers)
Company: Pequity
Mission: Equal pay and opportunity for all
Funding: Seed
Requirements:
Must have previous professional experience as a senior backend engineer
Startup experience highly preferred but not required
SaaS experience highly preferred by not required
Full-time preferred, but we can be flexible
If interested in learning more, please shoot me a message here and to warren@getpequity.com
/r/django
https://redd.it/l49bt0
HI!
My team is looking for a skilled Senior Backend Engineer to join our growing 4-person engineering team. We're looking for someone with deep experience in Django Rest Framework and how it fits into a SaaS product.
Tech stack: Vue+Django, but open to other backgrounds
Compensation: $120k-150k base
Location: Remote (open to global applicants // we have team members in USA, Canada, and Europe // no visa transfers)
Company: Pequity
Mission: Equal pay and opportunity for all
Funding: Seed
Requirements:
Must have previous professional experience as a senior backend engineer
Startup experience highly preferred but not required
SaaS experience highly preferred by not required
Full-time preferred, but we can be flexible
If interested in learning more, please shoot me a message here and to warren@getpequity.com
/r/django
https://redd.it/l49bt0
Getpequity
Pequity | Compensate with Confidence
Build competitive & equitable pay programs with data-driven compensation software.
Show profile page after login
If possible I'd like some help with a little self-teaching project. So I was following flask's own tutorial to build a blog. See here. I've managed to get the login and registration pages up and running with a connection to a mariadb server sitting on a raspberry pi in my network.
So I decided to expand on it to create a profile page which requires the user to be logged in to view. I created a new py file and a new html page to display this profile page. However, when I add the @loginrequired to the blueprint route for the profiles page it throws an app.context error.
Profile page code snippet
@zerg.beforeapprequest
def loadloggedinuser():
userid = session.get('userid')
if userid is None:
g.user = None
else :
db = getdb()
cur = db.cursor()
/r/flask
https://redd.it/l3zz22
If possible I'd like some help with a little self-teaching project. So I was following flask's own tutorial to build a blog. See here. I've managed to get the login and registration pages up and running with a connection to a mariadb server sitting on a raspberry pi in my network.
So I decided to expand on it to create a profile page which requires the user to be logged in to view. I created a new py file and a new html page to display this profile page. However, when I add the @loginrequired to the blueprint route for the profiles page it throws an app.context error.
Profile page code snippet
@zerg.beforeapprequest
def loadloggedinuser():
userid = session.get('userid')
if userid is None:
g.user = None
else :
db = getdb()
cur = db.cursor()
/r/flask
https://redd.it/l3zz22
My startup failed, so I open sourced the code. I hope someone finds it useful.
https://github.com/AdamGold/Dryvo
/r/Python
https://redd.it/l4kpou
https://github.com/AdamGold/Dryvo
/r/Python
https://redd.it/l4kpou
GitHub
GitHub - AdamGold/Dryvo: Driving lessons made simpler. Custom scheduling API built with Python.
Driving lessons made simpler. Custom scheduling API built with Python. - AdamGold/Dryvo
Best way to display python code and graphic outcomes in a Django site?
If I want to display some python code, and its resulting output and graphs as part of a Django page (I haven't decided if the visitors can or cannot modify the code, and rerun), what is the best way to do it? If I allow visitors to tweak the python code to see different output or graphs, is it really risky as a site security point of view?
/r/django
https://redd.it/l4i0of
If I want to display some python code, and its resulting output and graphs as part of a Django page (I haven't decided if the visitors can or cannot modify the code, and rerun), what is the best way to do it? If I allow visitors to tweak the python code to see different output or graphs, is it really risky as a site security point of view?
/r/django
https://redd.it/l4i0of
reddit
Best way to display python code and graphic outcomes in a Django site?
If I want to display some python code, and its resulting output and graphs as part of a Django page (I haven't decided if the visitors can or...
Creating a scalable Flask Application
We have a large
The system is supposed to get data in large bulk, so it should be able to use hardware at full capacity on heavy load
I researched and found some ways (mentioned below) to make application scalable but which one to choose
​
1. Gunicorn
2. Docker swarm
/r/flask
https://redd.it/l4lb1v
We have a large
flask application containerized using docker, different services are exposed via different endpoints. The application has a total of 5 containers with multiple deep learning models The system is supposed to get data in large bulk, so it should be able to use hardware at full capacity on heavy load
I researched and found some ways (mentioned below) to make application scalable but which one to choose
​
1. Gunicorn
2. Docker swarm
/r/flask
https://redd.it/l4lb1v
reddit
Creating a scalable Flask Application
We have a large `flask` application containerized using `docker`, different services are exposed via different endpoints. The application has a...
5 Python Slicing Tricks That Will Make Your Code More Elegant
https://medium.com/techtofreedom/5-python-slicing-tricks-that-will-make-your-code-more-elegant-bd5e27c73f7
/r/Python
https://redd.it/l4k3w9
https://medium.com/techtofreedom/5-python-slicing-tricks-that-will-make-your-code-more-elegant-bd5e27c73f7
/r/Python
https://redd.it/l4k3w9
Medium
5 Python Slicing Tricks That Will Make Your Code More Elegant
Small tricks for a big difference
Django Async vs FastAPI vs WSGI Django: Performance Comparision of ML/DL Inference Servers
https://aibharata.medium.com/django-async-vs-fastapi-vs-wsgi-django-choice-of-ml-dl-inference-servers-answering-some-burning-e6a354bf272a
/r/django
https://redd.it/l4nkyr
https://aibharata.medium.com/django-async-vs-fastapi-vs-wsgi-django-choice-of-ml-dl-inference-servers-answering-some-burning-e6a354bf272a
/r/django
https://redd.it/l4nkyr
Medium
Django Async vs FastAPI vs WSGI Django: Choice of ML/DL Inference Servers — Answering some burning questions.
Is it time to make the switch to FastAPI from Django? Read ahead to decide on your own.
How to use AWS Secrets Manager as a substitute for env vars and GitHub Secrets
https://www.youtube.com/watch?v=k1glWR8avuQ&list=PL0dOL8Z7pG3IWsvseNd-JoFTHL16P_iTC&index=12
/r/flask
https://redd.it/l4nex5
https://www.youtube.com/watch?v=k1glWR8avuQ&list=PL0dOL8Z7pG3IWsvseNd-JoFTHL16P_iTC&index=12
/r/flask
https://redd.it/l4nex5
YouTube
Flask to AWS ECS - Part 12: AWS Secrets Manager
GitHub link: https://github.com/alexanderdamiani/aws-ecs-demo
00:00 - Introduction
00:45 - AWS Secrets Manager
02:05 - AWS IAM User Permission
02:50 - Flask and CI/CD pipeline
05:17 - GitHub Secrets
05:43 - Running CI/CD pipeline and testing app
06:17…
00:00 - Introduction
00:45 - AWS Secrets Manager
02:05 - AWS IAM User Permission
02:50 - Flask and CI/CD pipeline
05:17 - GitHub Secrets
05:43 - Running CI/CD pipeline and testing app
06:17…
Does your Flask-powered site has robots.txt?
My first Flask project went into production mode a couple of days ago. What's different about my project is that I'm replacing a 5-year old php-powered site with a brand new python app. The project is a directory for professional services, and the old site was built using WordPress. I've analysed the structure and tried to preserve all of the important endpoints, but did not try to make sure that every WP endpoint would have an equivalent in the Flask app. There were just too many rudimentary endpoints that did not serve any meaningful purpose. Since the new site went live, I've been monitoring the requests that resulted in 404 error. There are hundreds of such requests per day, and it looks like most of them are made by bots. There are also lots of requests for the images that are no longer where they used to be - perhaps these images were embedded on some external sites? Anyway, one thing that I've noticed is that robots.txt is requested very often, but I did not bother adding this file. I know what robots.txt is for, but I'm not sure how it should be configured and used in the context of
/r/flask
https://redd.it/l4xqf7
My first Flask project went into production mode a couple of days ago. What's different about my project is that I'm replacing a 5-year old php-powered site with a brand new python app. The project is a directory for professional services, and the old site was built using WordPress. I've analysed the structure and tried to preserve all of the important endpoints, but did not try to make sure that every WP endpoint would have an equivalent in the Flask app. There were just too many rudimentary endpoints that did not serve any meaningful purpose. Since the new site went live, I've been monitoring the requests that resulted in 404 error. There are hundreds of such requests per day, and it looks like most of them are made by bots. There are also lots of requests for the images that are no longer where they used to be - perhaps these images were embedded on some external sites? Anyway, one thing that I've noticed is that robots.txt is requested very often, but I did not bother adding this file. I know what robots.txt is for, but I'm not sure how it should be configured and used in the context of
/r/flask
https://redd.it/l4xqf7
reddit
Does your Flask-powered site has robots.txt?
My first Flask project went into production mode a couple of days ago. What's different about my project is that I'm replacing a 5-year old...
Advise - Flask + ? for job board website
Hi everyone!
I'm building a job board website and I just finished building the backend using Flask + Eve. I will use MongoDB Atlas to store the database and I think I want to serve the website using Heroku. I'm a beginner with web apps but I've been writing Python and Scala for my DS 9-5 since I got out of college. My question is, how should I proceed with this project? The way I see it I could:
Build the app fully in Flask with jinja + html and style it with Bootstrap
Separate back end and front end, write a front end app that will communicate with my flask server
I can see advantages to both of these approaches, the easiest for me would be to just use Flask all the way. But I'm interested in the future of this app if it would scale up better by having a separate front end.
For the front end I have been researching Vue.js, and React.js but I'm unsure of the benefits of one over the other.
I'm open to suggestions or any other comments! Thanks everyone!
/r/flask
https://redd.it/l4wa5d
Hi everyone!
I'm building a job board website and I just finished building the backend using Flask + Eve. I will use MongoDB Atlas to store the database and I think I want to serve the website using Heroku. I'm a beginner with web apps but I've been writing Python and Scala for my DS 9-5 since I got out of college. My question is, how should I proceed with this project? The way I see it I could:
Build the app fully in Flask with jinja + html and style it with Bootstrap
Separate back end and front end, write a front end app that will communicate with my flask server
I can see advantages to both of these approaches, the easiest for me would be to just use Flask all the way. But I'm interested in the future of this app if it would scale up better by having a separate front end.
For the front end I have been researching Vue.js, and React.js but I'm unsure of the benefits of one over the other.
I'm open to suggestions or any other comments! Thanks everyone!
/r/flask
https://redd.it/l4wa5d
reddit
Advise - Flask + ? for job board website
Hi everyone! I'm building a job board website and I just finished building the backend using Flask + Eve. I will use MongoDB Atlas to store the...
Clean Architecture in Flask
Hi guys!
Nice to post here, I coming from Javascript and I keep looking at Flask. I'm a little noob in this framework but I wanna an alternative programming language to develop my backend as API REST.
I using Clean Architecture for all my new projects and I wanna look at some projects that use Clean Architecture.
Can you share your folder structure with Clean Architecture? I don't wanna copy your project, it's just for my personal projects.
​
(excuse for my English, it's not my native language)
/r/flask
https://redd.it/l540pd
Hi guys!
Nice to post here, I coming from Javascript and I keep looking at Flask. I'm a little noob in this framework but I wanna an alternative programming language to develop my backend as API REST.
I using Clean Architecture for all my new projects and I wanna look at some projects that use Clean Architecture.
Can you share your folder structure with Clean Architecture? I don't wanna copy your project, it's just for my personal projects.
​
(excuse for my English, it's not my native language)
/r/flask
https://redd.it/l540pd
reddit
Clean Architecture in Flask
Hi guys! Nice to post here, I coming from Javascript and I keep looking at Flask. I'm a little noob in this framework but I wanna an...
This project is flask heavy and quite robust. Interesting for people that want a deep dive into a full project!
https://github.com/AdamGold/Dryvo
/r/flask
https://redd.it/l5632d
https://github.com/AdamGold/Dryvo
/r/flask
https://redd.it/l5632d
GitHub
GitHub - AdamGold/Dryvo: Driving lessons made simpler. Custom scheduling API built with Python.
Driving lessons made simpler. Custom scheduling API built with Python. - AdamGold/Dryvo
Trying to find entry in my database but cant
So I'm trying to find a entry in my database that I created. When I go to query and compare the entry I'm looking for I get nothing.
Below is my code to query my database
enteredusername = request.form"username"
existinguser = db.session.query(UsersTable).filterby(username = enteredusername)
This is the result I get
SELECT userstable.id AS userstableid, userstable.username AS userstableusername, userstable.password AS userstablepassword FROM userstable WHERE userstable.username = ?
Assistance is much appreciated
/r/flask
https://redd.it/l52wpl
So I'm trying to find a entry in my database that I created. When I go to query and compare the entry I'm looking for I get nothing.
Below is my code to query my database
enteredusername = request.form"username"
existinguser = db.session.query(UsersTable).filterby(username = enteredusername)
This is the result I get
SELECT userstable.id AS userstableid, userstable.username AS userstableusername, userstable.password AS userstablepassword FROM userstable WHERE userstable.username = ?
Assistance is much appreciated
/r/flask
https://redd.it/l52wpl
reddit
Trying to find entry in my database but cant
So I'm trying to find a entry in my database that I created. When I go to query and compare the entry I'm looking for I get nothing. Below is my...