Skip to main content

OpenAPI v3 parser

Project description

OpenAPI Parser

A simple package to parse your OpenAPI 3 documents into Python object to work with.

How to install

To install package run the following command

pip install openapi3-parser

How to use

Example of parser usage

>>> from openapi_parser import parse
>>> content = parse('swagger.yml')
>>> print(content)

Supported specification schemas

  • Contact
  • License
  • Info
  • Server
  • ExternalDoc
  • Tag
  • Schema
  • Integer schema
  • Number schema
  • String schema
  • Array schema
  • Object schema
  • Property
  • Parameter
  • Header
  • Content
  • RequestBody
  • Response
  • Operation
  • PathItem
  • Path
  • Security
  • OAuthFlow
  • Specification

Features

  • OpenAPI's validation with openapi-spec-validator
  • Parsing all the sections into Python dataclass
  • Support many Enum values to simplify work with format, type, etc
  • Auto-resolve $ref links with Prance
  • Support custom x-* attributes
  • Support automatic merge allOf schemas into one while resolving
  • Support oneOf schemas
  • Support anyOf schemas
  • Support not schemas
  • Support Parameter serialization style
  • Support discriminator model types
  • Support additional properties in dataclasses (like example, style, explode, etc). See TODOs in code
  • Functions and methods documentation

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

openapi3-parser-0.0.3.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

openapi3_parser-0.0.3-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file openapi3-parser-0.0.3.tar.gz.

File metadata

  • Download URL: openapi3-parser-0.0.3.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.7

File hashes

Hashes for openapi3-parser-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c657c172ba0ebdaa9508af9f8f909bc74f0e7b96bff99721ad8702a253a01471
MD5 336264fd32e62bc1eb3f6370dc949947
BLAKE2b-256 4445ed05679ca42808b97dcd9bbd7de327913e07bc7b40cb1448221575cdf800

See more details on using hashes here.

File details

Details for the file openapi3_parser-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: openapi3_parser-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.7

File hashes

Hashes for openapi3_parser-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5ad6b6199728f500b9975ccaca92f27bcaa8f54bec429b787dbf98387b0d55a6
MD5 c2411a5d3d42edca316645eff8cfddff
BLAKE2b-256 29542725f5348cb9dc74f2ca4375d711d5e9e518cbb19513677bb479324dbe93

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