All Projects ā†’ TurboGears ā†’ Ming

TurboGears / Ming

Licence: other
MongoDB ODM (Object Document Mapper) with Unit of Works, IdentityMap, Relations and Mongo-In-Memory implementation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ming

Mongoengine
MongoEngine is a Python Object-Document Mapper for working with MongoDB. Documentation is available at https://mongoengine-odm.readthedocs.io - there is currently a tutorial, a user guide, and an API reference.
Stars: āœ­ 3,632 (+19015.79%)
Mutual labels:  pymongo, odm
mongu
šŸŒ± Yet another Python Object-Document Mapper on top of PyMongo. It's lightweight, intuitive to use and easy to understand.
Stars: āœ­ 15 (-21.05%)
Mutual labels:  pymongo, odm
EntityFrameworkCore.AutoFixture
A library aimed to minimize the boilerplate required to unit-test Entity Framework Core code using AutoFixture and in-memory providers.
Stars: āœ­ 31 (+63.16%)
Mutual labels:  in-memory
php-mongo-migrator
Migrations of MongoDB. Part of @PHPMongoKit
Stars: āœ­ 29 (+52.63%)
Mutual labels:  odm
derivejs
DeriveJS is a reactive ODM - Object Document Mapper - framework, a "wrapper" around a database, that removes all the hassle of data-persistence by handling it transparently in the background, in a DRY manner.
Stars: āœ­ 54 (+184.21%)
Mutual labels:  odm
influxable
A lightweight python ORM / ODM / Client for InfluxDB
Stars: āœ­ 36 (+89.47%)
Mutual labels:  odm
petstore
A simple skeleton to build api's based on the chubbyphp-framework, mezzio (former zend-expressive) or slim.
Stars: āœ­ 34 (+78.95%)
Mutual labels:  odm
iHealth crawler
iHealth 锹ē›®ēš„内容ēˆ¬č™«ļ¼ˆäø€äøŖåŸŗäŗŽ python 和 MongoDB ēš„医ē–—å’ØčÆ¢ēˆ¬č™«ļ¼‰
Stars: āœ­ 24 (+26.32%)
Mutual labels:  pymongo
PyODM
A Python SDK for adding aerial image processing capabilities to your applications šŸ”Œ
Stars: āœ­ 70 (+268.42%)
Mutual labels:  odm
mars
Mars - ODM Framework for MongoDB (MongoDB ODM Java )
Stars: āœ­ 35 (+84.21%)
Mutual labels:  odm
Tieba-Birthday-Spider
ē™¾åŗ¦č““吧ē”Ÿę—„ēˆ¬č™«ļ¼ŒåÆęŠ“å–č““å§å†…å§å‹ē”Ÿę—„ļ¼Œå¹¶äø”åœØåƹåŗ”ę—„ꜟč‡ŖåŠØ发送ē„ē¦
Stars: āœ­ 28 (+47.37%)
Mutual labels:  pymongo
pymongo inmemory
A mongo mocking library with an ephemeral MongoDB running in memory.
Stars: āœ­ 25 (+31.58%)
Mutual labels:  pymongo
go-time-series
Time series implementation in Go
Stars: āœ­ 27 (+42.11%)
Mutual labels:  in-memory
jsonOdm
A JSON ODM (object document mapper) for JavaScript to use on the server or in the browser.
Stars: āœ­ 95 (+400%)
Mutual labels:  odm
xenus
A simple and elegant MongoDB ODM
Stars: āœ­ 32 (+68.42%)
Mutual labels:  odm
torrentit
Telegram bot for downloading torrents without storage
Stars: āœ­ 33 (+73.68%)
Mutual labels:  in-memory
axiol
šŸš€ An advanced Python Discord bot for everyone
Stars: āœ­ 39 (+105.26%)
Mutual labels:  pymongo
distrox
A fast thread-safe in-memory cache library and server that supports a big number of entries in Go
Stars: āœ­ 37 (+94.74%)
Mutual labels:  in-memory
hazelcast-csharp-client
Hazelcast .NET Client
Stars: āœ­ 98 (+415.79%)
Mutual labels:  in-memory
megadlbot oss
Megatron was a telegram file management bot that helped a lot of users, specially movie channel managers to upload their files to telegram by just providing a link to it. The project initially started as roanuedhuru_bot which lately retired and came back as Megatron which was a side project of the famous Maldivian Telegram community - @baivaru uā€¦
Stars: āœ­ 151 (+694.74%)
Mutual labels:  pymongo

Ming

https://codecov.io/gh/TurboGears/Ming/branch/master/graph/badge.svg?token=Iy3CU62Ga5 https://img.shields.io/twitter/follow/turbogearsorg.svg?style=social&label=Follow

Ming is a MongoDB ODM ( Object Document Mapper, like an ORM but for Document based databases), that builds on top of pymongo by extending it with:

  • Declarative Models
  • Schema Validation and Conversion
  • Lazy Schema Evolution
  • Unit of Work
  • Identity Map
  • One-To-Many, Many-To-One and Many-To-Many Relations
  • Pure InMemory MongoDB Implementation

Ming is the official MongoDB support layer of TurboGears web framework, thus feel free to join the TurboGears Gitter or Twitter to discuss Ming.

If you want to dig further in Ming, documentation is available at http://ming.readthedocs.io/en/latest/

Getting Started

To use Ming you need to create a Session and a few models that should be managed by it:

from ming import create_datastore, schema
from ming.odm import ThreadLocalODMSession, Mapper, MappedClass, FieldProperty

session = ThreadLocalODMSession(
    bind=create_datastore('mongodb://localhost:27017/dbname')
)

class WikiPage(MappedClass):
    class __mongometa__:
        session = session
        name = 'wiki_page'

    _id = FieldProperty(schema.ObjectId)
    title = FieldProperty(schema.String(required=True))
    text = FieldProperty(schema.String(if_missing=''))

Mapper.compile_all()

Then you can create and query those models:

>>> WikiPage(title='FirstPage', text='This is a page')
<WikiPage text='This is a page'
   _id=ObjectId('5ae4ef717ddf1ff6704afff5')
   title='FirstPage'>

>>> session.flush()  # Flush session to actually create wikipage.

>>> wp = WikiPage.query.find({'text': 'This is a page'}).first()
>>> print(wp)
<WikiPage text='This is a page'
  _id=ObjectId('5ae4ef717ddf1ff6704afff5')
  title='FirstPage'>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].