bottle-restx-1.0.1
توضیحات
A simple resource based REST API extension for the bottle framework
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | bottle-restx-1.0.1 |
| نام | bottle-restx |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | bliepp |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/bliepp/bottle-restx |
| آدرس اینترنتی | https://pypi.org/project/bottle-restx/ |
| مجوز | - |
# Bottle RESTX
A simple resource based REST API extension for the bottle framework. Loosely inspired by flask-restx.
## Installation
**Via `pip`**
```bash
$ pip install bottle-restx
```
## Quickstart
The syntax is class based. Create an `API` object, which is a subclass of `bottle.Bottle`. For every resource add a subclass of the `Resource` class and decorate it with the `API.route` decorator. The route is passed to the method fitting the HTTP method.
```python
from bottle_restx import API, Resource
api = API()
@api.route("/my/route/<id>")
class MyResource(Resource):
def get(id):
...
def post(id):
...
def put(id):
...
def delete(id):
...
```
The individual methods are not mandatory. You might actually discard unwanted methods. By default they produce an 405 (Method not allowed).
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl bottle-restx-1.0.1:
pip install bottle-restx-1.0.1.whl
نصب پکیج tar.gz bottle-restx-1.0.1:
pip install bottle-restx-1.0.1.tar.gz