GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - webrpc/gen-python: ⚠️ Archived This repo is now archived and has been merged directly into the upstream webrpc repo. See: https://github.com/webrpc/webrpc/tree/master/gen/python

This repository was archived by the owner on Oct 15, 2026. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
_examples
_examples
 
 
README.md
README.md
 
 
client.go.tmpl
client.go.tmpl
 
 
embed.go
embed.go
 
 
errors.go.tmpl
errors.go.tmpl
 
 
fieldName.go.tmpl
fieldName.go.tmpl
 
 
fromValue.go.tmpl
fromValue.go.tmpl
 
 
go.mod
go.mod
 
 
help.go.tmpl
help.go.tmpl
 
 
helpers.go.tmpl
helpers.go.tmpl
 
 
main.go.tmpl
main.go.tmpl
 
 
methodReturn.go.tmpl
methodReturn.go.tmpl
 
 
pyName.go.tmpl
pyName.go.tmpl
 
 
server.go.tmpl
server.go.tmpl
 
 
toValue.go.tmpl
toValue.go.tmpl
 
 
type.go.tmpl
type.go.tmpl
 
 
types.go.tmpl
types.go.tmpl
 
 

Repository files navigation

⚠️ Archived

This repo is now archived and has been merged directly into the upstream webrpc repo.

See: https://github.com/webrpc/webrpc/tree/master/gen/python


gen-python

Python client + server generator for webrpc.

Emits stdlib @dataclass models (no runtime dependency for the types), an httpx client, and a framework-agnostic WSGI server.

Usage

webrpc-gen -schema=service.ridl -target=python -client -server -out=./api.py

Or pin this generator directly:

webrpc-gen -schema=service.ridl -target=github.com/webrpc/gen-python@VERSION -client -server -out=./api.py

Options

Option Default Description
-client off generate the httpx client
-server off generate the WSGI server + service Protocol
-schemaHash=false on omit the schema hash + version constants from the header

Output

  • Types — @dataclass with generated from_dict / to_dict. Enums become enum.Enum; aliases become type assignments.
  • Errors — a WebRPCError subclass per webrpc and schema error, plus a code registry for client-side reconstruction.
  • Client — one <Service>Client; methods are snake_case, return typed values, and raise the matching error on a non-2xx response.
  • Server — a <Service> typing.Protocol to implement, plus a <Service>Server WSGI app that routes, deserializes inputs, and serializes outputs.

Requires Python 3.9+. The client requires httpx.

Limitations (draft)

  • Enums serialize as their member-name string (matches gen-dart). Integer-valued enum wire interop with other generators is untested.
  • Alias-typed struct fields deserialize via the alias name; only scalar aliases are exercised in _examples.
  • No streaming support.

About

⚠️ Archived This repo is now archived and has been merged directly into the upstream webrpc repo. See: https://github.com/webrpc/webrpc/tree/master/gen/python

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.