python passive income

4 Python Passive Income Ideas for Developers!

One of the benefits of being a developer is the fact that you can write code and have it work for you while you are sleeping or doing something else. Programs are one of the few things in life that work on their own without the need of a supervisor (for the most part). With that being said, if you are a Python developer like me, it certainly has crossed your mind whether you could create a python Passive Income stream or not. You definitely can and should create a Python Passive Income stream and today we are going to discuss 4 of them!

The ideas written below can probably be implemented with other programming languages as well. These may not be completely passive or easy to recreate, but they should give you some ideas to work on your own. Additionally, I am going to include a variety of different skills a python developer may have. As a result, you will read about at least one way you can create a passive income stream with python or another programming language!

1) Python Web Scraping

What is Python Web Scraping?

Web Scraping is when you “scrape” or gather large amounts of data from websites. There are many reasons why someone may want to do that, one of them being to sort it and sell it. Businesses need data to better understand their audience or display and resell it themselves. Data can also be used for personal use. When we are specifically talking about python web scraping we are usually talking about 2 libraries. One of them is requests, a simple to use python library for HTTP requests. The other one is Selenium, a library for web browser simulation and automation. Of course, there are other libraries out there but I would say these two are the major ones people use for web scraping with python. Moreover, you may want to use Beautiful Soup, which is a package for parsing HTML and XML documents with python.

How to make Passive Income with Python Web Scraping

If you are still unsure how web scraping works as a business model, I will try to explain it to you with two famous examples. Both examples are Semi-Passive Income streams. The first example is the Way Back Machine Project. This project has been running for more than two decades and it is truly insane. They have used web scraping / web crawlers in order to scrape as many websites as possible. As a result, they have saved various different versions of websites throughout the years which people visit through them! Now, this may not be the best example of a passive income stream (because they earn through donations) but it does showcase the power of web scrapping perfectly!

Facebook's front page in 2013, seen on WayBackMachine. This is an example of a python passive income stream.
Facebook’s front page in 2013, seen on WayBackMachine

Another example of a Semi-Passive Income stream with python scraping is SEO tools. Search Engine Optimization (SEO) is the process of analyzing keywords and other kinds of data. The SEO tool analyzes the data in order to help users rank their websites on the top of a Search Engine Result Page. If it hasn’t clicked yet for you, the ability to rank for let’s say the keyword “used cars for sell” is extremely important. That is because a business that sells used cars could earn millions of euros from all the traffic that keyword brings. Some popular SEO tools are Ahrefs, UberSuggest, and MOZ. Running those businesses is anything but passive, but the data collection is mostly passive.

How to scrape a website with Requests library

After reading the official documentation and running ‘pip install requests’ in your CMD you are ready to scrape data! Running the code below should scrape “example.com” and print the website’s frontend.

import requests

r = requests.get("https://example.com")
print(r.text)

How to scrape a website with Selenium library

Selenium is a little more complicated than requests. That is because Selenium simulates a whole browser and nicely displays the website you want. Selenium is also used for web automation. Once again, after reading the official documentation and running ‘pip install selenium’ you are almost ready to start scrapping. The last thing you need to do is install the correct drivers (according to your main browser and its version).

Running the code below should scrape “example.com” and print the website’s code.

from selenium import webdriver

driver = webdriver.Chrome() #You may be using a different browser than Chrome!
driver.get("https://example.com")
html = driver.page_source
print(html)

driver.close()

2) Create a Python Course

Ηypothetical python passive income through tutoring.
Photo by NeONBRAND on Unsplash

Knowledge is extremely important and learning programming can be difficult. Combining those two facts, you could start earning passive income through python related courses. Do not try to sell a course on how to learn python. That is something oversaturated that anyone can learn for free. Seriously, just look it up on youtube… Instead, I would try to create a python course for a smaller niche.

For example, I remember paying for a Udemy course on how to write Graphical User Interfaces with Tkinter. I am a self-taught developer since ~2017. I learned most of my skills for free, yet I had the need to purchase that course. Why? Because it was a very specific skill that I wanted to learn (creating GUIs with python). Online resources were inadequate. I wanted to learn that new skill fast. You see, a course takes some effort to make, it is not just another article or youtube video. I am not saying those do not take effort, but creating a course requires dedication. As a result, most course creators make sure their content is complete and helpful (which is why in the end I ended up buying that course!).

Python Course Ideas for Passive Income

Now that we have talked about what type of content you should focus on, let’s name a couple of examples.

• Website Development with Python

Every year, the demand for skilled website developers rises. So does the popularity of Python. Employers are looking for website developers that can create well-functioning pages quickly. That is something python can cover as it has a large variety of backend libraries. To name a few, Django, Flask and web2py are some of the most useful backend libraries for python. I am not going to analyze which one you should create a course on. Each of these libraries has its advantages and disadvantages. Making your own research and choice would be ideal!

Of course, website development requires HTML, CSS and JavaScript so I would personally include those into the course to make it more useful and desirable. Adding some CSS frameworks such as bootstrap and JavaScript libraries like React may be wise to do.

• Home Automation with Python, Raspberry Pi and Arduino

2 Raspberry Pi boards and one Arduino as an example about making passive income with python from selling courses for home automation with python.
Photo by Harrison Broadbent on Unsplash

Internet of Things has been extremely popular in the last couple of years. Do you know how to use a microcontroller like a Raspberry Pi or Arduino and are knowledgeable on how circuits work? Great, you should definitely create a course on home automation with Python! Moreover, you may want to sell your related scripts, circuits, or circuit kits as a bundle!

• Cryptocurrency Investing with Python

This one is arguably a bit more difficult to teach as it requires two different skills, programming and trading. However, if you know how to do both, you could create an insanely useful course. Think about it, Cryptocurrencies are trending these last couple of years. Everyone wants to get involved with cryptocurrency investing and trading. Why not teach them and earn some passive income with Python?

3) Software-as-a-Service with Python

Photo by Lukas Blazek on Unsplash

Python is one of the most popular languages used for the back-end development of millions of websites worldwide. That is because with Python you can easily create websites that are fast, safe to use and interactive. As a result, this gives an amazing experience to the users. Developers can create useful websites using the Django,Flask and web2py libraries that we mentioned earlier. Those websites can be monetized with monthly or yearly subscriptions and result in huge returns of investment! Additionally, SaaS businesses get sold on platforms such as Flippa and Empire Flippers for around 25 to 40 times their monthly net profit. (Their worth may vary on the niche, SERP rankings, domain age and more!)

4) Blogging about Python programming

I know what you are thinking… Passive Income and Blogging do not really go together. Blogs require a lot of effort, as they are essentially full-time jobs. (YIKES – Imagine working full-time instead of working on your Passive Income streams!) Coming up with fresh content ideas, doing research, and writing content can be difficult, however, programming blogs have a great advantage. Their content, for the most part, is considered “evergreen content”. Evergreen content, for those who don’t know already, is content that remains relevant for years upon years. This is great for a well SEO-optimized blog. You can write content and have it earn you money for years with no new updates or working on it daily. (This is a LOT easier said than done and search engines like Google change all the time, meaning your post can stop getting ranked well!)

Passive Income Streams with Python – The Conclusion:

To sum it all up, passive income with Python or another programming language is 100% possible. You may use python directly to earn money, like in the SaaS example, or have an indirect approach where you produce content. Whatever the case may be, you need to remember that Passive Income streams take time to be built. Additionally, they may not be truly passive, especially in the first couple of years. You may also want to read my previous post about 20 Passive Income Ideas anyone can start! where I discuss more non-programming-related stuff!

Leave a Reply

Your email address will not be published. Required fields are marked *