Closed kidrecursive closed 11 years ago
Well, I just noticed this:
setuptools.setup(
name="Mongothon",
version="0.3.0",
author="Tom Leach",
author_email="tom@leach.it",
description="A MongoDB object-document mapping layer for Python",
license="BSD",
keywords="mongo mongodb database pymongo odm validation",
url="http://github.com/tleach/mongothon",
packages=["mongothon"],
long_description="Mongothon is a MongoDB object-document mapping " +
"API for Python, loosely based on the awesome " +
"mongoose.js library.",
install_requires=['pymongo'],
tests_require=['mock', 'nose']
)
So BSD it is, sorry for the bother.
Yeah it's BSD.
If you have any other questions / requests etc let me know. This library is definitely in alpha right now but the plan is to use and build on Mongothon at my company in the coming few months so watch this space.
Sure, I've been working on a fork of it the last few days to add some specific features that I need, we can discuss more in depth offline if you feel like you would like to take the lib in that direction. Basically my changes have been to:
Those are the major structural changes and represent a change in philosophy of the lib, so I understand if you don't feel like they need to be merged in.
Interesting stuff.
create_model
when generating a dynamic model class... probably. :-)In any case, I will of course backport some of your fixes (I'm relatively new to Python and never realized callable()
was a thing). More than happy to discuss debate this stuff some more :-).
I use composition a lot for schema's in Mongoose. In Python you get some goodies that allow you to do things in a more OO fashion so that's the reason I made that change, it's a style preference as you say.
One thing I started to work on is extensible types for schemas, so you could have 'type':Reference, or create whatever you like. This is similar to mongoengine's field system which works really well. For instance you could have a list type and apply validators/defaults to it as opposed to just being able to set a base type or have an embedded document.
I like the extensible types idea, though bear in mind you can already do embedded lists/collections by using the [child_schema]
notation allowing each list item to validated using a child schema. Or are you saying you want to validate the length of the list?
Yep, something like that, or only allow certain strings etc inside of a list.
Hi, thanks for your work on this project.
There is no license attached to the project, do which license do you intend to release this code under?
Thanks.