Make Document.get_collection public
Document._get_collection is a protected method, but it's very useful for public usage. I don't see any reason why it should be protected.
I guess this would suffice:
class Document(BaseDocument):
...
get_collection = _get_collection
That's a good point. I use Document._get_collection quite a lot myself whenever I need access to raw PyMongo Collection methods.
How are you going to name it? Will it be a property collection?
collection property sounds like the best choice, though I haven't fully considered all the implications.
No matter what public property we choose, we should make sure that users can't use it as a field name, e.g. this should raise an error immediately upon definition:
class DbDoc(Document):
collection = StringField()