WSME


NameWSME JSON
Version 0.12.1 PyPI version JSON
download
home_pagehttps://opendev.org/x/wsme
SummarySimplify the writing of REST APIs, and extend them with additional protocols.
upload_time2023-09-22 09:25:05
maintainer
docs_urlhttps://pythonhosted.org/WSME/
authorChristophe de Vienne
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Web Services Made Easy
======================

Introduction
------------

Web Services Made Easy (WSME) simplifies the writing of REST web services
by providing simple yet powerful typing, removing the need to directly
manipulate the request and the response objects.

WSME can work standalone or on top of your favorite Python web
(micro)framework, so you can use both your preferred way of routing your REST
requests and most of the features of WSME that rely on the typing system like:

- Alternate protocols, including those supporting batch-calls
- Easy documentation through a Sphinx_ extension

WSME is originally a rewrite of TGWebServices with a focus on extensibility,
framework-independence and better type handling.

How Easy?
~~~~~~~~~

Here is a standalone WSGI example::

    from wsme import WSRoot, expose

    class MyService(WSRoot):
        @expose(unicode, unicode)  # First parameter is the return type,
                                   # then the function argument types
        def hello(self, who=u'World'):
            return u"Hello {0} !".format(who)

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

With this published at the ``/ws`` path of your application, you can access your
hello function in various protocols:

.. list-table::
    :header-rows: 1

    * - URL
      - Returns

    * - ``http://<server>/ws/hello.json?who=you``
      - ``"Hello you !"``

    * - ``http://<server>/ws/hello.xml``
      - ``<result>Hello World !</result>``

Main features
~~~~~~~~~~~~~

- Very simple API.

- Supports user-defined simple and complex types.

- Multi-protocol : REST+JSON, REST+XML and more possible.

- Extensible : easy to add more protocols or more base types.

- Framework independence : adapters are provided to easily integrate your API in
  any web framework, for example an WSGI container, Pecan_, Flask_, ...

- Very few runtime dependencies: webob, simplegeneric.

- Integration in `Sphinx`_ for making clean documentation with
  ``wsmeext.sphinxext``.

.. _Pecan: http://pecanpy.org/
.. _Flask: http://flask.pocoo.org/

Install
~~~~~~~

::

    pip install WSME

Changes
~~~~~~~

- Read the `Changelog`_

Getting Help
~~~~~~~~~~~~

- Read the `WSME Documentation`_.
- Questions about WSME should go to the `python-wsme mailinglist`_.

Contribute
~~~~~~~~~~

- Documentation: http://packages.python.org/WSME/
- Source: http://git.openstack.org/cgit/openstack/wsme
- Bugs: https://bugs.launchpad.net/wsme/+bugs
- Code review: https://review.openstack.org/#/q/project:openstack/wsme,n,z

.. _Changelog: http://packages.python.org/WSME/changes.html
.. _python-wsme mailinglist: http://groups.google.com/group/python-wsme
.. _WSME Documentation: http://packages.python.org/WSME/
.. _WSME issue tracker: https://bugs.launchpad.net/wsme/+bugs
.. _Sphinx: http://sphinx.pocoo.org/


            

Raw data

            {
    "_id": null,
    "home_page": "https://opendev.org/x/wsme",
    "name": "WSME",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/WSME/",
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Christophe de Vienne",
    "author_email": "python-wsme@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/52/4f/04ddd9a3340142e68a60b9158bbe39b347deee4178c44e8aabee577781df/WSME-0.12.1.tar.gz",
    "platform": null,
    "description": "Web Services Made Easy\n======================\n\nIntroduction\n------------\n\nWeb Services Made Easy (WSME) simplifies the writing of REST web services\nby providing simple yet powerful typing, removing the need to directly\nmanipulate the request and the response objects.\n\nWSME can work standalone or on top of your favorite Python web\n(micro)framework, so you can use both your preferred way of routing your REST\nrequests and most of the features of WSME that rely on the typing system like:\n\n- Alternate protocols, including those supporting batch-calls\n- Easy documentation through a Sphinx_ extension\n\nWSME is originally a rewrite of TGWebServices with a focus on extensibility,\nframework-independence and better type handling.\n\nHow Easy?\n~~~~~~~~~\n\nHere is a standalone WSGI example::\n\n    from wsme import WSRoot, expose\n\n    class MyService(WSRoot):\n        @expose(unicode, unicode)  # First parameter is the return type,\n                                   # then the function argument types\n        def hello(self, who=u'World'):\n            return u\"Hello {0} !\".format(who)\n\n    ws = MyService(protocols=['restjson', 'restxml'])\n    application = ws.wsgiapp()\n\nWith this published at the ``/ws`` path of your application, you can access your\nhello function in various protocols:\n\n.. list-table::\n    :header-rows: 1\n\n    * - URL\n      - Returns\n\n    * - ``http://<server>/ws/hello.json?who=you``\n      - ``\"Hello you !\"``\n\n    * - ``http://<server>/ws/hello.xml``\n      - ``<result>Hello World !</result>``\n\nMain features\n~~~~~~~~~~~~~\n\n- Very simple API.\n\n- Supports user-defined simple and complex types.\n\n- Multi-protocol : REST+JSON, REST+XML and more possible.\n\n- Extensible : easy to add more protocols or more base types.\n\n- Framework independence : adapters are provided to easily integrate your API in\n  any web framework, for example an WSGI container, Pecan_, Flask_, ...\n\n- Very few runtime dependencies: webob, simplegeneric.\n\n- Integration in `Sphinx`_ for making clean documentation with\n  ``wsmeext.sphinxext``.\n\n.. _Pecan: http://pecanpy.org/\n.. _Flask: http://flask.pocoo.org/\n\nInstall\n~~~~~~~\n\n::\n\n    pip install WSME\n\nChanges\n~~~~~~~\n\n- Read the `Changelog`_\n\nGetting Help\n~~~~~~~~~~~~\n\n- Read the `WSME Documentation`_.\n- Questions about WSME should go to the `python-wsme mailinglist`_.\n\nContribute\n~~~~~~~~~~\n\n- Documentation: http://packages.python.org/WSME/\n- Source: http://git.openstack.org/cgit/openstack/wsme\n- Bugs: https://bugs.launchpad.net/wsme/+bugs\n- Code review: https://review.openstack.org/#/q/project:openstack/wsme,n,z\n\n.. _Changelog: http://packages.python.org/WSME/changes.html\n.. _python-wsme mailinglist: http://groups.google.com/group/python-wsme\n.. _WSME Documentation: http://packages.python.org/WSME/\n.. _WSME issue tracker: https://bugs.launchpad.net/wsme/+bugs\n.. _Sphinx: http://sphinx.pocoo.org/\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simplify the writing of REST APIs, and extend them with additional protocols.",
    "version": "0.12.1",
    "project_urls": {
        "Homepage": "https://opendev.org/x/wsme"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7d758769c65cfd723812fd98c6dad218f9922519e8cded7bc6a79f750ed527c",
                "md5": "3f4fb261624ee92f933e750cf7eb72e0",
                "sha256": "6d8a975289089f8d38a5ab556731637da45ef6e4c114058fef0990c05249c471"
            },
            "downloads": -1,
            "filename": "WSME-0.12.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3f4fb261624ee92f933e750cf7eb72e0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 59601,
            "upload_time": "2023-09-22T09:25:02",
            "upload_time_iso_8601": "2023-09-22T09:25:02.544410Z",
            "url": "https://files.pythonhosted.org/packages/e7/d7/58769c65cfd723812fd98c6dad218f9922519e8cded7bc6a79f750ed527c/WSME-0.12.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "524f04ddd9a3340142e68a60b9158bbe39b347deee4178c44e8aabee577781df",
                "md5": "90d07765ce30dfbb7ef6ae20fb2136ba",
                "sha256": "9b7eb2244af3c704ac914b5ed221954bb68add0a8b2b2f38a244b067b337992d"
            },
            "downloads": -1,
            "filename": "WSME-0.12.1.tar.gz",
            "has_sig": false,
            "md5_digest": "90d07765ce30dfbb7ef6ae20fb2136ba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 90220,
            "upload_time": "2023-09-22T09:25:05",
            "upload_time_iso_8601": "2023-09-22T09:25:05.030074Z",
            "url": "https://files.pythonhosted.org/packages/52/4f/04ddd9a3340142e68a60b9158bbe39b347deee4178c44e8aabee577781df/WSME-0.12.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-22 09:25:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "wsme"
}
        
Elapsed time: 0.12561s