Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nonproftechie committed Feb 26, 2016
1 parent 7532832 commit b9ae71b
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,12 @@ A (very) thin wrapper on top of PyMongo CRUD functions in order to use some diff
## Example
### BEFORE (with PyMongo)
```python
post = {"author": "Mike",
"text": "My first blog post!",
"tags": ["mongodb", "python", "pymongo"],
"date": datetime.datetime.utcnow()}

posts.insert_one(post)
results = posts.find_one({"title": "Moby Dick"})
```

### AFTER (with Mongous)
```python
now = datetime.datetime.utcnow()

posts.create(
author="Mike",
text="My first blog post!",
tags=["mongodb", "python", "pymongo"],
date=now
)
results = posts.read(title="Moby Dick")
```

## Installation
Expand Down

0 comments on commit b9ae71b

Please sign in to comment.