Byte
If you've ever needed to send files or data to a server via a POST request, you've likely had to use multipart/form-data. In this Byte, we'll see how to send these requests using the requests library in Python. What is "multipart/form-data"? multipart/form-data is a media...
Scott Robinson
If you're a Python developer, you've probably come across a variety of errors, like the "local variable referenced before assignment" error. This error can be a bit puzzling, especially for beginners and when it involves local/global variables. Today, we'll explain this error, understand why it occurs, and...
In data analysis applications, one possible way to store data in Python is in a list of dictionaries. But what if you want to perform more complex operations on your data, like sorting, filtering, or statistical analysis? That's where the powerful Pandas library comes in, and more specifically, the DataFrame...
In this Byte we'll be taking a look at HTTP request headers in Flask. They can carry important information between the client and the server, and understanding how to access them is needed for most any dynamic web application. What are HTTP request headers and why use them? HTTP headers...
In Python, variables declared outside of the function or in global space are known as global variables. These variables can be accessed by any function in the program. However, there may be instances where you want to delete or change a global variable within a function. This byte will guide...
Let's say you have a list of home addresses and want to see which ones reside on a "Street", "Ave", "Lane", etc. Given the variability of physical addresses, you'd probably want to use a regular expression to do the matching. But how do you...
Working with any language, you've probably come across warnings - and lots of them. In Python, our warnings are the yellow-highlighted messages that appear when code runs. These warnings are Python's way of telling us that, while our code is technically correct and will run, there's something in it that's...
Article
When dealing with large amounts of data or files, you might find yourself needing to compress files into a more manageable format. One of the best ways to do this is by creating a zip archive. In this article, we'll be exploring how you can create a zip archive of...
Python provides some very convenient ways to work with file-like objects, including the with feature. But what if we need to open multiple files in this way? Your could wouldn't exactly be "clean" if you had a bunch of nested with open statements. In this article, we'll show...
© 2013-2025 Stack Abuse. All rights reserved.