folklore-0.2.0
توضیحات
An elegant thrift service development framework
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | folklore-0.2.0 |
| نام | folklore |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | maralla |
| ایمیل نویسنده | maralla.ai@gmail.com |
| آدرس صفحه اصلی | https://github.com/maralla/folklore |
| آدرس اینترنتی | https://pypi.org/project/folklore/ |
| مجوز | - |
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
نیازمندی
| مقدار | نام |
|---|---|
| - | folklore-config |
| - | folklore-thrift |
| >=0.3.9 | thriftpy |
| >=1.2.1 | gevent |
نحوه نصب
نصب پکیج whl folklore-0.2.0:
pip install folklore-0.2.0.whl
نصب پکیج tar.gz folklore-0.2.0:
pip install folklore-0.2.0.tar.gz