Comments (1)
Hey @Natureshadow
If you are creating lib, of which jsonmodels would be a transport layer with optional Django support - then I suggest to put code (in the beginning at least) responsible for that in that very library (as jsonmodels does not have any integration with any framework for now).
As the lib grows - you could make this generic - and extract this as a plugin to your library (or jsonmodels?)
And diving into more details about
Has anyone thought about how to link it to Django ORM, as in, optionally persist data in real Django models?
I'd keep jsonmodels and Django agnostic - and build around them layer that translates/autogenerates models (field by field) - although this is complicated as you can have few approaches like keeping only one-level models (so they are easily translated) or cast deeper json structures as json field or as related model... Plus there is problem how to handle django migrations (especially that Django has to be optional).
So yeah, problem is complicated - you should start with as many constraints and assumptions as possible to make this easier :)
from jsonmodels.
Related Issues (20)
- Field values are lost when pickling jsonmodel HOT 2
- Model validation should return the list of errors instead of the encountered error
- field of any object type // null HOT 1
- populate - arg throw_on_unknown_keyword
- this tool can't handle json with nested []
- no deepcopy HOT 1
- Enum field example HOT 2
- A version of to_struct that uses the field name instead of display name?
- Implement Jazzband guidelines for project jsonmodels HOT 7
- Models in ListField are not validated when calling `.validate()`
- Nullable is not working in to_struct() HOT 1
- Schemaless fields
- Using dataclasses as middle format?
- Dictionary field
- Add pyproject.toml
- Add isort
- Add black
- BaseField: the parameters `required` and `nullable` have counter-intuitive results HOT 2
- to_json_schema: Change IntegerField to type:integer and FloatField to type:number HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonmodels.