--- id: twirp version: "0.0.7" license: unclear license_treatment: unclear maintenance: abandoned --- # twirp — Twirp server and client lib License: unclear · Maintenance: abandoned · Downloads: 1.1M/mo ## What it is and what it does Twirp is a Python RPC framework that lets you define services in protobuf and automatically generate both server and client code. It implements the Twirp Wire Protocol v7, which is a lightweight alternative to gRPC that works over HTTP. The package provides an ASGI-compatible server wrapper (TwirpASGIApp) that you can run with uvicorn, plus client stubs that speak the Twirp protocol to remote services. You define your service interface in a .proto file, run the protoc compiler with the twirpy plugin to generate Python code, then implement your service logic by subclassing the generated server class. The framework handles serialization, HTTP routing, and error handling. It depends on requests for HTTP calls, structlog for logging, and protobuf for message encoding. Use it for: - Build microservices that communicate via Twirp RPC instead of REST or gRPC. - Generate type-safe client and server stubs from protobuf definitions with minimal boilerplate. - Migrate from Twirp services in other languages to Python. - Create lightweight RPC services that run on standard ASGI servers like uvicorn. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Twirp is a Python implementation of the Twirp RPC framework that generates server and client code from protobuf definitions, supporting Twirp Wire Protocol v7. No—the package is abandoned (last release 2022-04-24) with no active maintenance. License status is unclear, and there is no guarantee of compatibility with current Python or protobuf versions. Use only if you are maintaining legacy code already using this package. ## Install pip install twirp uv add twirp poetry add twirp ## Installing twirp Before you install: Low install friction with a pure-Python wheel. However, the package is abandoned—last release was 2022-04-24, over 1573 days ago. No recent maintenance or security updates are expected. License in practice: License status is unclear; no SPDX identifier or raw license text is provided. Verify the actual license terms before using in a commercial or proprietary project. Quickstart: pip install twirp from twirp.asgi import TwirpASGIApp from twirp.exceptions import InvalidArgument class MyService: def MyMethod(self, context, request): return response service_instance = MyService() app = TwirpASGIApp() app.add_service(service_instance) Requires the protoc compiler and the protoc-gen-twirpy plugin (installed via Go). Also requires uvicorn to run the server. Verify before relying: - Whether the protoc-gen-twirpy plugin is still available and functional. - Current compatibility with modern Python versions and protobuf library versions. - Whether abandoned status affects stability or security for production use. ## Package facts - License: not declared (unclear) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags twirp rpc framework python, protobuf rpc server client, twirp protocol v7 implementation, asgi rpc framework, twirp code generation, rpc-framework, protobuf, asgi [View on SkillFed](https://skillfed.io/packages/twirp) · [View on PyPI](https://pypi.org/project/twirp/)