the package provides enhanced support for writing REST APIs with Muffin_.
Project description
Muffin-REST – provides enhanced support for writing REST APIs with Muffin.
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;
Requirements
python >= 3.7
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
Create an API:
from muffin_rest import API
api = API()
Create endpoints and connect them to the API (example for sqlalchemy):
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:
from project.api import api
api.setup(app, prefix='/api/v1')
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
Development of Muffin-REST happens at: https://github.com/klen/muffin-rest
Contributors
klen (Kirill Klenov)
License
Licensed under a MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file muffin-rest-4.3.3.tar.gz
.
File metadata
- Download URL: muffin-rest-4.3.3.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 381885c7bcbba9a4a901fb239596493a2695ea40cbdc848c47e10d71fbcb42ab |
|
MD5 | d65ff1bba4b048e646eaa163627c355b |
|
BLAKE2b-256 | a2431a1eda7b82f42043ce82c447b5eb48994991cea8eb8e3cc3fadec1255e80 |
File details
Details for the file muffin_rest-4.3.3-py3-none-any.whl
.
File metadata
- Download URL: muffin_rest-4.3.3-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a8dfbc4cdb9568da06b7d7532795622dc0340c1a02b03d5715adfef71992614 |
|
MD5 | 8e0e360073b0a6aa256212e34e075450 |
|
BLAKE2b-256 | eb4fbf50ff2cb320800f77c7062a626fd2cb6def097081704551948927808bad |