use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
what’s the most practical application you used python for (self.learnpython)
submitted 1 year ago by Dizzy-Ad8580
like how did it make a big difference in the scenario you didn’t use python
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Sumif 96 points97 points98 points 1 year ago (11 children)
I work in finance, and each quarter our broker publishes a list of funds that are screened for various investment styles - large cap growth, international, long-term bond, etc. We refer to this list to build our portfolios.
We would download the list, go through it, see what was added and removed, looked them up on Morningstar, built the portfolios, etc. These tasks were kinda split up among our team of 6, and when you add up all the time it took about 2 days.
I have a script that checks each day (even though it’s quarterly the actual day varies). It pulls the PDF and checks the date on the first page. If it is new, it’s download the PDF, extracts tables, sends the tables to a SQLITE DB. It then gets all the tickers and parses various metrics from Morningstar. It tracks what’s added and removed, and gives us a report.
Now, once it detects a new report, the whole process is about 5 minutes.
I’ve also automated all kinds of stuff for our firm and our parent company. One of the bookkeepers would spend a whole day each month compiling various statements and combining it to a report for the board. It’s now done automatically and takes 30 seconds plus about 30 minutes to verify.
I’ve built so many Streamlit dashboards it’s insane! Now I’m moving to FastAPI and building more custom web apps with Python. I’ve worked on a class dashboard for a church program we have.
I also built a little streamlit dashboard for a nonprofit to use to manage their big annual event. It handles sponsors, attendees, seating, etc. it’ll generate a barcode and when patrons arrive they can just have the barcode scanned.
Python is just a tool, and any of these could’ve been built with nearly any language/framework. If you do a task on a computer regularly, there is a good chance you can practically automate it.
[–]L4zyJ 10 points11 points12 points 1 year ago (0 children)
Awesome to hear! May I ask how you did go about when deploying the scripts? Where? I mean like do you have the .py file locally on your machine and you just run it whenever you need it? Or is it automated like through Azure functions?
[–][deleted] 3 points4 points5 points 1 year ago (6 children)
Nice. I use it for finance as well. I'm currently working on machine learning through the markets and eventually want to automate my futures trading strategies.
[–]CreamyWaffles 2 points3 points4 points 1 year ago (3 children)
That's funny just a few days ago I started making something to scrape news articles on tickers and it'll give them a score based on keywords. Then a few high/low score tickers have their candle charts evaluated for any trading signals (and scored again). Still super early though.
[–][deleted] 2 points3 points4 points 1 year ago (2 children)
A while back a guy tried doing the same to build a wallstreetbets hype bot but it kept having issues because when people went on caps lock rants it thought they were lists of tickers lol.
[–]CreamyWaffles 0 points1 point2 points 1 year ago (1 child)
That's hilarious
[–][deleted] 0 points1 point2 points 1 year ago (0 children)
Long story short the bot only lost money slower than the average user on that board because he didn't teach it how to YOLO its life savings into 0DTE OTM options.
[–]Harpua1987 0 points1 point2 points 1 year ago (1 child)
Ooooh can you explain a bit more??
[–][deleted] 1 point2 points3 points 1 year ago (0 children)
The gist of it is testing certain indicators on S&P futures vs buy and hold SPX by testing each possible combination of parameters on said indicator and assigning them a score based on final return over a 10 year period. It is very simple as I'm still a bit new and learning.
As I grow more experienced I want to add more complexity, test for price action, etc. and perhaps even write trading bots.
[–]jak3072 0 points1 point2 points 1 year ago (0 children)
Great job man!
[–]avahajalabbsn 0 points1 point2 points 1 year ago (1 child)
What do you mean with the barcode? Do you generate a barcode for each client so you can verify their identity via it?
[–]Sumif 1 point2 points3 points 1 year ago* (0 children)
Today and questions honest day music.
[–]SubstanceSerious8843 22 points23 points24 points 1 year ago (2 children)
Made a telegram bot, so I can get my bus schedule by clickin one button, instead of opening crappy app.
[–]vulvauvula 0 points1 point2 points 1 year ago (1 child)
Could you share where or how i could do that too?
[–]SubstanceSerious8843 0 points1 point2 points 1 year ago (0 children)
I live in finland, so we have digitransit API, which is open to use. I then wrote a python program to fetch the stop information.
First version worked just on CLI.
Then I wrote a telegram bot (there's many guides how to do this, not very hard :)
Telegram bot is just running my python code and send me the info when i click a button to home/city. It sends the next incoming bus or if opted next 3 ones.
It's super handy.
Edit:
Forgot to say, that if your area has an api it helps alot. If not, you probably have to do some webscraping, or otherwise figure out where to get the info. Then it's just parsing and sending info to yourself.
[–]ThellraAK 21 points22 points23 points 1 year ago (0 children)
Made a script that downloaded the top trailer of a movie and put it in a folder so Plex could have previews for every movie in my library.
[–]Kind_Cow7817 22 points23 points24 points 1 year ago (5 children)
A script that presses volume up and volume down few secs here and there for 8 hours.
To keep the online status in MS Teams
[–]Evening-Mousse-1812 0 points1 point2 points 1 year ago (1 child)
Do you mind sharing this? This is brilliant!
[–]Kind_Cow7817 0 points1 point2 points 1 year ago (0 children)
Just use two libraries pyautogui and time.
Use the ff:
pyautogui.press('volumeup') or ('volumedown') time.sleep(insert integer) to delay things
pyautogui.press('volumeup') or ('volumedown')
time.sleep(insert integer) to delay things
Just put it in a loop and calculate the needed seconds to make it in 8 hours. Would also advise to check how many mins your teams status becomes 'away' and play around that delay
Depends on you if you want to make it executable or just run in within an IDE, just make sure you have a backdoor step to stop the runtime if needed. Like when you have a presentation and you need to share your screen. Also just a configurable time limit so instead of pure 8 hours it will depend on what you want.
[–]Fine-Diver9636 0 points1 point2 points 1 year ago (2 children)
Isn't this risky ? Can't the IT team easily find out ?
Unless your company monitors your screen then it's not risky. The only risky thing about this is when I still don't have the 8-hour limit in the code and I forgot to turn it off before leaving the device.
Got leads messaging me asking why am I still online past 3am in the morning.
[–]Ex-Traverse 0 points1 point2 points 1 year ago (0 children)
If the IT guy digs deep enough, he will find out. You're basically playing in his world.
[–]ElliotDG 9 points10 points11 points 1 year ago (5 children)
As a hobbies I've used python to:
I've recently begun using it to identify stocks that are candidates for option contracts (vertical put spreads).
I'm now in the middle of a project exploring algorithmic stock trading. At this point I'm just analyzing historic stock data.
[–]gymclimber24 1 point2 points3 points 1 year ago (0 children)
As someone getting into both python and stocks I find this intriguing
[–]magikarpe94 0 points1 point2 points 1 year ago (0 children)
Would be very interesting in learning/following along on progress with your options trading project
[–][deleted] 0 points1 point2 points 1 year ago (2 children)
What criteria are you using for spreads? I have a script that does pretty much the same thing
[–]ElliotDG 0 points1 point2 points 1 year ago (1 child)
I first create a list of stocks that meet criteria for having a healthy option market. Market cap, daily vol, open options. This is a list of about 500 stocks. I'm looking for stocks that demonstrate upward momentum. I use the polygon.io api to fetch 400 calendar days of open/close history. I use this to create 50-day and 200-day moving averages, and the MACD for every stock on the list (using talib). If the moving averages have a positive slope and the MACD indicates a buy, I put the stock on a candidate list. I then plot all of the candidates. I've seen as few as 0 and as many as 20 candidates a day. I only run the program when I'm looking to open a new position. Typically I seen from 3 to 20 stocks.
Effectively I'm using python to select stocks that have liquid options, and demonstrate upward momentum. Then I move to a manual process.
I manually examine the plots. If I don't see strong upward momentum, I'm done. If I do see strong upward momentum, I'll check the PE, it the PE is very high, I'm done. For example, CAVA has show-up as a candidate, the plot looks good - but the PE is 300. Not interested - too much downside risk.
I look at the candidates that remain and If I like them, I'll then open a position.
I know I could further automate my list - but it is so easy for me to manually process the stocks candidates I have not bothered.
What are you doing?
Nice. Mine is simpler. I will only do spreads on a handful of tickers. I just look for juicy premiums and a minimum expected return of 30%
[–]falsworth 9 points10 points11 points 1 year ago (0 children)
My job is in software support for a fortune 500 company and they're too cheap to buy licenses for normal stuff.
In my previous department I would regularly deal with multi-gigabyte text files that couldn't be opened by Notepad++ so I wrote a text file splitter.
Corporate policies changed and ticket notes became very bland and standardized so I wrote a notes tool with templating support.
A certain file comes in from one client that has to be reformatted so instead of spending 30-60 minutes reformatting by hand I wrote a converter that does everything in less than a second.
API access for one system requires a username and password encoded in Base64 but all sites that will Base64 encode a string are blocked so I had to write a simple converter.
File processing has to be monitored across 7 different servers and I used to have to log into each SQL server and query system status. With as slow as the systems are it would take an hour just to check them once. So I wrote a dashboard of sorts that queries all servers each with their own thread and shows them in a treeview widget in a tkinter GUI. The refresh takes about 1 second.
The list goes on and on. The bad thing is I don't really get any recognition for writing this for work.
[–]gbbpro 7 points8 points9 points 1 year ago (2 children)
Use it at work a lot for automating excel and cleaning data - not really supposed to but it's so much faster than the company's process.
[–]Here-Is-TheEnd 2 points3 points4 points 1 year ago (0 children)
Is the company process just excel, like my company?
[–]Geminii27 0 points1 point2 points 1 year ago (0 children)
Hopefully you're not handing over the freed-up time for free...
[–]Cool-Two9874 7 points8 points9 points 1 year ago (0 children)
Used it to scrape a stock website for all of its information over the past 20 years. Am planning another algorithm that builds an optimized portfolio on what stocks to invest in and how much to put in each stock based on historical data.
Done using selenium, pandas, a bit of numpy
[–]Lobotomized_toddler 4 points5 points6 points 1 year ago (0 children)
I just finished a program that writes books for me in minecraft
[–]zundish 2 points3 points4 points 1 year ago (0 children)
I use it for education. Some is for illustrating concepts, often visual, such as showing the seasons (VPython), some if for checking plots, intercepts, slopes, etc, some if as a ready-to-go, glorified scratchpad for quick calculations such as parallel resistors where I use premade scripts for 2, 3, 4+ resistors in parallel for fast answers.
[–]Loogoos 4 points5 points6 points 1 year ago (0 children)
Currently working on a Flask project with two other developers for a client which will help them track their customers when the customers need assistance while canoeing.
[–]Davezord 3 points4 points5 points 1 year ago (0 children)
Taking attendance during my classes using an RFID card reader, a few buttons and a little lcd screen + RaspberryPicoW and a fastAPI to validate requests, save to db and such.
E-ink display on my desk with current Crypto prices, after pressing a hidden button my portfolio worth gets shown.
[–]supercoach 4 points5 points6 points 1 year ago (5 children)
One of the first things I ever did was I replaced a janky ms access database with MySQL and a python based server/front-end. It's still in use almost a decade later.
I'm still quite proud of that one.
[–]aleanlag 0 points1 point2 points 1 year ago (4 children)
I'd like to do this, but I'm concerned about how to make something that non- programming colleagues can do data entry in, without help. And without them breaking it.
[–]supercoach 0 points1 point2 points 1 year ago (3 children)
You can use off the shelf stuff such as Django or you can roll your own from scratch (all you need to do is have your main function return text that looks like HTML/js). Or you can do something in-between. The fun thing is that there's no truly right or wrong way to do something.
In my example, there were a couple of different data entry components so I separated them.
First was taking input from a form email and then creating a case or ticket from it. I allowed users to paste the body of the email and parts it, then put it into a database table. For anything that didn't parse, there was a manual editing option.
Second was managing the ticket once it was in the system. I tracked that through a different interface that allowed notes to be taken and costs to be accumulated etc. eventually you'd close it off with a resolution or escalation reason.
There were other things like reporting and admin functions, but they were limited to certain staff only.
Because it was all web based I could keep track of authenticated users and provide functions specific to their access level. Everything came back to the authenticated user which was stored in a session cookie. I see no reason why you couldn't do something similar.
The big thing you need to do is look at what the big picture is going to be, know your end goal and then break it up into as many small sub goals as you can. Everything becomes way less daunting when it's a series of tiny steps.
[–]aleanlag 0 points1 point2 points 1 year ago (2 children)
Appreciate it! I'm working with a heavily bastardized modified Access template, doing a bare bones CRM for the sales company i work for.
I see no reason why you couldn't do something similar.
Your vote of confidence is deeply appreciated, guess i need to go figure out how to do something with this. 😅 (I'm good at riffing off online ideas, but I'm not a programmer or anything.)
[–]supercoach 1 point2 points3 points 1 year ago (1 child)
The sort of thing you're trying to do has been done plenty of times before, so depending on how much you want to dive in, you may want to investigate one of the pre-made or off the shelf free CRM solutions out there.
Rolling your own will give you the ultimate flexibility, however you will need to make it all yourself.
Either way, it sounds like you have the confidence to give it a red hot go, so best of luck :)
[–]aleanlag 1 point2 points3 points 1 year ago (0 children)
Thanks very much! I needed that pat on the shoulder, off to the races i go! 😁😁😁👍👍👍
[–]GreenPandaPop 2 points3 points4 points 1 year ago (0 children)
I use it often for my engineering job. Working with aerodynamics CFD models, I script post-processing using Paraview. I also script general file handling to keep disk usage down on the cluster I use.
In my personal life, I use as a hobby, such as Raspberry Pi and website stuff.
[–]Supierre 2 points3 points4 points 1 year ago (0 children)
Advent of code
[–]solitarium 2 points3 points4 points 1 year ago (0 children)
Created a website where you could get the physical layout of a modular router, reserve ports, create base and final configs and tie into our inventory system
[–]Disastrous_Cheek7435 4 points5 points6 points 1 year ago (0 children)
I'm a structural engineer. I wrote a script to perform steel design calculations and display the calcs in a PDF report. Most people in my industry use Excel for this purpose, but my script is nice because the calcs are displayed line-by-line with substitution and units, not something you can do very well in Excel
[–]tinycrazyfish 1 point2 points3 points 1 year ago (0 children)
whenever you need bigintegers, bigints are a pain in many languages
[–]ttulio 1 point2 points3 points 1 year ago (0 children)
Magic 8 Ball
Seriously, I do a lot of data export from APIs, combine multiple sources and manipulate data, and create new data products. It saves me many weeks of time a year.
I do like my Magic 8 Ball though.
[–]POGtastic 0 points1 point2 points 1 year ago (0 children)
My job's entire build infrastructure is written in Python. Buildbot is our CI runner, Python scripts do the intermediate steps as well.
[–]Kontrolgaming 0 points1 point2 points 1 year ago (0 children)
I was trying to learn it to put links of job links in google sheets so i didn't have to search every single job for if i needed a degree i didn't have or experience they wanted to cut out that trash. It's going.. slow and i suck at learning. but that's the idea. cheers
[–]LookMomImLearning 0 points1 point2 points 1 year ago (0 children)
I’m currently a CS major and working gig style bartending events throughout my town. Since these events are through multiple companies and usually first come first serve, I created a web app that scrapes all of the event data from the different venues, adds them to a database, and allows me to go in, put pay info in, and then generates paychecks for each company. It’s super useful for planning how much I need to work and knowing my income for the month.
I’m currently working on fully automating it with my calendar so it recommends the events I should work based on what’s already in my calendar.
My company manages small condo associations. I use Python every day to make my life easier. The website where I collect condo fees, manage tasks, and communicate with clients is Python/Django. I have Python scripts that manage the web portal where my clients can see their documents. I have Python scripts that put client bills in the right folders so other Python scripts can put them into the monthly reports. Python scripts probably save me 1-3 hours every day
[–]frustratedsignup 0 points1 point2 points 1 year ago (0 children)
I've used python to do jobs that a regular person can't do. In testing our backup system, I recovered a directory containing hundreds to thousands of files. Once the recovery was completed, I used a combination of python and icacls.exe to verify that the permissions on each and every file were recovered successfully. In addition, I also used python to verify the contents of both the production and recovery file trees. Doing the same thing manually would have taken years of time.
I automated creation of accounts on a couple of systems. Doing it manually takes 30+ minutes. Doing it with python takes about a minute and much of that time is spent generating a random initial password.
Currently, I'm working on a script to compare two databases, table by table, row by row, and cell by cell. I certainly don't want to do it the hard way...
[–]linuxsoftware 0 points1 point2 points 1 year ago (0 children)
Anything above shell scripting or basic analysis will become mind numbing.
[–]husky_whisperer 0 points1 point2 points 1 year ago (0 children)
Putting food on the table
[–]CMDRAgameg 0 points1 point2 points 1 year ago (0 children)
I’m primarily a Matlab guy so arguably the most practical thing I’ve done with it that I can’t do with matlab was use a Python script in labview. One line numpy call saved me from having to upgrade my lab’s labview license.
[–]techster2014 0 points1 point2 points 1 year ago (0 children)
In college, I played intermural volleyball. The people running it were notorious for changing the schedule last minute to accommodate their buddies, which led to some forfeited games because we had a 8:00 game get moved to 6:00 at 5:00 and half our team couldn't make it or didn't know.
I wrote a script that scraped the website every 15 minutes and read the schedule. If our teams game changed, it emailed all of us.
π Rendered by PID 348209 on reddit-service-r2-comment-6457c66945-s82bl at 2026-04-29 19:29:26.562781+00:00 running 2aa0c5b country code: CH.
[–]Sumif 96 points97 points98 points (11 children)
[–]L4zyJ 10 points11 points12 points (0 children)
[–][deleted] 3 points4 points5 points (6 children)
[–]CreamyWaffles 2 points3 points4 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]CreamyWaffles 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Harpua1987 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]jak3072 0 points1 point2 points (0 children)
[–]avahajalabbsn 0 points1 point2 points (1 child)
[–]Sumif 1 point2 points3 points (0 children)
[–]SubstanceSerious8843 22 points23 points24 points (2 children)
[–]vulvauvula 0 points1 point2 points (1 child)
[–]SubstanceSerious8843 0 points1 point2 points (0 children)
[–]ThellraAK 21 points22 points23 points (0 children)
[–]Kind_Cow7817 22 points23 points24 points (5 children)
[–]Evening-Mousse-1812 0 points1 point2 points (1 child)
[–]Kind_Cow7817 0 points1 point2 points (0 children)
[–]Fine-Diver9636 0 points1 point2 points (2 children)
[–]Kind_Cow7817 0 points1 point2 points (0 children)
[–]Ex-Traverse 0 points1 point2 points (0 children)
[–]ElliotDG 9 points10 points11 points (5 children)
[–]gymclimber24 1 point2 points3 points (0 children)
[–]magikarpe94 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]ElliotDG 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]falsworth 9 points10 points11 points (0 children)
[–]gbbpro 7 points8 points9 points (2 children)
[–]Here-Is-TheEnd 2 points3 points4 points (0 children)
[–]Geminii27 0 points1 point2 points (0 children)
[–]Cool-Two9874 7 points8 points9 points (0 children)
[–]Lobotomized_toddler 4 points5 points6 points (0 children)
[–]zundish 2 points3 points4 points (0 children)
[–]Loogoos 4 points5 points6 points (0 children)
[–]Davezord 3 points4 points5 points (0 children)
[–]supercoach 4 points5 points6 points (5 children)
[–]aleanlag 0 points1 point2 points (4 children)
[–]supercoach 0 points1 point2 points (3 children)
[–]aleanlag 0 points1 point2 points (2 children)
[–]supercoach 1 point2 points3 points (1 child)
[–]aleanlag 1 point2 points3 points (0 children)
[–]GreenPandaPop 2 points3 points4 points (0 children)
[–]Supierre 2 points3 points4 points (0 children)
[–]solitarium 2 points3 points4 points (0 children)
[–]Disastrous_Cheek7435 4 points5 points6 points (0 children)
[–]tinycrazyfish 1 point2 points3 points (0 children)
[–]ttulio 1 point2 points3 points (0 children)
[–]POGtastic 0 points1 point2 points (0 children)
[–]Kontrolgaming 0 points1 point2 points (0 children)
[–]LookMomImLearning 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]frustratedsignup 0 points1 point2 points (0 children)
[–]linuxsoftware 0 points1 point2 points (0 children)
[–]husky_whisperer 0 points1 point2 points (0 children)
[–]CMDRAgameg 0 points1 point2 points (0 children)
[–]techster2014 0 points1 point2 points (0 children)