--- id: fastspec version: "0.2.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # fastspec — Dynamic OpenAPI, Discovery, and GraphQL spec client for Python — turn any API spec into a fully-typed async client with attribute chaining, streaming, and file uploads License: permissive · Maintenance: active · Downloads: 10.3M/mo ## What it is and what it does fastspec is a client generator that reads OpenAPI (JSON/YAML) or Google Discovery API specifications and automatically builds a fully async Python client. Instead of hand-writing HTTP calls or maintaining generated code, you load a spec, instantiate a client with auth headers, and call endpoints using attribute chaining—the library handles parameter validation, serialization, streaming, and file uploads transparently. The package is built on fastcore and fasttransport, providing a lightweight async foundation. It's designed for developers who work with multiple APIs and want to avoid boilerplate; the same pattern works across any spec-compliant API. Operations are discovered at runtime and organized into logical groups, so you can explore available endpoints programmatically. Use it for: - Build a unified async client for LLM APIs without hand-writing request code. - Quickly prototype integrations with REST APIs using their published specs. - Stream responses from APIs that support streaming with a single flag. - Upload files to APIs while keeping the client code simple and type-aware. - Dynamically generate clients for internal or third-party APIs when specs are available. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts OpenAPI and Google Discovery API specs into fully async Python clients with attribute chaining, streaming, and file upload support. Yes, if you work with multiple spec-compliant APIs and want to eliminate boilerplate client code. The low install friction, active maintenance, permissive Apache-2.0 license, and no known vulnerabilities make it a safe choice. The async-first design and support for streaming and file uploads cover real API patterns. Start with it if you're building integrations with services that publish OpenAPI or Google Discovery specs. ## Install pip install fastspec uv add fastspec poetry add fastspec ## Installing fastspec Before you install: Low install friction with a pure Python wheel. Active maintenance with a recent release on 2026-08-13; the repository shows current activity. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions. Quickstart: pip install fastspec from fastspec.oapi import OpenAPIClient from fastspec.spec import SpecParser spec = SpecParser.from_openapi(spec_dict) client = OpenAPIClient(spec, headers={"Authorization": "Bearer token"}) # await client.resource.operation(...) Requires Python 3.10 or later; all calls are async and must be awaited. Verify before relying: - Whether the package handles all OpenAPI versions or has known compatibility gaps. - Performance characteristics when working with very large specs or many concurrent requests. - Quality of error messages and debugging experience when API calls fail. - How file uploads are handled across different API specs and content types. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 10.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags openapi client generator, api spec to python client, async api client from spec, google discovery client, dynamic api client builder, openapi python async, spec-driven http client, api-client, openapi, async [View on SkillFed](https://skillfed.io/packages/fastspec) · [View on PyPI](https://pypi.org/project/fastspec/)