Giter Site home page Giter Site logo

gopyserver's Introduction

goPyServer


This is Python JSON-RPC Server Library which can accept JSON-RPC calls from Golang Client program and hopefully, Python as well.

With this library, you can cross-communicate with Golang as a Client in a flick.

For a quick demo for this library, please visit this LINK.


Why I developed this library?

Since, I've working on Python for 2 years and many of my current projects are based on Python. Now, since just for variety and enthusiasm I wanted to adapt myself to a compiler based language and so I heard about Golang. It was new and I kinda felt fun doing it. Now, I wanted to merge my Python projects with Golang. And as said,

"Necessity is the mother of invention(innovation)"

And here I developed a library for those who are keen to experiment with both Python & Golang .


Now, How to use this library?

Follow these steps and you are on:

  • Clone the library from github
      git clone https://github.com/chawlanikhil24/goPyServer.git
    
  • Install this library in your system, preferably in a Virtual environment
      python setup.py install
    
  • Import this library in your program
      import goPyServer as GP
    
  • Define your functions
      def f1():
        return "function 1"
    
      def f2():
        return "function 2"
    
  • Initialise the Object of Python Server(DEFAULTS-> "Host":"localhost","Port":9000,"bufferSize":1024,"Listen":4)
      obj = GP.pyServ()
    
  • Register your functions with the RPC Server
      obj.register_function(f1)
      obj.register_function(f2)
    
  • Now, Connect() to the Socket Server at the mentioned address
      obj.connect()
    
  • Finally,Run the RPC() Server
      obj.RPCServer()
    
  • Now, from any site/terminal, you can remotely make RPCs using Golang library

Here, you can find the running example for Python-Golang Cross Communication.

ENJOY

gopyserver's People

Contributors

chawlanikhil24 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

mario21ic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.