Cloudflare has a wide range of Python examples in the Workers Example gallery.
In addition to those examples, consider the following ones that illustrate Python-specific behavior.
Parse an incoming request URL
Parse JSON from the incoming request
Emit logs from your Python Worker
Refer to Query D1 from Python Workers for a more in-depth tutorial that covers how to create a new D1 database and configure bindings to D1.