Python Requests POST GET (HTTP Request Explained)

Welcome back or nice to see you for the first time!

Roberts Greibers here with another experience-based post about Python requests.

I’ve been working professionally as a Python developer for well over 7 years, I’ll share more details about my story later in the post.. (just scroll down the page to find out more about me). 

But before we talk about how qualified I am to write posts about Python requests, I’ll just give you all the answers you’ve been Googling for. ๐Ÿš€

WARNING: You’re about to see the most important Python requests library use cases with clearly defined examples. 

This is the BIGGEST breakthrough you’ll ever achieve as a Python developer.

Learning and implementing this way of calling API with a Python request is a major achievement in your career that you’ll use on a daily basis for years to come. 

In this post, you’re going to explore:

๐Ÿšจ I’ll explain in detail everything you should know about Python3 requests (why Python2 requests are NOT used anymore)

And I’ll show you how API calls in Python are done in a real project (from Django projects I’ve worked on)

The intention here is to give you a real Python HTTP request example you could use in your own projects. 

Just a quick note before we start: At the end of the post I’ll share details about what helped my students to get hired as Python developers, read till the end and see if that helps you too!๐Ÿ‘‡๐Ÿป

Continue reading

Python Read CSV File (Python Excel Reader)

Hey! It’s Roberts Greibers here.

I’ll share details about my 7+ years of experience as a Python developer with you a bit later in the post (you’ll have to scroll down to find them).

But now, let’s talk about how I came to write my “read from CSV Python example” script.. ๐Ÿš€

Firstly, understand that CSV is a file format supported by nearly all platforms..

That’s why for Python programming purposes I’d suggest you use CSV format instead of any other excel format.ย 

It’s possible to find a Python excel library and use Python for excel files in general, but in this post, we’re going to strictly focus on how to read CSV file in Python.ย 

Also, we’re going to check:

  • Should you learn Excel or Python? (using Python in Excel?)
  • Are there any ways you can use Python for excel? (e.g. Parsing CSV Python)
  • Any Python excel library you could find and use? (e.g. Python CSV file reader)
  • How to import CSV file in Python? (the process of importing CSV into Python)

If you’ve been Googling for “Python Read CSV” or the typical “Reading CSV file in Python” you’ve found the RIGHT place! ๐ŸŽ‰

I’m about to explain the details of how I optimize my time by parsing spreadsheets in Python (e.g. CSV in Python) and how I avoid manual CSV reading tasks using Python.ย 

Building a quick CSV file reader in Python can take you up to 30 minutes and save you hours later assuming you’re using the script on a daily basis.ย 

Let’s get into it and I’ll also share a way that helped me and might even help you to become a professional Python developer at the end of the post ๐Ÿ‘‡๐Ÿป

Continue reading

Subprocess In Python (Run Command Line)

Good evening, Roberts Greibers here.

We will get into my Python subprocess story and how I even got the point of writing blog posts about Python a bit later. 

But at this moment, I want you to pay attention and read very carefully!

What I’m about share with you is a real subprocess Python example! ๐Ÿšจ

How to use subprocess in Python to run command line commands!

The difference between running a shell command in Python with:

Also, a real example of me actually executing a shell command in Python.

Most “Python subprocess example” tutorials you’ll find online won’t give you a REAL project example..

And they won’t tell you what steps you’ll need to take in your specific situation. 

In this post, I’ll share how you should THINK in order to be able to come up with a solution for your own “how to run shell command in Python?” problem.. ๐Ÿš€

If this sounds interesting to you, keep on reading, I’ll also give you an opportunity to become a Python developer at the end of the post ๐Ÿ‘‡๐Ÿป

Continue reading

Learn Python Coding (Without Udemy Courses)

It’s Roberts Greibers here. I’ll tell you about myself in just a moment. 

But right now I want you to take a look at Yuliia’s Success Story video down below.

Yuliia recorded her success story right after getting hired as a Python developer in the US and this happened just after training in Python for 6 months. ๐Ÿš€

Most Python courses (especially Python Udemy courses) are filled with basic Python online training material. 

The mentoring method Yuliia followed is NEW and differentโ€ฆ

It’s the ONLY type of Python training that can guarantee you’ll become a professional Python developer. ๐Ÿ

So, if the above sounds interesting to you, keep on reading, I’ll tell you the whole story of how Yuliia managed to become a Python developer in just 6 months! ๐Ÿ‘‡๐Ÿป

Continue reading

Python XML Parse – ElementTree Reader & Parser

In this Python XML tutorial, you will learn how to use xml.etree.ElementTree package (which is one of the many Python XML parsers) to process XML response.

For this tutorial, you can use your own XML response or follow the steps below and use the one I have provided.

The Python XML parsing steps I’m about to explain and guide you through were developed alongside a refund payment integration I was working on in Django. 

We’re going to explore the parsing end result for the SOAP XML response I wrote about in the previous post. The SOAP XML parsing post was written with a focus on an actual regex parsing in Python and all the steps before you get to the actual XML scheme style response. 

In this post, I’m about to give you a Python XML tutorial for parsing XML schemes when you already have a decoded version of an XML response and you see the information.

The post here is about extracting specific values from the whole XML tree without using regex or any other typical Python parsing tools, but the actual xml.etree.ElementTree package (the right way)

By the way, Roberts Greibers here – in my day job, I’m working as a Python Django backend developer for a local company in Riga, Latvia, and building a white label payment gateway platform. 

Over the past couple of years, I’ve gathered a lot of experience in the FinTech industry, practical knowledge of how payment systems work, how to develop, test and deploy them with minimal headache. 

Of course, I can’t go into too much detail here in a single blog post, but if you want to build your own portfolio project and become a Python and Django developer, I’d suggest checking out client testimonials here and reaching out to me.

I go very deep and always explain all the steps in detail with specific videos and documents for my clients. So the post here is just a small example of how I could help you out.

Also, I always answer all client questions along the way.. but enough of talking, let’s get into the code. 

Continue reading

Parsing SOAP XML Response In Python

In this tutorial, you will learn how to decode and parse a large SOAP XML response with Python and regular expression, essentially the goal here was to build a Python function to get rid of manually decoding SOAP XML response over and over again.

The Python code I’m about to explain and show you was developed as a part of refund payment integration done in Python and Django. 

We’re going to take a look at an encoded SOAP XML response stdout saved in a text file.

I saved this SOAP response output when I was in a process of developing a payment integration feature for a local bank here in Riga, Latvia, along the way I realized it’s going to be a great learning experience for anyone else who’s going to search for a similar solution on Google. 

I’ve discussed similar text file parsing in Python situations before here on the blog, but the difference here is that this one is way more complicated and involves a bit more decoding and text manipulation as well as extensive knowledge on regex pattern matching. 

Definitely a good Python regular expression practice, even for advanced Python developers. 

Currently, I’m working as a Python Django backend developer (Roberts Greibers) for a local company here in Riga, Latvia – building a white-label payment gateway platform, you can find more about my experience on my Linkedin profile

Give me a follow on Linkedin or send me a DM if you have any questions. 

One of the recent payment integration flows I needed to develop was for a refund payment. Refund payments were supposed to work for multiple banks through one gateway system for this particular client and brand. 

The whole refund payment flow is way more complicated and would take me weeks to write up and explain here on the blog so I’m gonna share a small portion of what actually was very interesting to work on – parsing decoded SOAP XML response with regular expression in Python. 

I go deeper explaining features you can develop for your Python and Django portfolio if you’re working personally with me in one on one Zoom calls (click here to see an example of a LIVE Zoom call). I personally will guide you through the development of each feature and answer all your questions along the way. 

This is what we’re working on with my most successful mentoring clients.

So if the above sounds interesting, let’s get started! 

Continue reading

Django: How Painful And Difficult It Is

Hello there!

Welcome back – or nice to have you for the first time!

Roberts Greibers here and in this post, I want to share with you how painful and difficult the Django framework is and how much Python is required for a Django developer position – this is especially important for Python beginners who are interested in becoming a Django developer. 

If you’re reading this postโ€ฆ 

And you’re seriously considering becoming a Python/Django developer

Starting from scratch and getting your very first Python/Django DEV job can make you feel a little lost -“Where to actually start?”

All these doubtful questions can come to your mind and you can start to feel unsure about yourself

If that sounds familiar, keep reading – this post is exactly for YOU!

Continue reading

My 3 Unit Tests Tips In Python Django (REALLY Important!)

Good morning! Welcome back, Roberts Greibers here, and in this post, I want to talk about my three unit tests tips that have allowed me to get into writing unit tests in Python Django way faster, in a way more scalable way. 

These are unit tests tips that you will definitely need! 

Because when it comes to building a Python Django project you can’t build anything without having proper test coverage. 

If you like the idea of becoming a Python Django developer, building your own Django projects, writing professional code which is also covered with unit tests – this post is exactly for YOU!

These are tips that I literally use every day when I’m working on new features in Python Django and I wish I knew about them when I was just a beginner Python developer. 

I’ve been working professionally as a Python developer for more than 5 years now – and for the past couple of years, I’ve been working in the fintech industry, building a white label payment gateway product for a local company ( in Riga, Latvia. 

You can read more about my experience on my Linkedin here.

I’m also helping junior developers who are at beginning of their careers (see the LIVE mentoring call here) to take a shortcut and basically use my code examples, techniques I have collected over the years and apply them to their own projects to get their first Python Django job opportunities. 

In the end, what I’m about to give you here in this post is just a small portion of what I share with my clients.

But this will definitely help you write better Python scripts if you’re serious about becoming a Python/Django developer. 

Continue reading

Wait For Elements In Python Selenium (5 Powerful Examples)

Alright, welcome back to the blog, Roberts Greibers here, and in this post, I want to talk about five powerful examples you can use in Python Selenium to wait for elements when working on automation projects.

Whether you’re just getting started as a Python developer, or you are already in the industry as a test automation engineer and looking for more effective ways in Python selenium to wait for element – this post is for you!

These are not just things that I’ve just randomly come up with!

These are not just theoretical concepts!

These are code examples in Python selenium to wait for element that I have saved in my notes since a long time ago and I literally used them back when I used to work on test automation projects. 

The code examples I’m about to show you are few of the best ways in Python selenium to wait for element that allowed me to improve the speed of my test automation scripts!

I’m going to show you a code to:

  • wait for element to be found (any situation)
  • wait for element to be visible
  • wait for element to be clickable
  • wait for element to load
  • wait for element to be displayed

… which one to use depends on a specific situation you’re working on. But I can assure you, in the end, these code examples led me to write more advanced Selenium automation test cases. 

And NO! It’s not going to be about using just the typical time.sleep(1) solution. I’ll show you where it’s appropriate to use time.sleep(1) and I’ll show you the best ways I know in Python Selenium to wait for element.

import time


I’ve been working professionally as a Python developer for more than 5 years – a part of it was as a quality assurance engineer where I worked with Python and selenium framework a lot. 

Eventually, I became a Python/Django developer (see my Linkedin here) and now I’m also helping relatively new engineers (quality assurance engineers, analysts, etc.) to become Python developers.ย (see a cut from a LIVE mentoring call)

If you like the idea of becoming a Python developer, learning about Selenium framework tricks, and eventually maybe even becoming a Django developer, then this post is for you!

Continue reading

Python Training: Why You Shouldn’t Attend It (3 Important Reasons)

Good afternoon, Roberts Greibers here, and in this post I’m going to expose the awful truth about python training in NYC (New York City) and also all over the world. 

I’ve been working professionally as a Python developer for more than 5 years and now (see my Linkedin here) I’m also helping people who are in a similar position I was when I first started – to become Python developers. (see a cut from a LIVE mentoring call)

Ever since I started to lean more into the field of helping people, I realized how many horror stories are out there about a common Python training course. 

Every now and then I hear a new story, a new shocking price of a training course, and now it’s no surprise to me that there is a lack of good Python developers out there. 

I used to be a quality assurance engineer (manual tester) – testing website projects and apps so I totally get that a lot of people want to move away from their current job and get into more profitable positions like becoming a Python/Django developer.  

Maybe you’re somebody who wants to become a Python developer, be more independent, more free from a typical 9-5 job, maybe even work remotely from anywhere in the world, and have a higher income than what you’re used to. 

So if that’s you, I want to give you a little bit of a counterbalance to all the wild claims that all these Python training courses out there are currently making. 

Continue reading