Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Instead of just exposing the crud endpoints, can it generate the actual methods in a file? #216

Open
arunkumar-pt opened this issue Mar 4, 2023 · 2 comments

Comments

@arunkumar-pt
Copy link

Idea is to utilize piccolo FastAPIWrapper to generate both router files and service/repository files for the basic crud actions on a table.
Reference: https://docs.nestjs.com/recipes/crud-generator

Advantages:

  1. It can then be easy to override logic based on one's use cases.
  2. The generated method can then be called from other services directly instead of relying only on a HTTP call
  3. Useful to scaffold a larger fastapi project with minimal effort.

BTW, I have been already enjoying working with piccolo with its many awesome features. Thanks a lot.

@dantownsend
Copy link
Member

It's an interesting idea.

We currently have some code scaffolding available via piccolo asgi new, but this is just for a new project.

We also have piccolo app new which generates a new Piccolo app, but doesn't contain any endpoints.

If we were to add more scaffolding, it would probably be augmenting these existing commands.

For example piccolo asgi route.

@ghost
Copy link

ghost commented Mar 5, 2023

piccolo asgi route sounds great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants