skillfed

WSME

Simplify the writing of REST APIs, and extend them with additional protocols.

wsme v0.13.0 107.0K downloads/30d#12,633 on PyPI
Permissive license MIT Active released

What it is and what it does

WSME is a REST API framework that removes boilerplate by letting you define web service methods with Python type annotations instead of manually parsing requests and serializing responses. You decorate functions with `@expose()` to declare parameter and return types, then WSME automatically handles protocol conversion, validation, and documentation. It works standalone as a WSGI application or integrates into existing frameworks like Flask or Pecan, supporting multiple protocols (REST+JSON, REST+XML) and generating Sphinx documentation from your type definitions.

The package is lightweight—just four runtime dependencies—and framework-agnostic, so you can use it with your preferred routing layer while delegating type handling and serialization to WSME. It's particularly useful when you want clean, self-documenting APIs without writing separate request/response parsing code.

Use it for:

  • Build a REST API with automatic JSON and XML endpoint variants from a single typed method definition.
  • Generate Sphinx documentation for your REST API directly from your WSME type annotations and docstrings.
  • Add type validation and multi-protocol support to an existing WSGI or Flask application without rewriting routing.
  • Create a microservice that exposes the same business logic over REST+JSON and REST+XML simultaneously.
  • Prototype a REST API quickly by focusing on business logic while WSME handles serialization and validation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

WSME simplifies REST API development by letting you define web service methods with type annotations, then automatically handles request parsing, response serialization, and protocol conversion across REST+JSON, REST+XML, and other formats.

Yes, if you're building a REST API in Python and want automatic type validation, multi-protocol support, and self-documenting endpoints without framework lock-in. The low dependency count and permissive license make it a lightweight choice. Verify that the project's maintenance level suits your needs—it's marked active but repository metadata is unavailable, so check the OpenDev repository directly if long-term support is critical.

Install

wsme on PyPI

pip

pip install wsme

uv

uv add wsme

poetry

poetry add wsme

Installing WSME

Before you install

Low install friction: pure Python wheel with only four runtime dependencies (WebOb, simplegeneric, netaddr, importlib_metadata). Actively maintained as of 32 days ago and marked active.

License in practice

MIT license (permissive) — you can use, modify, and distribute WSME freely in commercial and private projects with minimal restrictions.

Quickstart

pip install WSME

from wsme import WSRoot, expose

class MyService(WSRoot):
    @expose(unicode, unicode)
    def hello(self, who=u'World'):
        return u"Hello {0} !".format(who)

ws = MyService(protocols=['restjson', 'restxml'])
application = ws.wsgiapp()

Requires Python 3.8 or later; designed for WSGI-compatible web frameworks.

Verify before relying

  • Whether the package is actively maintained beyond the 32-day release window (repository metadata unavailable).
  • Current community adoption and whether the framework is suitable for new projects versus legacy maintenance.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 4 — WebOb, simplegeneric, netaddr, importlib_metadata
Maintenance actively maintained — 32 days since the last release
First released
Downloads 106,954/month — #12,633 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: wsme-0.13.0-py3-none-any.whl

Development Status :: 3 - AlphaLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Internet :: WWW/HTTP :: WSGITopic :: Software Development :: Libraries :: Python Modules

Tags

REST API framework with type hintsweb service type validationWSGI REST frameworkautomatic request response serializationmulti-protocol web serviceREST API documentation generationframework-agnostic web service library
rest-apiwsgitype-validation

More Python Modules packages