Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Just something: As Python has a package system: Make use of it. It manages all dependencies and will ease up the installation of your package.
-
CDNievas846y@sbiewald I know it buy I have problems with it, you must use a folder with a specific name in the project because is the unique form to get access to the developer defined model class. Python doesn't have annotations like java to do this. Its have a module to instropect code but it open the .py file and parses it so it's not an elegant solution.
-
CDNievas846y@sbiewald The modules or frameworks like ORMs works like you include it and use it functions and the ORM have access to your class by the annotations. In this case is inverse this mapper includes your model classes on it and work with the constructors
-
I looked a bit over the code and noticed something: I would suggest to write the hole example in English
-- What is an "usuario" and a "Direccion"?
But maybe the dump could be improved: Iterate over all attributes of an object. If it is not callable and not starts with an underline and can be.concerted to JSON, put it into the dictionary. This may allow more lax class definitions.
Btw.: Cool logo.
A json-object mapping for Python 3.X
A json-object mapping for Python 3.X