Metadata-Version: 1.1
Name: hunk
Version: 0.1.0
Summary: Mock for JSON API server.
Home-page: https://github.com/lanius/hunk/
Author: lanius
Author-email: lanius@nirvake.org
License: Copyright (C) 2014 by lanius

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Description: hunk
        ====
        
        Helps client-side Web development by mocking JSON API server.
        
        
        Installation
        ------------
        
        hunk can be installed via pip or easy_install:
        
        .. code-block:: bash
        
            $ pip install hunk
        
        Or:
        
        .. code-block:: bash
        
            $ easy_install hunk
        
        
        Usage
        -----
        
        Setup data directory and files. 
        
        - Directories under the root have a HTTP method name
        - Directories and files have name to be resource path
        - Files have conent to be response JSON
        
        For example:
        
        .. code-block:: bash
        
            $ tree demo/simple/
            demo/simple/
            |-- get
            |   |-- members
            |   |   |-- 100.json
            |   |   |-- 200.json
            |   |   |-- 300.json
            |   |   ...
            |   +-- sounds.json
            |-- post
            |   +-- members.json
            ...
        
        Move to the root directory and run hunk:
        
        .. code-block:: bash
        
            $ cd demo/simple/
            $ hunk
             * Running on http://localhost:8080/
        
        Now, you can access Web API with HTTP:
        
        .. code-block:: bash
        
            $  curl http://localhost:8080/members/100
            {"gender": "female", "kind": "human", "name": "Dorothy"}
        
            $ curl http://localhost:8080/members
            [{"kind": "scarecrow", "name": "Hunk"}, ...]
        
            $ curl http://localhost:8080/sounds
            [{"title": "Over The Rainbow"}, ... ]
        
            $ curl http://localhost:8080/members -X POST
            {"result": "success"}
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
