realpython.com realpython.com

Build a Blog Using Django, Vue, and GraphQL

Are you a regular Django user? Do you find yourself wanting to decouple your back end and front end, handling data persistence in the API while displaying the data in a client-side framework like React or Vue displays that data, in a single-page app (SPA) in the browser? You’re in luck. This tutorial will take you through the process of building a Django blog back end and a Vue front end, using GraphQL to communicate between...

realpython.com realpython.com

Build a Bulk File Rename Tool With Python and PyQt

Say you need to rename multiple files in your personal folder using a specific naming pattern. Doing that manually can be time-consuming and error-prone. So, you’re thinking of automating the file renaming process by building your own bulk file rename tool using Python. If so, then this tutorial is for you. In this tutorial, you’ll learn how to: Create the GUI for a bulk file rename tool using Qt Designer and PyQt Use PyQt threads...

realpython.com realpython.com

Embedded Python: Build a Game on the BBC micro:bit

Writing code that runs in the terminal or in your web browser is good fun. Writing code that affects the real world, however, can be satisfying on a whole other level. Writing this sort of code is called embedded development, and Python is making it more accessible than ever! In this tutorial, you’ll learn: What embedded development is and why you would use Python to do it What your hardware and software options are for running...

realpython.com realpython.com

Write Pythonic and Clean Code With namedtuple

Python’s collections module provides a factory function called namedtuple(), which is specially designed to make your code more Pythonic when you’re working with tuples. With namedtuple(), you can create immutable sequence types that allow you to access their values using descriptive field names and the dot notation instead of unclear integer indices. If you have some experience using Python, then you know that writing Pythonic...

realpython.com realpython.com

Natural Language Processing With Python's NLTK Package

Natural language processing (NLP) is a field that focuses on making natural human language usable by computer programs. NLTK, or Natural Language Toolkit, is a Python package that you can use for NLP. A lot of the data that you could be analyzing is unstructured data and contains human-readable text. Before you can analyze that data programmatically, you first need to preprocess it. In this tutorial, you’ll take your first look at...

realpython.com realpython.com

Python News: What's New From April 2021?

If you hang around Python developers long enough, you’ll eventually hear someone talk about how awesome the Python community is. If you want to get up to speed on what happened in the Python community in April 2021, then you’ve come to the right place to get your news! From better error messages that improve user experience to community-driven efforts to delay a change to CPython, April 2021 was a month full of stories that...

realpython.com realpython.com

Build a Platform Game in Python With Arcade

For many video game players, the lure of writing games is a prime reason to learn computer programming. However, building a 2D platform game such as Lode Runner, Pitfall!, or Super Mario Bros. without proper tools or guidance can leave you frustrated. Fortunately, the Python arcade library makes creating a 2D game in Python accessible for many programmers! If you haven’t already heard about it, the arcade library is a modern Python...

realpython.com realpython.com

Deploying a Python Flask Example Application Using Heroku

In this tutorial, you’ll create a Python Flask example application and deploy it using Heroku, making it publicly available on the web. Heroku removes much of the infrastructure burden related to building and running web applications, allowing you to focus on creating an awesome app. Besides deploying the app, you’ll use Git to track changes to the code, and you’ll also configure a deployment workflow with different environments...