Skip to main content

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

Metadata

Release files for bottle-restx 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bottle-restx 1.0.1
File Size Uploaded
bottle-restx-1.0.1.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bottle-restx 1.0.1
File Interpreter ABI Platform
bottle_restx-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.8 kB

Release files / bottle-restx-1.0.1.tar.gz

Download URL bottle-restx-1.0.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1996828318b8992bdc78d7efd7b65a666f8ea8a24eec13660d2ee4c598444728
BLAKE2b-256 checksum
How to use checksums
c349178eb47782a0c4ffa9e7cb8521f325e759a783ded3ebfb64f58e83c3f971
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / bottle_restx-1.0.1-py3-none-any.whl

Download URL bottle_restx-1.0.1-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4abd06468bd51baa1b040191d7ae073a57137ab3f73123eb7bcafcfbc8e0976
BLAKE2b-256 checksum
How to use checksums
736b098d04bc02a85087fc338ae0635db042c1d57c050027edf81f415d90cdb7
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page