Skip to main content

Swagger codegen for Python

Installation

pip install swagger-codegen

Usage example

# Generate Petstore Api client using 'petstore' package name.
swagger_codegen generate http://petstore.swagger.io:8080/api/v3/openapi.json petstore

python

Python 3.8.1 (default, Jan 23 2020, 13:58:52) 
[Clang 11.0.0 (clang-1100.0.33.16)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> from petstore import new_client, Configuration
>>> from swagger_codegen.api.adapter.requests import RequestsAdapter
>>> from petstore.apis.user.createUser import User
>>> client = new_client(RequestsAdapter(), Configuration(host="http://petstore.swagger.io:8080"))
>>> print(client.user.createUser(User(id=1, username="Swagger-Codegen")))
id=1 username='Swagger-Codegen' firstName=None lastName=None email=None password=None phone=None userStatus=0

You can see example source code for PetStore Api in example directory of a project.

Work in progress

Though library gives nice results for generated API, it is still in development. Some tests are missing. API is a subject to change until stable release.

Anyway backward compatibility will be kept as most as possible.

Metadata

Release files for swagger-codegen 0.1.7

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

Source distribution (sdist)

Source distribution for swagger-codegen 0.1.7
File Size Uploaded Provenance Actions
swagger-codegen-0.1.7.tar.gz 14.5 kB Without provenance Details for swagger-codegen-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swagger-codegen 0.1.7
File Interpreter ABI Platform Actions
swagger_codegen-0.1.7-py3-none-any.whl Python 3 none any Details for swagger_codegen-0.1.7-py3-none-any.whl

Total release size: 38.2 kB

Release files / swagger-codegen-0.1.7.tar.gz

Download URL swagger-codegen-0.1.7.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8b8d784b7a4168deb3bbfc04818da94c8923c95c29e41b449ecf39bd666de73c
BLAKE2b-256 checksum
How to use checksums
e7d9c13e3cc54287e9e2df7406f1e193313f51060242c90eed6a05877b985f3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.1 Darwin/19.4.0

Release files / swagger_codegen-0.1.7-py3-none-any.whl

Download URL swagger_codegen-0.1.7-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
619454047a405062aea40b6c04f574ffa78a2540857999f598f95ff3ad24ab61
BLAKE2b-256 checksum
How to use checksums
08ae5743d8135741f1826c53cbda63c31a1d3e78ede7419276837fea26264b6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.1 Darwin/19.4.0

Security for swagger-codegen 0.1.7

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.

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files No provenance

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