https://github.com/maralla/folklore
[WIP] Beautiful and easy to use Python RPC service framework.
https://github.com/maralla/folklore
framework python rpc thrift
Last synced: 9 months ago
JSON representation
[WIP] Beautiful and easy to use Python RPC service framework.
- Host: GitHub
- URL: https://github.com/maralla/folklore
- Owner: maralla
- License: mit
- Created: 2020-07-05T10:48:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-23T10:33:41.000Z (over 5 years ago)
- Last Synced: 2025-06-16T13:11:27.838Z (10 months ago)
- Topics: framework, python, rpc, thrift
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Folklore: 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 an 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 `_ 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