Skip to main content

OpenAPI v3 Tools

Build Status PyPI PyPI

OpenAPI v3 object model and helpers.

Installation

pip install openapitools

Usage

from openapitools import SpecificationBuilder, ComponentsBuilder, OperationBuilder, Schema


class Todo:
    id: int
    text: str
    done: False


components = ComponentsBuilder()
components.scheme(Todo.__name__, Schema.make(Todo))

builder = SpecificationBuilder(components)
builder.describe('TODO REST API', '1.0')
builder.license('MIT')
builder.contact('John Doe', 'https://example.com', 'john-doe@example.com')

get_todo = OperationBuilder()
get_todo.parameter('id', int, 'path')
get_todo.describe('Get todo by ID')
get_todo.tag('todo')
get_todo.response(200, Todo)

builder.operation('/todo/{id}', 'GET', get_todo)

print(builder.build())

Metadata

Release files for openapitools 0.0.2

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

Source distribution (sdist)

Source distribution for openapitools 0.0.2
File Size Uploaded Provenance
openapitools-0.0.2.tar.gz 6.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openapitools 0.0.2
File Interpreter ABI Platform
openapitools-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.3 kB

Release files / openapitools-0.0.2.tar.gz

Download URL openapitools-0.0.2.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0c4c5b163e72c4a9e9ac823ac151b7681a4081fde0477e7872dc5ab783b2585a
BLAKE2b-256 checksum
How to use checksums
6f7725bd0dfddc40eb461044761b5c28535faa7d4375b3aaf61570d116a9a24c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / openapitools-0.0.2-py3-none-any.whl

Download URL openapitools-0.0.2-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c96aadf021e4fde7d2cbf1be57ff7aa29ad3ce80d8537564126288ae36b7c7e1
BLAKE2b-256 checksum
How to use checksums
9629bd66c45e4be70954a0fac2048576f24f4f6e530f65e425ae5221fc583e57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for openapitools 0.0.2

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.0.2 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