{ "info": { "author": "James Ramm", "author_email": "jamessramm@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "=======\nPlume\n=======\n\n\n.. image:: https://img.shields.io/pypi/v/plume.svg\n :target: https://pypi.python.org/pypi/plume\n\n.. image:: https://img.shields.io/travis/JamesRamm/plume.svg\n :target: https://travis-ci.org/JamesRamm/plume\n\n.. image:: https://readthedocs.org/projects/plume/badge/?version=latest\n :target: https://plume.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://landscape.io/github/JamesRamm/plume/master/landscape.svg?style=flat\n :target: https://landscape.io/github/JamesRamm/plume/master\n :alt: Code Health\n\n.. image:: https://pyup.io/repos/github/JamesRamm/plume/shield.svg\n :target: https://pyup.io/repos/github/JamesRamm/plume/\n :alt: Updates\n\n\nA library to help you make Falcon web apps backed by MongoDB.\n\nFeatures\n---------------\n\n- Simple interface to MongoDB using ``marshmallow`` schemas. This allows a single document\n definition which also provides serialization and validation\n\n- Standard ``Resource`` classes for creating a full CRUD JSON API for REST collections and items.\n\n- Easy filtering/projection of documents per request\n\n- The ``FileCollection`` and ``FileItem`` resources provide file upload functionality. They can be configured\n to use plumes' basic ``FileStore`` or your own storage backend (e.g. GridFS)\n\n- Useful extra fields for marshmallow (``Choice``, ``Slug``, ``MongoId``, ``Password``...)\n\n\nExample\n--------\n\nThe following example creates a basic JSON API for a representation of a user.\n\n.. code-block:: python\n\n from datetime import datetime\n from plume import create_app, schema, Collection, Item\n from plume.connection import connect\n from plume.fields import Slug\n from marshmallow import fields, Schema\n\n class UserSchema(schema.MongoSchema):\n name = fields.Str(required=True)\n email = fields.Email(required=True)\n created = fields.DateTime(\n missing=lambda: datetime.utcnow().isoformat(),\n default=lambda: datetime.utcnow().isoformat()\n )\n profile = fields.Nested(\"ProfileSchema\")\n slug = Slug(populate_from='name')\n\n class ProfileSchema(Schema):\n \"\"\"Example of nesting a schema.\n In mongodb, this will be a nested document\n \"\"\"\n biography = fields.Str()\n profile_image = fields.Url(load_from='profileImage', dump_to='profileImage')\n\n\n def get_app(database_name='myapp')\n \"\"\"Creates the falcon app.\n We pass the database name so we can use a different db for testing\n \"\"\"\n # Connect to the database *before* making schema instance.\n # The ``connect`` function takes the same arguments as pymongo's\n # ``MongoClient``. Here we connect to localhost.\n connect(database_name)\n user = UserSchema()\n resources = (Collection(user, '/users'), Item(user, '/users/{email}'))\n return create_app(resources)\n\nName this file ``app.py`` and run it with gunicorn:\n\n gunicorn 'app:get_app()'\n\nDesign\n----------\n\nPlume intends to be a light and transparent library. It should compliment and enhance\nFalcon & MongoDB usage but not get in the way of custom development.\nTo this end I have a small number of rules:\n\n- No magic. Like falcon itself, it should be easy to follow inputs to outputs. To this end we have\n a few soft rules such as:\n - Avoid mixins. Mixins introduce implicit dependencies and make it harder to reason about code.\n - Don't mess with metaclasses and double underscore methods without good reason.\n There is often an easier, clearer way to achieve the same result.\n\n- No reinvention. We try to use well proven existing solutions before rolling our own. Hence the use\n of ``marshmallow`` for the ORM/serialization framework.\n\n- No hijacking. Plume is complimentary or an 'add-on' to Falcon. It does not replace direct usage of Falcon (what\n you might expect from a framework). It solves some common use cases and provides some useful tools. When you want to\n do something unsupported and go direct to falcon, it doesnt get in your way.\n\n\n\n\n\n\n=======\nHistory\n=======\n\n0.1.0 (2017-09-25)\n------------------\n\n* First release on PyPI.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/JamesRamm/plume", "keywords": "plume", "license": "GNU General Public License v3", "maintainer": "", "maintainer_email": "", "name": "plume", "package_url": "https://pypi.org/project/plume/", "platform": "", "project_url": "https://pypi.org/project/plume/", "project_urls": { "Homepage": "https://github.com/JamesRamm/plume" }, "release_url": "https://pypi.org/project/plume/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Easy webapps with falcon & mongodb", "version": "0.1.0" }, "last_serial": 3201883, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a037ab34d2915a69459e37f32b46bdad", "sha256": "3e2514fa46fd36aa5169a8e3c4cb3ebf06990068e70e49670170926ecf377484" }, "downloads": -1, "filename": "plume-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a037ab34d2915a69459e37f32b46bdad", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 15121, "upload_time": "2017-09-25T19:16:33", "url": "https://files.pythonhosted.org/packages/d1/c9/efa9d6db07c96f18c0937f32f8ef620698b6366242585e66c3c418258e85/plume-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6d0797b85f0d2a1d343f8b97bb3fd44", "sha256": "6516c6aa9062f950e0ed654fad89914c3d1cb73e755b3d68f22e6c872197158b" }, "downloads": -1, "filename": "plume-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c6d0797b85f0d2a1d343f8b97bb3fd44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33300, "upload_time": "2017-09-25T19:16:25", "url": "https://files.pythonhosted.org/packages/4b/12/1e4fc3ba1574a4c0615564d71f9a4983ebea761d580ffc096f286a846f27/plume-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a037ab34d2915a69459e37f32b46bdad", "sha256": "3e2514fa46fd36aa5169a8e3c4cb3ebf06990068e70e49670170926ecf377484" }, "downloads": -1, "filename": "plume-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a037ab34d2915a69459e37f32b46bdad", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 15121, "upload_time": "2017-09-25T19:16:33", "url": "https://files.pythonhosted.org/packages/d1/c9/efa9d6db07c96f18c0937f32f8ef620698b6366242585e66c3c418258e85/plume-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c6d0797b85f0d2a1d343f8b97bb3fd44", "sha256": "6516c6aa9062f950e0ed654fad89914c3d1cb73e755b3d68f22e6c872197158b" }, "downloads": -1, "filename": "plume-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c6d0797b85f0d2a1d343f8b97bb3fd44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33300, "upload_time": "2017-09-25T19:16:25", "url": "https://files.pythonhosted.org/packages/4b/12/1e4fc3ba1574a4c0615564d71f9a4983ebea761d580ffc096f286a846f27/plume-0.1.0.tar.gz" } ] }