Skip to main content

OSC OpenAPI Framework

Build and parse OpenAPI data using its own structured python object.

Features

  • Build OpenAPI data from structured object
  • Parse OpenAPI data to structured object

Installation

You can install the pre-built python package through this command:

$ pip install osc-openapi-framework

Building

To build the package yourself:

$ make package

You can then install it with:

$ pip install dist/osc_openapi_framework-*.whl

Usage

Parsing OpenAPI Data

from osc_openapi_framework.openapi.parser import parse as openapi_parse

openapi_data = '''
    openapi: 3.0.0
    info:
      title: Sample API
      description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
      version: 0.1.9
    security:
      - ApiKeyAuth: []
    servers:
      - url: http://api.example.com/v1
        description: Optional server description, e.g. Main (production) server
      - url: http://staging-api.example.com
        description: Optional server description, e.g. Internal staging server for testing
    paths:
      /users:
        get:
          summary: Returns a list of users.
          description: Optional extended description in CommonMark or HTML.
          responses:
            '200':    # status code
              description: A JSON array of user names
              content:
                application/json:
                  schema: 
                    type: array
                    items: 
                      type: string
'''
with open('/tmp/openapi_test', 'w') as fd:
  fd.write(openapi_data)
oapi = openapi_parse('/tmp/openapi_test')

License

Copyright Outscale SAS

BSD-3-Clause

This project is compliant with REUSE.

Metadata

Release files for osc-openapi-framework 0.0.1

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

Source distribution (sdist)

Source distribution for osc-openapi-framework 0.0.1
File Size Uploaded
osc_openapi_framework-0.0.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for osc-openapi-framework 0.0.1
File Interpreter ABI Platform
osc_openapi_framework-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / osc_openapi_framework-0.0.1.tar.gz

Download URL osc_openapi_framework-0.0.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0c12fa2eb7d83b3eff3ee0f175dcdad8a2faff681ed4627b815c86c307e2731c
BLAKE2b-256 checksum
How to use checksums
fa733a2dddcddef967bc17bbb090a6c366c19487093b790f4c6ed5d20aec89dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

Release files / osc_openapi_framework-0.0.1-py3-none-any.whl

Download URL osc_openapi_framework-0.0.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
558c0f1637b8d044b6be15156ef5663d75687c51c692eb038e8729280dca8429
BLAKE2b-256 checksum
How to use checksums
89f7ce91c0f830dda467b06c05a732425a9ac10c359a5ae93ff634ffa3cea383
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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