skillfed

spyne

A transport and architecture agnostic rpc library that focuses on exposing public services with a well-defined API.

spyne v2.14.0 232.7K downloads/30d#9,057 on PyPI
Copyleft license LGPL-2.1 Abandoned released

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 spyne

uv

uv add spyne

poetry

poetry add spyne

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic Content

Tags

soap rpc frameworkwsdl web servicerest api generatormulti-protocol rpcwsgi service frameworkxml json rpctwisted http service
soap-wsdlmulti-protocol-rpcabandoned

More Dynamic Content packages