Skip to main content

bottle-apispec

Simple plugin to easily enable integrate Bottle, APISpec and Marshmallow.

Example

from bottle import Bottle, run
from bottle_apispec import APISpecPlugin
from marshmallow import Schema
from marshmallow.fields import String

app = Bottle()


class MySchema(Schema):
    id = String()
    value = String()


@app.get('/')
def index():
    """API endpoint that return MySchema
    ---
    get:
        description: API endpoint that return MySchema
        responses:
            200:
                description: It works!!!!
                schema: MySchema
    """
    data, error = MySchema.load('id', 'value')
    return data


app.install(APISpecPlugin(
    title='Example API',
    version='1.0.0',
    openapi_version='2.0',
    scan_package='.')
)

run(app)

Metadata

Release files for bottle-apispec 0.9.0

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-apispec 0.9.0
File Size Uploaded
bottle-apispec-0.9.0.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bottle-apispec 0.9.0
File Interpreter ABI Platform
bottle_apispec-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / bottle-apispec-0.9.0.tar.gz

Download URL bottle-apispec-0.9.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a453eeaed2b16242de7d1278d79e7023524c9c86031d952ddb831e6ddfdfd1a7
BLAKE2b-256 checksum
How to use checksums
7468c64ec71e329aa32fa294a51d3197763b7901ea0b58603f443da475543fe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

Release files / bottle_apispec-0.9.0-py3-none-any.whl

Download URL bottle_apispec-0.9.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e5531f3bbb0223175ebbfc9c7c93cea5c3a1d86c21d946862ce9fe4db530313
BLAKE2b-256 checksum
How to use checksums
f93a75ecbd83ee2b73bd5203767ad260ff513d7810867af32e8e89eea0d05d49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.7.0

2 release files

0.6.5

2 release files

0.6.0

2 release files

0.5.5

2 release files

0.5.2

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