muffin-rest


Namemuffin-rest JSON
Version 7.3.2 PyPI version JSON
download
home_pagehttps://github.com/klen/muffin-rest
SummaryThe package provides enhanced support for writing REST APIs with Muffin framework
upload_time2023-10-17 13:03:58
maintainer
docs_urlNone
authorKirill Klenov
requires_python>=3.8,<4.0
licenseMIT
keywords rest api muffin asgi asyncio trio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Muffin-REST
###########

.. _description:

**Muffin-REST** -- provides enhanced support for writing REST APIs with Muffin_.


.. _badges:

.. image:: https://github.com/klen/muffin-rest/workflows/tests/badge.svg
    :target: https://github.com/klen/muffin-rest/actions
    :alt: Tests Status

.. image:: https://img.shields.io/pypi/v/muffin-rest
    :target: https://pypi.org/project/muffin-rest/
    :alt: PYPI Version

.. image:: https://img.shields.io/pypi/pyversions/muffin-rest
    :target: https://pypi.org/project/muffin-rest/
    :alt: Python Versions

----------

.. _features:

Features
--------

- API class to simplify the creation of REST APIs;
- Automatic filtering and sorting for resources;
- Support for `Peewee ORM`_, Mongo_, `SQLAlchemy Core`_;
- Auto documentation with Swagger_;

.. _contents:

.. contents::

.. _requirements:

Requirements
=============

- python >= 3.7

.. note:: Trio is only supported with Peewee ORM

.. _installation:

Installation
=============

**Muffin-REST** should be installed using pip: ::

    pip install muffin-rest

With `SQLAlchemy Core`_ support: ::

    pip install muffin-rest[sqlalchemy]

With `Peewee ORM`_ support: ::

    pip install muffin-rest[peewee]

With YAML support for autodocumentation: ::

    pip install muffin-rest[yaml]

.. _usage:

Usage
=====

Create an API:

.. code-block:: python

   from muffin_rest import API

   api = API()

Create endpoints and connect them to the API (example for sqlalchemy):

.. code-block:: python

   from muffin_rest.sqlalchemy import SAEndpoint
   from project.api import api

   @api.route
   class MyEndpoint(SAEndpoint):

        class Meta:
            table = MyTable
            database = db

Connect it to your Muffin_ application:

.. code-block:: python

   from project.api import api

   api.setup(app, prefix='/api/v1')


.. _bugtracker:

Bug tracker
===========

If you have any suggestions, bug reports or
annoyances please report them to the issue tracker
at https://github.com/klen/muffin-rest/issues

.. _contributing:

Contributing
============

Development of Muffin-REST happens at: https://github.com/klen/muffin-rest


Contributors
=============

* klen_ (Kirill Klenov)

.. _license:

License
========

Licensed under a `MIT license`_.

.. _links:

.. _klen: https://github.com/klen
.. _Muffin: https://github.com/klen/muffin
.. _Swagger: https://swagger.io/tools/swagger-ui/
.. _Mongo: https://www.mongodb.com/
.. _Peewee ORM: http://docs.peewee-orm.com/en/latest/
.. _SqlAlchemy Core: https://docs.sqlalchemy.org/en/14/core/

.. _MIT license: http://opensource.org/licenses/MIT

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/klen/muffin-rest",
    "name": "muffin-rest",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "rest,api,muffin,asgi,asyncio,trio",
    "author": "Kirill Klenov",
    "author_email": "horneds@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f6/1f/01ede7c7b2af7df640093597b25d31251bc8bbc30349814372b82e79671f/muffin_rest-7.3.2.tar.gz",
    "platform": null,
    "description": "Muffin-REST\n###########\n\n.. _description:\n\n**Muffin-REST** -- provides enhanced support for writing REST APIs with Muffin_.\n\n\n.. _badges:\n\n.. image:: https://github.com/klen/muffin-rest/workflows/tests/badge.svg\n    :target: https://github.com/klen/muffin-rest/actions\n    :alt: Tests Status\n\n.. image:: https://img.shields.io/pypi/v/muffin-rest\n    :target: https://pypi.org/project/muffin-rest/\n    :alt: PYPI Version\n\n.. image:: https://img.shields.io/pypi/pyversions/muffin-rest\n    :target: https://pypi.org/project/muffin-rest/\n    :alt: Python Versions\n\n----------\n\n.. _features:\n\nFeatures\n--------\n\n- API class to simplify the creation of REST APIs;\n- Automatic filtering and sorting for resources;\n- Support for `Peewee ORM`_, Mongo_, `SQLAlchemy Core`_;\n- Auto documentation with Swagger_;\n\n.. _contents:\n\n.. contents::\n\n.. _requirements:\n\nRequirements\n=============\n\n- python >= 3.7\n\n.. note:: Trio is only supported with Peewee ORM\n\n.. _installation:\n\nInstallation\n=============\n\n**Muffin-REST** should be installed using pip: ::\n\n    pip install muffin-rest\n\nWith `SQLAlchemy Core`_ support: ::\n\n    pip install muffin-rest[sqlalchemy]\n\nWith `Peewee ORM`_ support: ::\n\n    pip install muffin-rest[peewee]\n\nWith YAML support for autodocumentation: ::\n\n    pip install muffin-rest[yaml]\n\n.. _usage:\n\nUsage\n=====\n\nCreate an API:\n\n.. code-block:: python\n\n   from muffin_rest import API\n\n   api = API()\n\nCreate endpoints and connect them to the API (example for sqlalchemy):\n\n.. code-block:: python\n\n   from muffin_rest.sqlalchemy import SAEndpoint\n   from project.api import api\n\n   @api.route\n   class MyEndpoint(SAEndpoint):\n\n        class Meta:\n            table = MyTable\n            database = db\n\nConnect it to your Muffin_ application:\n\n.. code-block:: python\n\n   from project.api import api\n\n   api.setup(app, prefix='/api/v1')\n\n\n.. _bugtracker:\n\nBug tracker\n===========\n\nIf you have any suggestions, bug reports or\nannoyances please report them to the issue tracker\nat https://github.com/klen/muffin-rest/issues\n\n.. _contributing:\n\nContributing\n============\n\nDevelopment of Muffin-REST happens at: https://github.com/klen/muffin-rest\n\n\nContributors\n=============\n\n* klen_ (Kirill Klenov)\n\n.. _license:\n\nLicense\n========\n\nLicensed under a `MIT license`_.\n\n.. _links:\n\n.. _klen: https://github.com/klen\n.. _Muffin: https://github.com/klen/muffin\n.. _Swagger: https://swagger.io/tools/swagger-ui/\n.. _Mongo: https://www.mongodb.com/\n.. _Peewee ORM: http://docs.peewee-orm.com/en/latest/\n.. _SqlAlchemy Core: https://docs.sqlalchemy.org/en/14/core/\n\n.. _MIT license: http://opensource.org/licenses/MIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The package provides enhanced support for writing REST APIs with Muffin framework",
    "version": "7.3.2",
    "project_urls": {
        "Homepage": "https://github.com/klen/muffin-rest",
        "Repository": "https://github.com/klen/muffin-rest"
    },
    "split_keywords": [
        "rest",
        "api",
        "muffin",
        "asgi",
        "asyncio",
        "trio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a154d9149cbd9d36b77ecec824bb0162574ff064dad76b294e6e9af0cb4dd84",
                "md5": "8d9a59df911f60c26e7c719c1a0e36e2",
                "sha256": "8f20a7f4153ea4d62802fa056afad9b0a10e6c6d7dd02113a9d50c1488f4ceb5"
            },
            "downloads": -1,
            "filename": "muffin_rest-7.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8d9a59df911f60c26e7c719c1a0e36e2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 35206,
            "upload_time": "2023-10-17T13:03:57",
            "upload_time_iso_8601": "2023-10-17T13:03:57.058183Z",
            "url": "https://files.pythonhosted.org/packages/6a/15/4d9149cbd9d36b77ecec824bb0162574ff064dad76b294e6e9af0cb4dd84/muffin_rest-7.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f61f01ede7c7b2af7df640093597b25d31251bc8bbc30349814372b82e79671f",
                "md5": "81fa95ee3af16290981f15b02a8f6f9b",
                "sha256": "1edb0c2e4145503df39c4c6027421e775ff4155ed6391c2a8bd12c7564b77cc8"
            },
            "downloads": -1,
            "filename": "muffin_rest-7.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "81fa95ee3af16290981f15b02a8f6f9b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 24725,
            "upload_time": "2023-10-17T13:03:58",
            "upload_time_iso_8601": "2023-10-17T13:03:58.480609Z",
            "url": "https://files.pythonhosted.org/packages/f6/1f/01ede7c7b2af7df640093597b25d31251bc8bbc30349814372b82e79671f/muffin_rest-7.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-17 13:03:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "klen",
    "github_project": "muffin-rest",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "muffin-rest"
}
        
Elapsed time: 0.14481s