Python tutorials

Build a Blog Using Django, GraphQL, and Vue

Are you a regular Django user? Do you find yourself wanting to decouple your back end and front end? Do you want to handle data persistence in the API while you display the data in a single-page app (SPA) in the browser using a JavaScript framework like React or Vue? If you answered yes to any of these questions, then you’re in luck. This tutorial will take you through the process of building a Django blog back end and a […]

Read more

Pydantic: Simplifying Data Validation in Python

Pydantic’s primary way of defining data schemas is through models. A Pydantic model is an object, similar to a Python dataclass, that defines and stores data about an entity with annotated fields. Unlike dataclasses, Pydantic’s focus is centered around automatic data parsing, validation, and serialization. The best way to understand this is to create your own models, and that’s what you’ll do next. Working With Pydantic BaseModels Suppose you’re building an application used by a human resources department to manage […]

Read more

Generating QR Codes With Python

From restaurant e-menus to airline boarding passes, QR codes have numerous applications that impact your day-to-day life and enrich the user’s experience. Wouldn’t it be great to make them look good, too? With the help of this video course, you’ll learn how to use Python to generate beautiful QR codes for your personal use case. In its most basic format, a QR code contains black squares and dots on a white background, with information that any smartphone or device with […]

Read more

Python News: What’s New From March 2024

While many people went hunting for Easter eggs, the Python community stayed active through March 2024. The free-threaded Python project reached a new milestone, and you can now experiment with disabling the GIL in your interpreter. The Python Software Foundation does a great job supporting the language with limited resources. They’ve now announced a new position that will support users of PyPI. NumPy is an old workhorse in the data science space. The library is getting a big facelift, and […]

Read more

Install and Execute Python Applications Using pipx

A straightforward way to distribute desktop and command-line applications written in Python is to publish them on the Python Package Index (PyPI), which hosts hundreds of thousands of third-party packages. Many of these packages include runnable scripts, but using them requires decent familiarity with the Python ecosystem. With pipx, you can safely install and execute such applications without affecting your global Python interpreter. To help you get to grips with pipx, you can download the supplemental materials, which include a […]

Read more

Python Deep Learning: PyTorch vs Tensorflow

PyTorch vs TensorFlow: What’s the difference? Both are open source Python libraries that use graphs to perform numerical computation on data. Both are used extensively in academic research and commercial code. Both are extended by a variety of APIs, cloud computing platforms, and model repositories. If they’re so similar, then which one is best for your project? In this video course, you’ll learn: What the differences are between PyTorch and TensorFlow What tools and resources are available for each How […]

Read more

Reading and Writing WAV Files in Python

There’s an abundance of third-party tools and libraries for manipulating and analyzing audio WAV files in Python. At the same time, the language ships with the little-known wave module in its standard library, offering a quick and straightforward way to read and write such files. Knowing Python’s wave module can help you dip your toes into digital audio processing. If topics like audio analysis, sound editing, or music synthesis get you excited, then you’re in for a treat, as you’re […]

Read more

Finding Python Easter Eggs

In this Code Conversation, you’ll follow a chat between Philipp and Bartosz as they go on an Easter egg hunt. Along the way, you’ll: Learn about Easter egg hunt traditions Uncover the first Easter egg in software Explore Easter eggs in Python There won’t be many code examples in this Code Conversation, so you can lean back and join Philipp and Bartosz on their Easter egg hunt. What’s Included: Downloadable Resources:    

Read more

The wrong way to speed up your code with Numba

If your NumPy-based code is too slow, you can sometimes use Numba to speed it up. Numba is a compiled language that uses the same syntax as Python, and it compiles at runtime, so it’s very easy to write. And because it re-implements a large part of the NumPy APIs, it can also easily be used with existing NumPy-based code. However, Numba’s NumPy support can be a trap: it can lead you to missing huge optimization opportunities by sticking to […]

Read more
1 2 3 164