# Get a dictionary with tags as the keys and frequencies as the valuestag_freqs=BlogPost.objects.item_frequencies('tag')

Every blog need comments, right?

classComment(EmbeddedDocument):author=StringField()content=StringField(required=True)date=DateTimeField()# Modify the previously defined BlogPost documentclassBlogPost(Document):...comments=ListField(EmbeddedDocumentField(Comment))...# Let's add a comment, this is performed as an atomic operationcomment=Comment(author=form['author'],content=form['content'])BlogPost.objects(id=post_id).update(push__comments=comment)

I could go on, but I’ll keep this post short and to the point. For more information, see the documentation. The source is available on GitHub, fork it and have a play!