This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Tcp-based communication protocol, RPC protocol

Project Description

HTTP-based communication protocol, RPC protocol

You can install pyxtcp from PyPI with

$ pip install pyxtcp

Protocol

  • format:

    /topic/method?v={params}
    

Version update

  • 1.1.3 添加 HTTP POST 转发为 GET 请求
  • 1.1.2 稳定,测试
  • 1.1.1 统一 HTTP-based RPC 返回信息
  • 1.1.0 添加 HTTP-based RPC
  • 1.0.2 添加client_handler, Service, server_callback_by_json
  • 1.0.1 initialize project

Getting Started

  • server

    #!/usr/bin/env python
    # coding=utf-8
    
    import logging
    logging.basicConfig(level=logging.DEBUG)
    
    from pyxtcp.http import RPCServer, Service
    service = Service()
    
    
    class CompanyService(object):
    
        @staticmethod
        @service.with_f_rpc
        def get_company_by_company_id(company_id):
            logging.warn(("HiHi", company_id))
            return "wwwwwwwwwwwwwwwww{}".format(company_id)
    
    if __name__ == "__main__":
        port = 8001
        app = RPCServer(8001, "0.0.0.0")
        app.add_service(service)
        app.run()
    
  • client

    #!/usr/bin/env python
    # coding=utf-8
    
    import logging
    logging.basicConfig(level=logging.INFO)
    from pyxtcp.http import RPCClient
    
    company = RPCClient("localhost:8001").service_name("CompanyService")
    
    logging.info(company.get_company_by_company_id(company_id=7))
    

Support

If you need help using pyxtcp or have found a bug, please open a github issue.

Release History

Release History

This version
History Node

1.1.9

History Node

1.1.8

History Node

1.1.7

History Node

1.1.6

History Node

1.1.5

History Node

1.1.4

History Node

1.1.3

History Node

1.1.1

History Node

1.1.0

History Node

1.0.2

History Node

1.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyxtcp-1.1.9-py2.7.egg (65.4 kB) Copy SHA256 Checksum SHA256 2.7 Egg Nov 3, 2015
pyxtcp-1.1.9.tar.gz (10.0 kB) Copy SHA256 Checksum SHA256 Source Nov 3, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting