Metadata-Version: 2.1
Name: folklore
Version: 0.2.0
Summary: An elegant thrift service development framework
Home-page: https://github.com/maralla/folklore
Author: maralla
Author-email: maralla.ai@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Requires-Dist: folklore-config
Requires-Dist: folklore-thrift
Requires-Dist: thriftpy (>=0.3.9)
Requires-Dist: gevent (>=1.2.1)

Folklore: An elegant thrift service development framework
=========================================================

.. image:: https://travis-ci.org/maralla/folklore.svg?branch=master
    :target: https://travis-ci.org/maralla/folklore



This package defines the interfaces for writing Folklore thrift services.

Install
-------

.. code:: bash

    pip install folklore


Example
-------

To define a simple app:

.. code:: python

    # app.py
    from folklore import Folklore

    app = Folklore('TestService')

    @app.api
    def say_hello(name):
        return 'Hello ' + name


To Run the app, install `folklore-cli <https://github.com/maralla/folklore-cli>`_ first, then
create the following config:

.. code:: thrift

    # ping.thrift
    service TestService {
        string say_hello(1: required string name)
    }

.. code:: yaml

    # app.yaml
    app_name: test_app
    app: app:app
    thrift_file: ping.thrift

Run the following command:

.. code:: bash

    $ folklore serve


