MongoFrames


NameMongoFrames JSON
Version 1.3.7 PyPI version JSON
download
home_pagehttps://github.com/GetmeUK/MongoFrames
SummaryA fast unobtrusive MongoDB ODM for Python
upload_time2024-07-17 14:41:42
maintainerAnthony Blackshaw
docs_urlNone
authorAnthony Blackshaw
requires_pythonNone
licenseMIT
keywords database mongo mongodb odm pymongo
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            <a href="http://mongoframes.com"><img width="188" src="http://mongoframes.com/images/github-splash.png" alt="MongoFrames logo"></a>

# MongoFrames

[![Build Status](https://travis-ci.org/GetmeUK/MongoFrames.svg?branch=master)](https://travis-ci.org/GetmeUK/MongoFrames)
[![Join the chat at https://gitter.im/GetmeUK/ContentTools](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/GetmeUK/MongoFrames?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

MongoFrames is a fast unobtrusive MongoDB ODM for Python designed to fit into a workflow not dictate one. Documentation is available at [MongoFrames.com](http://mongoframes.com) and includes:

- [A getting started guide](http://mongoframes.com/getting-started)
- [Tutorials/Snippets](http://mongoframes.com/snippets)
- [API documentation](http://mongoframes.com/api)

## Installation

We recommend you use [virtualenv](https://virtualenv.pypa.io) or [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io) to create a virtual environment for your install. There are several options for installing MongoFrames:

- `pip install MongoFrames` *(recommended)*
- `easy_install MongoFrames`
- Download the source and run `python setup.py install`

## Dependencies

- [blinker](https://pythonhosted.org/blinker/) >= 1.4
- [pymongo](https://api.mongodb.com) >= 3
- [pytest](http://pytest.org/) >= 2.8.7 *(only for testing)*

## 10 second example

```Python
from mongoframes import *

# Define some document frames (a.k.a models)
class Dragon(Frame):
    _fields = {'name', 'loot'}

class Item(Frame):
    _fields = {'desc', 'value'}

# Create a dragon and loot to boot
Item(desc='Sock', value=1).insert()
Item(desc='Diamond', value=100).insert()
Dragon(name='Burt', loot=Item.many()).insert()

# Have Burt boast about his loot
burt = Dragon.one(Q.name == 'Burt', projection={'loot': {'$ref': Item}})
for item in burt.loot:
    print('I have a {0.name} worth {0.value} crown'.format(item))
```

## Testing

To test the library you'll need to be running a local instance of MongoDB on the standard port.

To run the test suite: `py.test`
To run the test suite on each supported version of Python: `tox`

## Helpful organizations
MongoFrames is developed using a number of tools & services provided for free by nice folks at organizations committed to supporting open-source projects including [GitHub](https://github.com) and [Travis CI](https://travis-ci.org).



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/GetmeUK/MongoFrames",
    "name": "MongoFrames",
    "maintainer": "Anthony Blackshaw",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "ant@getme.co.uk",
    "keywords": "database mongo mongodb odm pymongo",
    "author": "Anthony Blackshaw",
    "author_email": "ant@getme.co.uk",
    "download_url": "https://files.pythonhosted.org/packages/8e/30/3b35ddce201117795062e6eb1944159e78d9c5c717a8720b8a1cb0b72446/MongoFrames-1.3.7.tar.gz",
    "platform": null,
    "description": "<a href=\"http://mongoframes.com\"><img width=\"188\" src=\"http://mongoframes.com/images/github-splash.png\" alt=\"MongoFrames logo\"></a>\n\n# MongoFrames\n\n[![Build Status](https://travis-ci.org/GetmeUK/MongoFrames.svg?branch=master)](https://travis-ci.org/GetmeUK/MongoFrames)\n[![Join the chat at https://gitter.im/GetmeUK/ContentTools](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/GetmeUK/MongoFrames?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nMongoFrames is a fast unobtrusive MongoDB ODM for Python designed to fit into a workflow not dictate one. Documentation is available at [MongoFrames.com](http://mongoframes.com) and includes:\n\n- [A getting started guide](http://mongoframes.com/getting-started)\n- [Tutorials/Snippets](http://mongoframes.com/snippets)\n- [API documentation](http://mongoframes.com/api)\n\n## Installation\n\nWe recommend you use [virtualenv](https://virtualenv.pypa.io) or [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io) to create a virtual environment for your install. There are several options for installing MongoFrames:\n\n- `pip install MongoFrames` *(recommended)*\n- `easy_install MongoFrames`\n- Download the source and run `python setup.py install`\n\n## Dependencies\n\n- [blinker](https://pythonhosted.org/blinker/) >= 1.4\n- [pymongo](https://api.mongodb.com) >= 3\n- [pytest](http://pytest.org/) >= 2.8.7 *(only for testing)*\n\n## 10 second example\n\n```Python\nfrom mongoframes import *\n\n# Define some document frames (a.k.a models)\nclass Dragon(Frame):\n    _fields = {'name', 'loot'}\n\nclass Item(Frame):\n    _fields = {'desc', 'value'}\n\n# Create a dragon and loot to boot\nItem(desc='Sock', value=1).insert()\nItem(desc='Diamond', value=100).insert()\nDragon(name='Burt', loot=Item.many()).insert()\n\n# Have Burt boast about his loot\nburt = Dragon.one(Q.name == 'Burt', projection={'loot': {'$ref': Item}})\nfor item in burt.loot:\n    print('I have a {0.name} worth {0.value} crown'.format(item))\n```\n\n## Testing\n\nTo test the library you'll need to be running a local instance of MongoDB on the standard port.\n\nTo run the test suite: `py.test`\nTo run the test suite on each supported version of Python: `tox`\n\n## Helpful organizations\nMongoFrames is developed using a number of tools & services provided for free by nice folks at organizations committed to supporting open-source projects including [GitHub](https://github.com) and [Travis CI](https://travis-ci.org).\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A fast unobtrusive MongoDB ODM for Python",
    "version": "1.3.7",
    "project_urls": {
        "Homepage": "https://github.com/GetmeUK/MongoFrames"
    },
    "split_keywords": [
        "database",
        "mongo",
        "mongodb",
        "odm",
        "pymongo"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8e303b35ddce201117795062e6eb1944159e78d9c5c717a8720b8a1cb0b72446",
                "md5": "8c8ea1a8d9a677d60a38d41af290cdc2",
                "sha256": "a498c27ad2792f23deb51a5440a5fece13118400b4061419ad2f5dee102decc2"
            },
            "downloads": -1,
            "filename": "MongoFrames-1.3.7.tar.gz",
            "has_sig": false,
            "md5_digest": "8c8ea1a8d9a677d60a38d41af290cdc2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 31072,
            "upload_time": "2024-07-17T14:41:42",
            "upload_time_iso_8601": "2024-07-17T14:41:42.339768Z",
            "url": "https://files.pythonhosted.org/packages/8e/30/3b35ddce201117795062e6eb1944159e78d9c5c717a8720b8a1cb0b72446/MongoFrames-1.3.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-17 14:41:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GetmeUK",
    "github_project": "MongoFrames",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "mongoframes"
}
        
Elapsed time: 0.55937s