DSL to MongoEngine Q.
Reason this release was yanked:
Accidentally release
Project description
Features
- Build your mongoengine query from DSL syntax
- Convert your data at build time via transform hook
Quickstart
Install
pip install mongoengine_dsl
Use
from mongoengine import Document, StringField
from mongoengine_dsl import Query
class User(Document):
fullname = StringField()
User(fullname="Tom").save()
User(fullname="Dick").save()
User(fullname="Harry").save()
assert User.objects(
Query("fullname: Dick")
).first().fullname == "Dick"
assert User.objects(
Query("fullname: dick", transform={
"fullname": lambda x: x.title()
})
).first().fullname == "Dick"
More
Full Documentation: https://stonemoe.github.io/mongoengine_dsl
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mongoengine_dsl-0.1.4.tar.gz
(20.9 kB
view hashes)
Built Distribution
Close
Hashes for mongoengine_dsl-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6428c3602ead9b1a6d0ecc48f8e15c1953036dd4cd7d16009dcdaa1a734c8bfa |
|
MD5 | 0d5bcd8d41bebe9cc85f05b1a345e898 |
|
BLAKE2b-256 | 0fdca44179f2e892cb3315dd98a7d6cd0b4b3243c9bd621845b86ae43a72f83a |