Skip to main content

Auto-discover API schemas and generate type-safe clients in 6 languages

Project description

vclient — Auto-Generate API Clients

Auto-discover OpenAPI endpoints and generate type-safe client libraries in 6 languages instantly.

Features

Single Command:

vclient infer https://api.example.com

Generates:

  • 🐍 Python (httpx + Pydantic models)
  • 📘 TypeScript (Fetch API + Zod validation)
  • 🐹 Go (net/http)
  • 🦀 Rust (reqwest + serde)
  • Java (HttpClient)
  • 💎 Ruby (Faraday)

How It Works

  1. Discover — Probe API endpoints and extract OpenAPI specs
  2. Infer — Analyze responses → infer complete JSON schemas
  3. Cache — Store schemas, detect drift on next run
  4. Generate — Produce idiomatic clients for all 6 languages

Installation

# via PyPI
pip install vclient

# via Homebrew (after setup)
brew install yc-trails/vclient/vclient

Quick Start

# Infer schema from live API
vclient infer https://be.vyonica.com --max-endpoints 25 \
  --gen-python --gen-typescript --gen-go --gen-rust --gen-java --gen-ruby

# Generates: schema.json + client.py + client.ts + client.go + client.rs + Client.java + client.rb

Generate from Existing Schema

vclient codegen schema.json \
  --python client.py \
  --typescript client.ts \
  --go client.go \
  --rust client.rs \
  --java Client.java \
  --ruby client.rb

Architecture

vclient/
├── src/
│   ├── cli.py           # Command-line interface
│   ├── sampler.py       # Endpoint discovery + HTTP sampling
│   ├── inferrer.py      # Schema inference from responses
│   ├── codegen.py       # 6-language code generation
│   └── cache.py         # SQLite schema caching + drift detection
├── tests/               # 55+ unit tests
├── test-clients/        # Generated examples (153 Vyonica endpoints)
└── Formula/vclient.rb   # Homebrew formula

Testing

All generators tested on real-world APIs:

# Run test suite
pytest tests/ -v

# Test with Vyonica API (153 endpoints)
vclient infer https://be.vyonica.com --no-cache

What's Next

  • Windows binary (Windows Subsystem for Linux compatible)
  • Kotlin support (JVM ecosystem)
  • GraphQL support
  • API documentation generation

Made for: AI agents, SaaS integrators, enterprises calling legacy APIs without OpenAPI specs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vclient-0.2.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vclient-0.2.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file vclient-0.2.0.tar.gz.

File metadata

  • Download URL: vclient-0.2.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for vclient-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7747ce7847502abaaedf550ac515377b1c6c5630cc17186c2d60f71385f642ed
MD5 db16403fd9bebc7725eca98d635d551f
BLAKE2b-256 dd4f558e24175c241a5cb2d15ba7cdc8b383a72773b3bb14d51b737f84cf428e

See more details on using hashes here.

File details

Details for the file vclient-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vclient-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for vclient-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94e77e99f0fed7949a6f5b30a0b3445d2b5f9ed3f549f05b69318ae1eafb777d
MD5 bb327e5786765693792f4f9bf4c9afd5
BLAKE2b-256 11b51c325f78499a0d69e8668c0c77ccf81e67812456e21120df7629f77ec5f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page