Skip to main content

Swagger extension for Eve powered RESTful APIs

Project description

Swagger extension for Eve powered RESTful APIs.

Usage

from eve import Eve
from eve_swagger import swagger

app = Eve()
app.register_blueprint(swagger)

# required. See http://swagger.io/specification/#infoObject for details.
app.config['SWAGGER_INFO'] = {
    'title': 'My Supercool API',
    'version': '1.0',
    'description': 'an API description',
    'termsOfService': 'my terms of service',
    'contact': {
        'name': 'nicola',
        'url': 'http://nicolaiarocci.com'
    },
    'license': {
        'name': 'BSD',
        'url': 'https://github.com/nicolaiarocci/eve-swagger/blob/master/LICENSE',
    }
},

# optional. Will use flask.request.host if missing.
app.config['SWAGGER_HOST'] = 'myhost.com'

if __name__ == '__main__':
    app.run()

When API is up and running, visit the /api-docs endpoint. The resulting JSON can then be used with swagger tooling, like the Swagger Editor:

resources/swagger_editor.png

Installation

$ pip install eve-swagger

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Eve-Swagger-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file Eve-Swagger-0.0.2.tar.gz.

File metadata

File hashes

Hashes for Eve-Swagger-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e6d1f109b089c8a2749767aeb003f777190ecc92a87b9dededfda480865c8a1c
MD5 ca43d2fdd92498bf44aa85028a568de3
BLAKE2b-256 eb8d0b7723f16fab6d55ed231778fb9a1f0a70403253c5bf4c5e24e968b45761

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page