encore
encore copied to clipboard
Client code gen support: Python
For some advanced codebases, they may use Python in some parts and wish to slowly migrate to Encore. In this case, we'd benefit from being able to generate a Python client that they can use to talk to their Encore app as they slowly migrate.
See code files here for the TypeScript implementation:
@bih Interested please assign
Hi @gagandeepp, that's great! Happy to assign it to you, but do note this is something that needs design work before we can start implementation. So the first step is to sketch out what the API should look like.
If you are happy to take a stab at that, let me know and we can definitely assign this to you. Thanks!
Hey @eandre from looking at the generated typescript code this seems relatively simple but would require a couple choices about tooling.
For HTTP requests, are you imaging using the standard library urllib.request API or a third-party package such as urllib3, httpx, aiohttp, or requests? Is an asynchronous interface a priority?
Similarly, for input data types, there's the standard library dataclass or packages such as attrs or pydantic that are very common for these things.
Note the links in the initial comment out of date and this code is now found at:
- https://github.com/encoredev/encore/tree/main/internal/clientgen