Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tevino/mongu
:seedling: Yet another Python Object-Document Mapper on top of PyMongo. It's lightweight, intuitive to use and easy to understand.
https://github.com/tevino/mongu
mongodb odm pymongo python
Last synced: 2 months ago
JSON representation
:seedling: Yet another Python Object-Document Mapper on top of PyMongo. It's lightweight, intuitive to use and easy to understand.
- Host: GitHub
- URL: https://github.com/tevino/mongu
- Owner: tevino
- License: mit
- Created: 2014-04-18T15:25:48.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-07-02T15:34:11.000Z (over 8 years ago)
- Last Synced: 2024-11-06T20:23:26.297Z (3 months ago)
- Topics: mongodb, odm, pymongo, python
- Language: Python
- Homepage: http://mongu.rtfd.org
- Size: 64.5 KB
- Stars: 15
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/tevino/mongu.svg?branch=master)](https://travis-ci.org/tevino/mongu)
[![Coverage Status](https://coveralls.io/repos/github/tevino/mongu/badge.svg?branch=master)](https://coveralls.io/github/tevino/mongu?branch=master)# Introducing to Mongu
**Mongu** is yet another Python Object-Document Mapper on top of ``PyMongo``. It's lightweight, intuitive to use and easy to understand.If those **heavy and slow layers** have nothing or more than you need, Mongu maybe the one for you.
You are the only one who knows what you reall need.
Therefor **Mongu does nothing but a skeleton for you to fill**.
Actually, if you have ever tried to write your own ODM, you may already implemented parts of Mongu :D
# Installation
pip install mongu# Dependences
- pymongo >= 2.7*Older(not ancient) version should work just fine, but 2.7 is tested.*
# Documentation
## A really quick examplec = Client()
@c.register_model
class User(Model):
_database_ = 'test'
_collection_ = 'users'
_defaults_ = {'is_activated': False} # default attribute>> user = User(name='Mongu')
User({'name': 'Mongu', 'is_activated': False})
>> user.save()
User({'name': 'Mongu', 'is_activated': True, '_id': ObjectId('534f81bd7246ef6955d2388f')})For more detailed examples and API: http://mongu.readthedocs.org
# License
Code and documentation are available according to the MIT License.# Send feedback!
If you thought Mongu is helpful, please [tell me](mailto:[email protected]), a brif message like “This is what I always wanted” is enough, I would love to know!Of course by all means feel free to send pull requests or create issues, it's always welcome and appreciated.
Thanks!