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/54/0c/cd69faaf11c8548e6719729873220bb86f69b1a005325e0b5ebb54946e38/muffin_rest-9.4.0.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.4.0",
"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": "0faea1532cbbaa3cd6823e6e358c8a95e0dde524b0b75d456a3b011f64c31d98",
"md5": "d913e5913e2ca42946bf69f1750a445d",
"sha256": "c73fb92660c8f58e57bb46f5ee4f47e73067a29bc702de4c92ac8d1fba513079"
},
"downloads": -1,
"filename": "muffin_rest-9.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d913e5913e2ca42946bf69f1750a445d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 36498,
"upload_time": "2024-11-25T09:25:50",
"upload_time_iso_8601": "2024-11-25T09:25:50.491703Z",
"url": "https://files.pythonhosted.org/packages/0f/ae/a1532cbbaa3cd6823e6e358c8a95e0dde524b0b75d456a3b011f64c31d98/muffin_rest-9.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "540ccd69faaf11c8548e6719729873220bb86f69b1a005325e0b5ebb54946e38",
"md5": "8d8afea06f186a15d2288278307dae13",
"sha256": "5643fa52ba75cfeb104383fc1d501514d05791a730198ca3fe28a2ddb2c2ab28"
},
"downloads": -1,
"filename": "muffin_rest-9.4.0.tar.gz",
"has_sig": false,
"md5_digest": "8d8afea06f186a15d2288278307dae13",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 25513,
"upload_time": "2024-11-25T09:25:52",
"upload_time_iso_8601": "2024-11-25T09:25:52.166542Z",
"url": "https://files.pythonhosted.org/packages/54/0c/cd69faaf11c8548e6719729873220bb86f69b1a005325e0b5ebb54946e38/muffin_rest-9.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-25 09:25:52",
"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"
}