spyne
A transport and architecture agnostic rpc library that focuses on exposing public services with a well-defined API.
What it is and what it does
Spyne is a framework for defining RPC services once and exposing them over multiple protocols and transports without rewriting the service logic. It handles SOAP/WSDL generation, REST endpoints, JSON, MessagePack, and other serialization formats, integrating with WSGI, Twisted, Django, and other Python web stacks. The core idea is to let you define your service interface using Python decorators and type hints, then automatically generate the protocol-specific plumbing—WSDL documents, serializers, deserializers, and transport handlers.
The framework supports complex data models through SQLAlchemy integration, handles polymorphic types, manages relationships, and provides both synchronous and asynchronous execution paths. It has been in production use since 2012 and claims to support Python 2.7 and 3.6 through 3.10, though active development ceased around 2022. No runtime dependencies are required for basic use, though specific transports (Twisted, Django) and features (SQLAlchemy ORM mapping) require optional integration.
Use it for:
- Expose legacy business logic as both SOAP and REST endpoints without duplicating service code
- Generate WSDL contracts and client stubs for enterprise integration scenarios
- Build multi-protocol RPC services that serve SOAP clients, JSON REST clients, and MessagePack consumers from one codebase
- Integrate complex database models with automatic serialization and deserialization via SQLAlchemy
- Migrate SOAP-based systems to modern transports by keeping service definitions stable while swapping protocol handlers
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Spyne is a framework for building remote procedure call (RPC) services that can expose application logic over multiple protocols (SOAP, REST, JSON, MessagePack) and transports (HTTP, WSGI, Twisted, Django) with a single code definition.
No. Spyne is abandoned (1653 days without release) and carries high install friction. While it works with modern Python versions and has no known vulnerabilities, the lack of active maintenance means security patches, compatibility fixes, and feature updates are unlikely. For new projects, choose an actively maintained alternative like FastAPI, gRPC, or a dedicated SOAP library. For existing Spyne deployments, plan a migration path.
Install
spyne on PyPI
pip
pip install spyneuv
uv add spynepoetry
poetry add spyneInstalling spyne
Before you install
Installation friction is high. The package has been abandoned for 1653 days with no recent maintenance signal. While it supports modern Python versions through 3.10, the lack of active development means bug fixes and compatibility updates are unlikely.
License in practice
Spyne is licensed under LGPL-2.1 (copyleft). Any application linking or distributing this library must make its own source code available under compatible terms; proprietary closed-source projects should review licensing implications carefully.
Quickstart
pip install spyne
from spyne import Application, rpc, ServiceBase, Unicode
from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication
class HelloService(ServiceBase):
@rpc(Unicode, _returns=Unicode)
def hello(ctx, name):
return 'Hello ' + name
application = WsgiApplication([HelloService], tns='hello.example',
in_protocol=Soap11(validator='lxml'),
out_protocol=Soap11())
Requires a WSGI-compatible server or Twisted/Django integration to run; no zero-config standalone mode.
Verify before relying
- Current compatibility with SQLAlchemy 1.4+ and msgpack 1.x beyond what 2.14.0 changelog states
- Whether the DoS fix (GHSL-2021-115) addresses all known attack vectors in production use
- Level of community support and third-party maintenance given the project's abandoned status
Package facts
| License | LGPL-2.1 (copyleft) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,653 days since the last release |
| First released | |
| Downloads | 232,680/month — #9,057 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: spyne-2.14.0.tar.gz
Keywords: soap, wsdl, wsgi, zeromq, rest, rpc, json, http, msgpack, xml, django, pyramid, postgresql, sqlalchemy, twisted, yaml
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
suds-communityLightweight SOAP-based web service client that…
copyleft · top 5,000 on PyPI
suds-py3A lightweight SOAP client library for Python 3…
copyleft · top 5,000 on PyPI
WSMEWSME simplifies REST API development by letting…
permissive · top 15,000 on PyPI
python-jsonrpc-serverImplements a JSON RPC 2.0 server that handles…
unclear · top 15,000 on PyPI
sudsSuds is a lightweight SOAP client library that…
copyleft · top 15,000 on PyPI
crochetCrochet lets you call Twisted asynchronous code…
permissive · top 15,000 on PyPI
zeepZeep is a Python SOAP client that handles SOAP…
permissive · top 1,000 on PyPI
TwistedTwisted is an event-driven networking framework…
permissive · top 5,000 on PyPI
suds-jurkoProvides a lightweight SOAP client for calling…
copyleft · top 15,000 on PyPI
treqtreq is a high-level HTTP client library for…
permissive · top 15,000 on PyPI