PythonNest / PyNest

PyNest is a Python framework built on top of FastAPI that follows the modular architecture of NestJS
https://pythonnest.github.io/PyNest
MIT License
643 stars 45 forks source link

[Demo requested] Full example on one-to-many and many-to-many relationships #50

Closed copdips closed 2 months ago

copdips commented 3 months ago

Hello,

I like pretty much the idea and the layout of PyNest.

Could you please provide a demo project that has users, products modules, with many-to-many and one-to-mant relationships between them ? maybe two demos for the 2 relationships could be better.

And how user interacts with product ? by using services or something else ?

I asked for this because if seems that the examples given in the repo only show the cases that user and product are independent.

ItayTheDar commented 3 months ago

Hello! Thank you for your words.

Basically, you were correct with you assumption that user and product will talk with each other using services. In that way, product service can inject user service and perform query operations on the user assets. Nest is really about organise your code in small and decoupled lego pieces that helps you to build robust application.

I have a few examples i can share and i will upload them asap to the PythonNest organisation.

ItayTheDar commented 2 months ago

Hello @copdips

I have an awesome news for you! I've just public one of my pynest projects, an application for managing stocks that demonstrate the powerful architecture of nestjs in python.

This is the link to the project - https://github.com/ItayTheDar/Stockify

Thanks again for bringing this issue to our community!

copdips commented 2 months ago

awesome, thanks