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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| osc_openapi_framework-0.0.1.tar.gz | 7.0 kB | Without provenance | Details for osc_openapi_framework-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| osc_openapi_framework-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for osc_openapi_framework-0.0.1-py3-none-any.whl |
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
|
Security for osc-openapi-framework 0.0.1
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.