python

package
v0.0.0-...-8df018f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package python implements the `sovgen python` subcommand. It hits a running gateway's /rpc/_introspect, walks the catalog, and emits a single Python file: SovError + SovClient runtime + one @dataclass per named Go type + one class per router with one typed method per RPC.

Generated code targets:

  • httpx (pip install httpx) — sync client used by SovClient
  • dataclasses (stdlib) — request/response shapes
  • typing (stdlib) — Optional/Any

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Emit

func Emit(w io.Writer, pkg string, report *gateway.IntrospectReport)

Emit writes the Python client for report into w using pkg as the module label in the header docstring. Exposed so `sov gen all` can drive every emitter directly without reparsing argv or shelling out.

func Run

func Run(argv []string, stdout, stderr io.Writer) int

Run executes the python subcommand. Thin wrapper over the shared catalog.RunEmitter scaffolding; only Emit is python-specific.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL