Thrift app the flask way
Project description
Archer is a micro RPC framework inspired by Flask based on Thrift.
Archer is super easy to use
Save in a hello.py:
from archer import Archer
app = Archer(__name__)
@app.api('ping')
def ping():
return 'pong'
Save in a hello.thrift:
service PingPong { string ping(), }
Archer would find the thrift file for you, and relying on Thriftpy to generate code on the fly, and you don’t need to specify the service name(here is PingPong) in code as well.
And Easy to Setup
And run it:
$ pip install Archer
$ archer run
* Running on 127.0.0.1:6000/
Archer would find the app instance to start a dev server, and reload it when detecting changes on your python or thrift file.
Quick to get some feedback
Just run the command:
$ archer call ping
* pong
Use the client shell
Jump into shell with client at your hand:
$ archer client
>>> client.ping()
Pretty cool, eh!
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
archer-0.2.1.tar.gz
(11.0 kB
view details)
Built Distribution
archer-0.2.1-py2-none-any.whl
(15.2 kB
view details)
File details
Details for the file archer-0.2.1.tar.gz
.
File metadata
- Download URL: archer-0.2.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21391cd994a86d196eb4fca8bba8153155b27cbd2553f69d3271609b54c3ca3a |
|
MD5 | 5d8cb7e767f4dff8489a784e65e9f480 |
|
BLAKE2b-256 | d758efe8f2d0f4e6542a6de8f9e458550dc3c2c46d2903e1c2aaaa4a931915a1 |
File details
Details for the file archer-0.2.1-py2-none-any.whl
.
File metadata
- Download URL: archer-0.2.1-py2-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c22f6e5d05d09d92de44d2b8ccbe25dd80d5caf74d55c85fb9d91aa9a0903bc |
|
MD5 | ba81c51c93685c559004184525b5f83d |
|
BLAKE2b-256 | 787b756d209049a97759d7e4cbef17205f9f3586dfe80a79043242273504c440 |