Skip to main content
# Sanic OpenAPI

Real project in [https://github.com/huge-success/sanic-openapi](https://github.com/huge-success/sanic-openapi/blob/master/README.md)

This project just extends functional and fix some bugs ![Example Swagger UI](https://raw.githubusercontent.com/huge-success/sanic-openapi/master/images/code-to-ui.png “Swagger UI”)

#[Git Documentation](https://github.com/FerdinaKusumah/sanic_simple_swagger)

## Installation `shell pip install sanic-simple-swagger `

#### Add OpenAPI and Swagger UI: `python from sanic_simple_swagger import swagger_blueprint, openapi_blueprint app.blueprint(openapi_blueprint) app.blueprint(swagger_blueprint) `

You’ll now have a Swagger UI at the URL /swagger/index.html.

Your routes will be automatically categorized by their blueprints.

### Configure all the things

`python app.config['API_VERSION'] = '1.0.0' app.config['API_TITLE'] = 'Swagger Petstore' app.config['API_DESCRIPTION'] = 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.' app.config['API_TERMS_OF_SERVICE'] = 'http://swagger.io/terms/' app.config['API_CONTACT_EMAIL'] = 'http://swagger.io/terms/' app.config['API_LICENSE_NAME'] = 'Apache 2.0' app.config['API_LICENSE_URL'] = 'http://www.apache.org/licenses/LICENSE-2.0.html' app.config['schemes'] = ['http', 'https'] `

## Reference 1. [Sanic](https://github.com/huge-success/sanic) 2. [Sanic OpenAPI](https://github.com/huge-success/sanic-openapi)

Metadata

Release files for sanic-simple-swagger 0.1.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 sanic-simple-swagger 0.1.0
File Size Uploaded Provenance Actions
sanic-simple-swagger-0.1.0.tar.gz 2.3 MB Without provenance Details for sanic-simple-swagger-0.1.0.tar.gz

Release files / sanic-simple-swagger-0.1.0.tar.gz

Download URL sanic-simple-swagger-0.1.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
fa0d5bc81191bc7043972708db6e15aabfd783eaf42d3514a7ae2054d358b391
BLAKE2b-256 checksum
How to use checksums
89a8ca4bce23f361e1b839037dd6af34eaa4ad1f750f62b0395a244439c509d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15

Security for sanic-simple-swagger 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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