skillfed

aiopenapi3

client and validator for OpenAPI3 3.0, OpenAPI 3.1, OpenAPI 3.2, Swagger 2.0

aiopenapi3 v0.10.0 333.9K downloads/30d#7,497 on PyPI20
Permissive license BSD-3-Clause Active released

What it is and what it does

aiopenapi3 is a Python client library that reads OpenAPI 3 and Swagger 2.0 specification documents, validates them using pydantic, and generates typed request and response models. It then provides both synchronous and asynchronous HTTP clients (via httpx) to call the described APIs with full type checking and validation. The library handles recursive schemas, format coercion (e.g., datetime parsing), and response header parsing.

You use it by loading a spec from a URL or file, then calling endpoints by operation ID with parameters that are automatically validated against the schema. The library supports both blocking and asyncio-based async calls, includes a plugin interface for adapting non-compliant services, and can download dependent specification documents. It's currently in Alpha status but actively maintained, with no known security vulnerabilities.

Use it for:

  • Generate a type-safe Python client from a published OpenAPI spec without hand-writing request/response classes.
  • Validate incoming API requests and responses against an OpenAPI schema in a test suite or integration layer.
  • Build async microservice clients that automatically parse and coerce response bodies according to the spec.
  • Adapt third-party APIs with non-standard OpenAPI documents using the plugin interface.
  • Consume Swagger 2.0 or OpenAPI 3.x specs in a single codebase with automatic format handling.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses and validates OpenAPI 3 specifications (3.0.3, 3.1.0, 3.2.0) and Swagger 2.0 documents, then generates typed request/response models and provides both sync and async HTTP clients to call the described APIs.

Yes, if you need to work with OpenAPI or Swagger specs in Python. Low install friction, active maintenance, no vulnerabilities, and permissive licensing make it a safe choice. The Alpha status is worth noting—it's suitable for production use but may see API changes; check the docs for stability guarantees. The 10 runtime dependencies are well-established (pydantic, httpx, PyYAML, etc.), so dependency risk is low.

Install

aiopenapi3 on PyPI

pip

pip install aiopenapi3

uv

uv add aiopenapi3

poetry

poetry add aiopenapi3

Installing aiopenapi3

Before you install

Low friction: pure Python wheel with no compiled dependencies. Active maintenance (last commit 2026-08-11) and no known vulnerabilities. Requires Python 3.10 or later.

License in practice

BSD-3-Clause (permissive): you may use, modify, and distribute this package freely in commercial and private projects, provided you retain the license notice.

Quickstart

pip install aiopenapi3

import aiopenapi3

# Load and validate an OpenAPI spec
spec = aiopenapi3.OpenAPI.load_sync('https://example.com/openapi.json')

# Call an endpoint with typed validation
response = spec.call_sync('operationId', param=value)

Requires Python 3.10 or later; async usage requires an asyncio event loop.

Verify before relying

  • Whether the 'sad smiley ._. interface' for method/argument access is stable or experimental.
  • Performance characteristics when validating large or deeply nested OpenAPI documents.
  • Support for OpenAPI extensions and vendor-specific fields beyond the core spec.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 10 — PyYaml, pydantic, email-validator, yarl, httpx, more-itertools, typing_extensions, jmespath, ijson, jsonseq
Maintenance actively maintained — 105 days since the last release
Last repo commit
First released
Downloads 333,861/month — #7,497 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiopenapi3-0.10.0-py3-none-any.whl

Development Status :: 3 - AlphaEnvironment :: Web EnvironmentFramework :: AsyncIOIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: InternetTopic :: Internet :: WWW/HTTPTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

openapi 3 clientswagger 2.0 validatorasync api client generatoropenapi specification parsertyped http client from openapipydantic openapi validationasyncio http client
openapi-clientasync-httpapi-validation

More Software Development packages