jieba-rpc
=============
[](https://travis-ci.org/messense/jieba-rpc)
Simple [jieba](https://github.com/fxsjy/jieba) RPC server based on [msgpack-rpc-python](https://github.com/msgpack-rpc/msgpack-rpc-python).
## Installation
Install `jieba-rpc` using `pip`:
```bash
pip install jieba-rpc
```
## Usage
You can start a simple jieba RPC server by executing:
```bash
python -m jiebarpc localhost:8888
```
Or if you wish to customize it using codes:
```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from jiebarpc import JiebaRPCServer, JiebaRPCDispatcher
def main(host, port):
server = JiebaRPCServer(JiebaRPCDispatcher())
server.listen(host, port)
server.start()
return 0
if __name__ == '__main__':
import sys
if len(sys.argv) != 3:
print('Usage: %s host port' % sys.argv[0])
sys.exit(1)
host = sys.argv[1]
port = int(sys.argv[2])
sys.exit(main(host, port))
```
## License
The MIT License (MIT)
Copyright (c) 2014 messense
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.
=============
[](https://travis-ci.org/messense/jieba-rpc)
Simple [jieba](https://github.com/fxsjy/jieba) RPC server based on [msgpack-rpc-python](https://github.com/msgpack-rpc/msgpack-rpc-python).
## Installation
Install `jieba-rpc` using `pip`:
```bash
pip install jieba-rpc
```
## Usage
You can start a simple jieba RPC server by executing:
```bash
python -m jiebarpc localhost:8888
```
Or if you wish to customize it using codes:
```python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from jiebarpc import JiebaRPCServer, JiebaRPCDispatcher
def main(host, port):
server = JiebaRPCServer(JiebaRPCDispatcher())
server.listen(host, port)
server.start()
return 0
if __name__ == '__main__':
import sys
if len(sys.argv) != 3:
print('Usage: %s host port' % sys.argv[0])
sys.exit(1)
host = sys.argv[1]
port = int(sys.argv[2])
sys.exit(main(host, port))
```
## License
The MIT License (MIT)
Copyright (c) 2014 messense
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.
Release files for jieba-rpc 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | |
|---|---|---|---|
| jieba-rpc-0.0.4.zip | 15.0 kB | Details | |
| jieba-rpc-0.0.4.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jieba_rpc-0.0.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 30.9 kB
Release files / jieba-rpc-0.0.4.zip
| Download URL | jieba-rpc-0.0.4.zip |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d260af040110429d75900782d0631e91af3ed94fa9b63eddec7936999238dfe
|
|
BLAKE2b-256 checksum How to use checksums |
e7fab25b360d9fe3067193aff43dd4e4d5d60891e68cb3b75174f5508f38ec2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / jieba-rpc-0.0.4.tar.gz
| Download URL | jieba-rpc-0.0.4.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58f4c8555cd8ac12481006f1fcf20e5ec3328ba7e314b14937ce9419e9f993a4
|
|
BLAKE2b-256 checksum How to use checksums |
c577522831c6378e0c433453fa470019f6ba83a5018768c4cae3aa3ba09b2ce1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / jieba_rpc-0.0.4-py2.py3-none-any.whl
| Download URL | jieba_rpc-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a34faf9854b31a20c28db2c77fef7e9941a4d42493de05cc13afb48317c136b2
|
|
BLAKE2b-256 checksum How to use checksums |
eed894123884fc9699e831ecfd6def910e62439b7d9f7167bc7c0993a588c24c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |