# How to add “Copy Location” Constraint programmatically?

Let's say I have 2 objects: 1 empty and 1 cube. How could I create a "Copy Location" constraint for the empty, so it follows the cube's movement?

import bpy