Multiple generators #1029
-
I have a monorepo with Python and Typescript. Is there a way to add both I currently have this:
But running
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If anyone else comes across this path, just add the flag |
Beta Was this translation helpful? Give feedback.
-
Hi, someone knows how to use different interface generators using the python-client-py? I mean, something like that: generator client_async {
provider = "prisma-client-py"
interface = "asyncio"
partial_type_generator = "models/partials_prisma.py"
recursive_type_depth = 5
}
generator client_sync {
provider = "prisma-client-py"
interface = "sync"
partial_type_generator = "models/partials_prisma.py"
recursive_type_depth = 5
} and generate both? Cause I want to use the prisma client on celery tasks, but celery doens't have an official solution for async-functions tasks, so i can´t (in theory) use await expressions. But i want to use the async prisma client on FastAPI routes and on celery tasks use the sync prisma client... How to do it? How to referenciate on a Prisma() instance which client i'm using? |
Beta Was this translation helpful? Give feedback.
If anyone else comes across this path, just add the flag
--generator py
to choose which generator to run