GithubHelp home page GithubHelp logo

callme's People

Contributors

ashutosh-mishra avatar carletes avatar ceelian avatar femtotrader avatar mkisto avatar skudriashev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

callme's Issues

Installation with `pip` fails if `kombu` is not installed

If I try to do a

$ pip install callme

in a fresh virtualenv (with no kombu installed), pip cannot do its job:

Downloading/unpacking callme (from -r requirements.txt (line 5))
  Running setup.py egg_info for package callme
Traceback (most recent call last):
  File "<string>", line 16, in <module>
  File "/home/systems/syv/.virtualenvs/webdev/build/callme/setup.py", line 13, in <module>
        import callme
  File "src/callme/__init__.py", line 10, in <module>
        from server import Server
  File "src/callme/server.py", line 8, in <module>
        from kombu import BrokerConnection, Exchange, Queue, Consumer, Producer
ImportError: No module named kombu

Although the dependency on kombu is explicit in setup.py, that file (setup.py) also has the following statement:

import callme

(on line 13 as of callme 0.1.0) which fails if kombu is not already present.

I suggest moving the symbols __version__, __author__ and similar from module callme to something like callme.info, for instance, and then doing:

from callme import info

from setup.py.

Accept parameter and Kombu<3.0.0

After adding the 'accept' parameter to the consumer - code stopped to work on Kombu<3.0.0 with
(TypeError: init() got an unexpected keyword argument 'accept').
Shell you revert this, since we already added 'kombu>=1.2.1,<3.0.0' in the install_requires?

Pickle is a security risk

Pickle allows for arbiatary messages to be sent that can cause unintend remoted execute, this may not be much to worry about, but it does break a hole in that the RPC server can now execute pretty much anything that its containing program has the permissions to execute. It looks like the default kombu serializer used is pickle :-/

rpc server demo failed

Why rpc server demo failed with callme.exceptions.ConnectionError: Broker connection failed?, how to fix it?

Proxy object does not exit cleanly.

When used in some circumstance the proxy object does not clean itself up in a sensible manor, for example if you create a proxy global object in Flask or Django, use it for the duration of the request and then kill it during request tear down the response queue remains indefinitely until the application is recycled.

Proposed fix: Add a destructor to the proxy class to clean up proxy objects in a suitable fashion.

No integration test get's executed on a fresh checkout

When I do a fresh clone of the repo and running tox and the run_tests.sh no integration test gets executed.

Charly:callme christian$ ./run_tests.sh  -i
integration create: /Users/christian/tmp/callme/.tox/integration
integration installdeps: -r/Users/christian/tmp/callme/requirements.txt, -r/Users/christian/tmp/callme/test-requirements.txt
integration runtests: PYTHONHASHSEED='2433771540'
integration runtests: commands[0] | nosetests --verbosity=2 src/callme/tests/integration

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
________________________________________________________________ summary _________________________________________________________________
  integration: commands succeeded
  congratulations :)

Add a fib function sample to show how to implement timeout

Hello,

I think you should use a Fibonnacci function as RPC example

def fib(n):
    """Fibonacci function"""
    if n == 0:
        return 0
    elif n == 1:
        return 1
    else:
        return fib(n-1) + fib(n-2)

Such an example could should how to use timeout (either on client side or on server side) because calculating fib(5) is quite short but fib(20) or fib(25) is much longer.

Kind regards

Support for keyword arguments

It would be nice if I were able to use keyword arguments in calls from the proxy to the server. Currently calls only support positional arguments.

It looks like it would be fairly straightforward to add a func_keywords attribute to the RpcRequest object in protocol.py, capture them when Proxy creates the request object (I can't seem to find relevant section of code), and unpack them together with positional arguments in line 143 of server.py as so:

result = self._func_dict[request.func_name](*request.func_args, **request.func_kw_args)

It's crunch time for me at work, so I don't have a lot of time to spend on this at the moment. If nobody has time to work on this, I can take a look again in a month or so and send a pull request with the feature in place.

Adding BSD license header

Christian,

How about adding BSD license header to each project file with code? I saw this is quite common for other projects.

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.