Skip to content

Command Line

Prisma Client Python comes bundled with the Prisma CLI, all commands and arguments are the same. You can invoke the CLI using the installed console script:

$ prisma db push

or by directly invoking the Prisma Client Python module:

$ python -m prisma db push

or if that fails for any reason, you can also use the standard Node Prisma CLI if you have npx installed:

$ npx prisma generate


This is actually very similar to what Prisma Client Python does under the hood as it will download a Node binary and use that to execute the Prisma CLI.

If you use the Node CLI yourself then the custom python commands are not available. However, you can still do everything else you would normally do with the Prisma CLI, including generating the Python Client!


Prisma Client Python adds commands on top of the commands that prisma provides.

All python commands must be prefixed by py


Adds support for modifying Prisma Client Python schema options without having to make any changes to your prisma schema file.

Usage: prisma py generate [OPTIONS]

  --schema FILE               The location of the Prisma schema file.
  --watch                     Watch the Prisma schema and rerun after a change
  --interface [sync|asyncio]  Method that the client will use to interface
                              with Prisma
  --partials PATH             Partial type generator location
  -t, --type-depth INTEGER    Depth to generate pseudo-recursive types to; -1
                              signifies fully recursive types
  --help                      Show this message and exit.


Displays Prisma Client Python version information.

Usage: prisma py version [OPTIONS]

  --json  Output version information in JSON format.
  --help  Show this message and exit.


Ensure all binaries are downloaded and available.

Usage: prisma py fetch [OPTIONS]

  --force  Download all binaries regardless of if they are already downloaded
           or not.
  --help   Show this message and exit.