Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
ReadMe
testclient.py
testclient.pyc
testserver.py

ReadMe

Notice:
    This app is for python 2.x.

Overview
    This python program is test application for web api server with falcon.
    The server has information about components version as described below

    items = {
        "Components": {
                "GW": 0.1,
                "ECU1": 0.5
        }
    }

    The client can get the information
    with accessing http://127.0.0.1:8000/vehicle/12345678 and using HTTP get method.
    Also the client can update the information with using HTTP put method.

How to run
    run web api server
    F:\python\webapi>python testserver.py

    run client app from python interpreter
    F:\python\webapi>python

    Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on wi
    n32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import testclient
    >>> c = testclient

    use get() method and put() method
    to get components version and update the version on web api server.

    >>> c.get()
    {u'Components': {u'GW': 0.1, u'ECU1': 0.5}}
    >>> c.put()
    >>> c.get()
    {u'Components': {u'GW': 1.1, u'ECU1': 1.5}}