{"id":23185,"library":"wsme","title":"WSME","description":"WSME (Web Service Made Easy) simplifies writing REST APIs by using Python type annotations to define web service protocols, supporting JSON and XML. Version 0.12.1 is the latest stable release, with a maintenance cadence.","status":"active","version":"0.12.1","language":"python","source_language":"en","source_url":"https://github.com/wsme/wsme","tags":["rest","api","web-services","type-annotations"],"install":[{"cmd":"pip install wsme","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"WSPromise is now a top-level export; importing from wsme.api is deprecated and may break in future versions.","wrong":"from wsme.api import WSPromise","symbol":"WSPromise","correct":"from wsme import WSPromise"},{"note":"Use from wsme import types for consistency with the package's intended use.","wrong":"import wsme.types","symbol":"types","correct":"from wsme import types"}],"quickstart":{"code":"from wsme import WSPromise, types\n\nclass MyService:\n    @WSPromise(returns=types.text)\n    def greet(self, name: types.text) -> str:\n        return f\"Hello, {name}!\"\n\nif __name__ == '__main__':\n    # In a real app, you would set up a WSGI server\n    pass\n","lang":"python","description":"Define a simple web service with WSME using type annotations and WSPromise."},"warnings":[{"fix":"Upgrade to Python >=3.8 and replace 'from wsmeext.pecan import ...' with 'from pecan_wsme import ...' (install pecan-wsme).","message":"WSME 0.12 removed support for Python 2 and dropped the wsmeext.pecan module. Users must migrate to Python 3.8+ and use pecan-wsme instead.","severity":"breaking","affected_versions":"<0.12.0"},{"fix":"Change imports to 'from wsme import types'.","message":"Importing types from wsme.api is deprecated; use from wsme import types instead.","severity":"deprecated","affected_versions":"all"},{"fix":"Always use wsme.types types, e.g., types.text, types.int, etc.","message":"Type annotations must be strings (types.text) not Python builtins (str). Using builtins may cause serialization errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use the replacement package eg 'pecan-wsme' or 'wsme' core only.","cause":"wsmeext subpackage removed in version 0.12; previously housed extensions like pecan.","error":"No module named 'wsmeext'"},{"fix":"Upgrade wsme to 0.11 or later: pip install wsme>=0.11","cause":"Older version of wsme (<0.11) didn't export WSPromise from the top level.","error":"ImportError: cannot import name 'WSPromise' from 'wsme'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}