Metadata-Version: 2.1
Name: bottle-restx
Version: 1.0.1
Summary: A simple resource based REST API extension for the bottle framework
Home-page: https://github.com/bliepp/bottle-restx
Author: bliepp
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/bliepp/bottle-restx/issues
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# 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).

