Skip to main content

jieba RPC server

Project description

jieba-rpc
=============
[![Build Status](https://travis-ci.org/messense/jieba-rpc.svg?branch=master)](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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

jieba-rpc-0.0.4.zip (15.0 kB view details)

Uploaded Source

jieba-rpc-0.0.4.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

jieba_rpc-0.0.4-py2.py3-none-any.whl (8.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jieba-rpc-0.0.4.zip.

File metadata

  • Download URL: jieba-rpc-0.0.4.zip
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jieba-rpc-0.0.4.zip
Algorithm Hash digest
SHA256 3d260af040110429d75900782d0631e91af3ed94fa9b63eddec7936999238dfe
MD5 700c86dcc0952625ece82128488c86bb
BLAKE2b-256 e7fab25b360d9fe3067193aff43dd4e4d5d60891e68cb3b75174f5508f38ec2b

See more details on using hashes here.

File details

Details for the file jieba-rpc-0.0.4.tar.gz.

File metadata

  • Download URL: jieba-rpc-0.0.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jieba-rpc-0.0.4.tar.gz
Algorithm Hash digest
SHA256 58f4c8555cd8ac12481006f1fcf20e5ec3328ba7e314b14937ce9419e9f993a4
MD5 8a5593139f2e366f1e25a2befe96da24
BLAKE2b-256 c577522831c6378e0c433453fa470019f6ba83a5018768c4cae3aa3ba09b2ce1

See more details on using hashes here.

File details

Details for the file jieba_rpc-0.0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for jieba_rpc-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a34faf9854b31a20c28db2c77fef7e9941a4d42493de05cc13afb48317c136b2
MD5 3d9f85992f5e2996faa5f8fefddf3f18
BLAKE2b-256 eed894123884fc9699e831ecfd6def910e62439b7d9f7167bc7c0993a588c24c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page