Python Named Tuple Methods

Background Python’s namedtuple() is an integral part of the Collections library and an immutable container type. Values, once set, can not be modified. You can access values by referencing them via the index or name attribute. The namedtuple() work similar to tuples. However, namedtuple() has additional functionality. This article touches on a few of these … Read more

Python __annotations__ Attribute

Annotations are defined in PEP 3107 allow you to add arbitrary metadata to the parameters and return values of functions. The __annotations__ attribute of a function object stores those annotations in a dictionary mapping function parameters or the return value to the specified annotations. Let’s have a look at a couple of examples next. Parameter … Read more

How to Earn $4000/M Passive Income as a Coder?

Everybody talks about passive income these days. Is it a scam? Yes and no. Nothing can exist passively for an unlimited time. Here’s what passive income really means: passive income is a more or less slowly dying income stream. But the idea is still powerful and transformative. And there are a lot of income streams … Read more

Python requests.get() – The Ultimate Guide

Syntax requests.get(url, args) You can replace args with one or more of the following arguments, comma-separated: Parameter Description url Required The URL of the request params Optional Send data using a URL query string. Dictionary, list of tuples, or bytes. allow_redirects Optional By default, True: allowing redirects. If False, the code prevents redirection to another … Read more

Python Requests Library – Exception Handling & Advanced request.get() Parameters

This is the first part of a 3-part series on the Python request library: Python Requests Library – Your First HTTP Request in Python Python Requests Library – Understanding requests.get() Parameters Python Requests Library – Exception Handling & Advanced request.get() Parameters Syntax Background & Preparation The Requests library has several methods for GET. Part 1 … Read more

Python Requests Library – Understanding requests.get()

This is the first part of a 3-part series on the Python request library: Python Requests Library – Your First HTTP Request in Python Python Requests Library – Understanding requests.get() Parameters Python Requests Library – Exception Handling & Advanced request.get() Parameters Syntax requests.nameofmethod(parameters) Background and Preparation The Requests library has several options for GET. Part … Read more

Python Requests Library – Your First HTTP Request in Python

This is the first part of a 3-part series on the Python request library: Python Requests Library – Your First HTTP Request in Python Python Requests Library – Understanding requests.get() Parameters Python Requests Library – Exception Handling & Advanced request.get() Parameters Syntax Background There are many libraries around that make HTTP requests. However, the requests … Read more

How to Use FTX REST API in Python

This article explains how to use the REST API to access FTX in Python so that you can build your trading program. As you go through the article, you can also watch our article tutorial video: What is FTX? FTX is an exchange where users can trade various digital assets, such as cryptocurrencies, tokenised stocks … Read more

Python __ixor__() Magic Method

Syntax object.__ixor__(self, other) The Python __ixor__() magic method implements the in-place bitwise XOR x ^= y that calculates the result of the bitwise XOR operation x ^ y, and assigns it to the first operands’ variable x. This type of in-place operation is also called augmented arithmetic assignment. The method simply returns the new value … Read more

The Pandas apply() function

In this video and blog tutorial, we will learn how to apply a function to a Pandas data frame or series using the apply() function. Using this tool, we can apply any kind of function to segregate our data and change it with a very limited amount of code. Here’s the syntax from the official … Read more

Python __ior__() Magic Method

Syntax object.__ior__(self, other) The Python __ior__() magic method implements the in-place bitwise OR x |= y that calculates the result of the bitwise OR operation x | y, and assigns it to the first operands’ variable x. This type of in-place operation is also called augmented arithmetic assignment. The method simply returns the new value … Read more