A pyswagger wrapper for pythonic swagger client bindings. Exposes the API to python complete with tab-completion, documentation, and seamless programmatic access.
# stable
pip install https://github.com/soltanoff/PySwaggerClient/archive/v2.3.0.zip
# optional for openapi-3 version handling
npm install -g api-spec-converter
pip install --upgrade https://github.com/soltanoff/PySwaggerClient/archive/master.zip
from pyswaggerclient import SwaggerClient
client = SwaggerClient(
url='your_swagger_url',
headers={
'auth': 'whatever',
'if': 'necessary',
}
)
client.actions.your_op_id.call(your=params)
pip install -r requirements-dev.txt
api-spec-converter
is an optional npm dependency for openapi 3-spec conversions. You can get it with:
npm install -g api-spec-converter
flake8 - a Python tool that combines pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of Python code.
flake8 .
pylint - a static code analyzer for Python 2 or 3. It checks for errors, enforces coding standards, attempts to find issues in the code, and can suggest code refactoring options.
pylint pyswaggerclient
safety - a tool designed to check installed dependencies for known vulnerabilities.
echo 'Ignore 70612 / CVE-2019-8341, Jinja2 is a safety dep, not ours'
python -m safety check --ignore 70612