muffin-rest


Namemuffin-rest JSON
Version 9.1.1 PyPI version JSON
download
home_pagehttps://github.com/klen/muffin-rest
SummaryThe package provides enhanced support for writing REST APIs with Muffin framework
upload_time2024-11-01 12:06:08
maintainerNone
docs_urlNone
authorKirill Klenov
requires_python<4.0,>=3.9
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.9

.. 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": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "rest, api, muffin, asgi, asyncio, trio",
    "author": "Kirill Klenov",
    "author_email": "horneds@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cf/89/cac6b6b8bdc5a56315485952d44b004d80b5bd019b4140d43c1fbd32649e/muffin_rest-9.1.1.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.9\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": "9.1.1",
    "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": "6a44bf3f40446b611282a6ef1538034e84852125e9747cf2bcaa47235c7ea57b",
                "md5": "bb4f883f297719aaf03622a7816f1c04",
                "sha256": "98e2ea58acf93c56a82b9c4eaa7742df512f223d809da38ac42824fc3d85b09b"
            },
            "downloads": -1,
            "filename": "muffin_rest-9.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bb4f883f297719aaf03622a7816f1c04",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 36416,
            "upload_time": "2024-11-01T12:06:06",
            "upload_time_iso_8601": "2024-11-01T12:06:06.566124Z",
            "url": "https://files.pythonhosted.org/packages/6a/44/bf3f40446b611282a6ef1538034e84852125e9747cf2bcaa47235c7ea57b/muffin_rest-9.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cf89cac6b6b8bdc5a56315485952d44b004d80b5bd019b4140d43c1fbd32649e",
                "md5": "97549ba93b560a0184a6274fbf6ab3cb",
                "sha256": "3e68e60849aefaf6ea2ffe160955e2f31d66f0af6de4cb5667b7ebc30db57748"
            },
            "downloads": -1,
            "filename": "muffin_rest-9.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "97549ba93b560a0184a6274fbf6ab3cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 25392,
            "upload_time": "2024-11-01T12:06:08",
            "upload_time_iso_8601": "2024-11-01T12:06:08.646246Z",
            "url": "https://files.pythonhosted.org/packages/cf/89/cac6b6b8bdc5a56315485952d44b004d80b5bd019b4140d43c1fbd32649e/muffin_rest-9.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-01 12:06:08",
    "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: 1.49602s