Skip to main content

yet a hotjb client.

Project description

hotjb-python

# 使用客户端
from hotjb.client import HotJBClient

async def main(loop):
    client = HotJBClient(host='127.0.0.1', port=30000)
    r = await client.tokenize('中文分词库')
    print(r)

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main(loop))
# 使用压力测试
from loguru import logger
from hotjb.pressuror import HotJBPressuror

async def main(loop):
    '''
    '''

    logger.remove()
    logger.add(
        'logs/{time}.log',
        level='INFO',
        rotation='00:00',
        retention='7 days',
    )
    pressuror = HotJBPressuror(logger)
    await pressuror.pressure()

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main(loop))

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

hotjb-0.1.0.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

hotjb-0.1.0-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

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