Hi there,

I'm just wondering what is the best way to do this. I'm not asking about 
micro-services, just a general API coding practice.

Currently, I have a number of APIs (separate code base) and each has their 
own model (e.g. users) and the endpoints create don't need anymore tables 
(models) except the ones it uses. We have also left out the relationships 
between the tables.

I haven't used ORMs at this level of separation before (all of my previous 
projects have all been 1 giant application) so I'm not sure what is the 
best way to do this. We are starting to develop APIs that would require it 
to span a few tables.

My query is: 

   1. Is it good practice to copy all the models (tables) for each API that 
   we'll be creating? Have a directory of all the models and copy this 
   directory to every API we create.
   2. Or is it better to just just the models (tables) that this model will 
   be using? Just copy the models that this API needs.
   3. Is it a bad idea to leave out the relationships?


Thanks.
Desmond


-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/32ba6fcc-a4f3-4bdc-8520-6e6e8d079ff8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to