Managing database migrations is a great challenge in any software project. Luckily, as of version 1.7, Django comes with a built-in migration framework. The framework is very powerful and useful in managing change in databases. But the flexibility provided by the framework required some compromises. To understand the limitations of Django migrations, you are going […]
Category: SQL
Python REST APIs With Flask, Connexion, and SQLAlchemy – Part 3
In Part 2 of this series, you added the ability to save changes made through the REST API to a database using SQLAlchemy and learned how to serialize that data for the REST API using Marshmallow. Connecting the REST API to a database so that the application can make changes to existing data and create […]
Get Started With Django Part 1: Build a Portfolio App
Django is a fully featured Python web framework that can be used to build complex web applications. In this tutorial, you’ll jump in and learn Django by example. You’ll follow the steps to create a fully functioning web application and, along the way, learn some of the most important features of the framework and how […]
Django Migrations 101
Since version 1.7, Django has come with built-in support for database migrations. In Django, database migrations usually go hand in hand with models: whenever you code up a new model, you also generate a migration to create the necessary table in the database. However, migrations can do much more. With this course you’ll get comfortable […]
13 Project Ideas for Intermediate Python Developers
Learning the basics of Python is a wonderful experience. But the euphoria of just learning can be replaced by the hunger for hands-on projects. It’s normal to want to build projects, hence the need for project ideas. The problem though is that some projects are either too simple for an intermediate Python developer or too […]
Managing Multiple Python Versions With pyenv
Have you ever wanted to contribute to a project that supports multiple versions of Python but aren’t sure how you would easily test all the versions? Are you ever curious about the latest and greatest versions of Python? Maybe you’d like to try out these new features, but you don’t want to worry about messing […]
How to Learn Python for Data Science In 5 Steps
Why Learn Python For Data Science? Before we explore how to learn Python for data science, we should briefly answer why you should learn Python in the first place. In short, understanding Python is one of the valuable skills needed for a data science career. Though it hasn’t always been, Python is the programming language […]
Async IO in Python: A Complete Walkthrough
Async IO is a concurrent programming design that has received dedicated support in Python, evolving rapidly from Python 3.4 through 3.7, and probably beyond. You may be thinking with dread, “Concurrency, parallelism, threading, multiprocessing. That’s a lot to grasp already. Where does async IO fit in?” This tutorial is built to help you answer that […]
Django Migrations: A Primer
Since version 1.7, Django has come with built-in support for database migrations. In Django, database migrations usually go hand in hand with models: whenever you code up a new model, you also generate a migration to create the necessary table in the database. However, migrations can do much more. You are going to learn how […]
Modeling Polymorphism in Django With Python
Modeling polymorphism in relational databases is a challenging task. In this article, we present several modeling techniques to represent polymorphic objects in a relational database using the Django object-relational mapping (ORM). This intermediate-level tutorial is designed for readers who are already familiar with the fundamental design of Django. Free Bonus: Click here to get the […]
Make a Location-Based Web App With Django and GeoDjango
Throughout this tutorial, you’ll learn how to use Django and GeoDjango to build a location-based web application from scratch. You’ll be building a simple nearby shops application that lists the shops closest to a user’s location. By the end of this tutorial, you’ll be able to: Use Django to build a simple web application from […]
Setting Up Python for Machine Learning on Windows
Python has been largely used for numerical and scientific applications in the last years. However, to perform numerical computations in an efficient manner, Python relies on external libraries, sometimes implemented in other languages, such as the NumPy library, which is partly implemented using the Fortran language. Due to these dependencies, sometimes it isn’t trivial to […]
Python Community Interview With Michael Kennedy
This week, our Python community interview is with none other than Michael Kennedy of Talk Python to Me fame. You may know his authoritative voice, but do you know his Python story? Read on to find out about his journey with Python, what he thinks about when stuck in traffic, and his love for two […]
How to Round Numbers in Python
It’s the era of big data, and every day more and more business are trying to leverage their data to make informed decisions. Many businesses are turning to Python’s powerful data science ecosystem to analyze their data, as evidenced by Python’s rising popularity in the data science realm. One thing every data science practitioner must […]
Building and Documenting Python REST APIs With Flask and Connexion – Part 2
In Part 1 of this series, you used Flask and Connexion to create a REST API providing CRUD operations to a simple in-memory structure called PEOPLE. That worked to demonstrate how the Connexion module helps you build a nice REST API along with interactive documentation. As some noted in the comments for Part 1, the […]