A simple resource based REST API extension for the bottle framework
Project description
Bottle RESTX
A simple resource based REST API extension for the bottle framework. Loosely inspired by flask-restx.
Installation
Via pip
$ 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.
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).
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bottle-restx-1.0.1.tar.gz.
File metadata
- Download URL: bottle-restx-1.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1996828318b8992bdc78d7efd7b65a666f8ea8a24eec13660d2ee4c598444728
|
|
| MD5 |
c38378251e3af7d81dfe2591853f488e
|
|
| BLAKE2b-256 |
c349178eb47782a0c4ffa9e7cb8521f325e759a783ded3ebfb64f58e83c3f971
|
File details
Details for the file bottle_restx-1.0.1-py3-none-any.whl.
File metadata
- Download URL: bottle_restx-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4abd06468bd51baa1b040191d7ae073a57137ab3f73123eb7bcafcfbc8e0976
|
|
| MD5 |
22105f88b8bcaa01e002ea574dfa6ea8
|
|
| BLAKE2b-256 |
736b098d04bc02a85087fc338ae0635db042c1d57c050027edf81f415d90cdb7
|