I've made grid-based mazes before using a breadth-first search, but a similar algorithm can be devised from a depth first one.
First I'd create a graph, where each node in your coordinate graph above links to the node up, down, left, and right of it. For example, node (1, 1) has an edge to (0, 1), (1, 0), (2, 1), and (1, 2). Edge nodes will only have 3 edges, and corner ones will only have 2, since the neighbors in the appropriate directions don't exist. While you are generating these edges, assign each one a random weight. When I implemented it I found that a range of [0, 100) worked well, but you can tweak that. Then finally you can do a Depth First Search from your desired start node to the desired end one, and just trace out the path as you go. If you recurse down an edge that would connect you to a node you've already visited, don't draw the edge there. That'll get you something that looks maze-like.
When I did it, I actually set up the graph in the same way, but instead of DFS I used Prim's Algorithm to calculate the minimum spanning tree of that graph. This gave me something that looked maze-like, touched every node at least once, and contained no cycles. Then I could assign any point I wanted to be the start and end point, and the maze would contain no cycles, and exactly 1 shortest path between any 2 points. I added tools on top of that for editing the maze, removing dead ends, rendering it in 3D, etc, but those are beyond the scope of your question.
If you want to see how I did it, check out my project on GitHub. The "Minotaur" folder contains the executable (a Frankenstein's monster of Python, C++, and C#), and the source is in there too. The maze generation part is in this file.
I know you asked for this in Python but I'm too busy reverse engineer my C++ code right now, I hope you still find this answer helpful.
Edit: I nearly forgot I made a fancy video showing it off, so if you want to see it in action but don't want to compile my source or don't trust my executable, you can view the project on my portfolio.