--- id: wsme version: "0.13.0" license: MIT license_treatment: permissive maintenance: active --- # WSME — Simplify the writing of REST APIs, and extend them with additional protocols. License: permissive · Maintenance: active · Downloads: 107.0K/mo ## 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 above — 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 pip install wsme uv add wsme 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_current - Install friction: low - Maintenance: active - Downloads: 107.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags REST API framework with type hints, web service type validation, WSGI REST framework, automatic request response serialization, multi-protocol web service, REST API documentation generation, framework-agnostic web service library, rest-api, wsgi, type-validation [View on SkillFed](https://skillfed.io/packages/wsme) · [View on PyPI](https://pypi.org/project/wsme/)