Python Tutorial

Python JSON Tutorial: dumps, loads, dump, load, Pretty Print and Error Handling

Submitted by jaypabs on

JSON is everywhere in modern programming. REST APIs send it, JavaScript front ends expect it, configuration files are written in it, and many capstone projects store small amounts of data in a .json file before they move to a real database. If you write Python, sooner or later you will need to turn a dictionary into JSON or read a JSON response back into Python.

Python pathlib Tutorial: Paths, Read/Write, glob, mkdir and Practical File Scripts

Submitted by jaypabs on

Working with files is one of the first things you do in almost every Python project: open a CSV for a grade list, create a folder for uploads, find every .py file in a project, or build a path that works on both Windows and Linux. For years the usual tools were os.path and plain strings. Today the cleaner option is the built-in pathlib module and its Path objects.

Python Regex Tutorial: re.search, findall, sub and Validation with Examples

Submitted by jaypabs on

Sooner or later every programmer needs to find a pattern inside text: pull the dates out of a log file, check if an email address looks valid, clean up extra spaces in a name, or turn a title into a URL slug. You could write loops and if statements for each case, but there is a much shorter way: regular expressions (regex). Python supports them through the built-in re module, so there is nothing to install.

Python CSV Tutorial: Read, Write, Append and Filter CSV Files with the csv Module

Submitted by jaypabs on

CSV (comma-separated values) files are everywhere: exported Excel sheets, Google Forms responses, bank statements, grade sheets, product lists for an inventory system. Sooner or later every programmer has to read one, clean it, compute something and write a new file. In Python you do not need to install anything for that. The built-in csv module handles it, including the tricky parts like commas inside a field, quotes, different delimiters and Excel-friendly encodings.

Python Decorators Explained with Examples: Logging, Timing, Retry, Access Control and Caching

Submitted by jaypabs on

Have you ever seen a line like @app.route("/") in Flask or @login_required in Django and wondered what that little @ symbol actually does? That is a decorator, one of Python's most powerful features. A decorator lets you add extra behavior to a function, such as logging, timing, retrying or permission checks, without changing the function's own code.

Python String Cases Conversion Tutorial

Submitted by oretnom23 on

In this tutorial, you will discover how to perform string case conversions in Python. If you are new to Python programming and seeking a reference to expand your knowledge and skills, this tutorial provides insights into fundamental operations commonly employed in Python applications. Sample code snippets are included, along with explanations for better understanding.

Multiple File Upload in Django Tutorial

Submitted by oretnom23 on

In this tutorial, you can learn to Iterate Request Files and Upload Multiple Files at once using Django in Python. This tutorial aims to provide students and beginners with a reference for learning to develop a dynamic website using Django. Here, I will be giving some steps for creating a simple web application that results in an App that allows users to upload multiple files at once.

Getting Started

Before we start the coding part, please download and install Python and Django on your local machine first.