machinalis / telegraphy Goto Github PK
View Code? Open in Web Editor NEWTelegraphy provides real time events for WSGI Python applications
Telegraphy provides real time events for WSGI Python applications
On pip install telegraphy console shows:
Downloading/unpacking telegraphy
Downloading telegraphy-0.1.2.tar.gz
Storing download in cache at /home/defo/.pip_download_cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Ft%2Ftelegraphy%2Ftelegraphy-0.1.2.tar.gz
Running setup.py egg_info for package telegraphy
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/defo/.virtualenvs/coco/build/telegraphy/setup.py", line 5, in <module>
with open('requirements.txt', 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/defo/.virtualenvs/coco/build/telegraphy/setup.py", line 5, in <module>
with open('requirements.txt', 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /home/defo/.virtualenvs/coco/build/telegraphy
Storing complete log in /home/defo/.pip/pip.log
On the "Using It" section of the readme, only the server side part is shown. It would be nice to have a feeling on how it works on the client side too :)
Transport are fiexd to XMLRPC in current version. It should be possible to use different implementations such as ZMQ or Redis.
Current Telegraphy implementation relies on Twisted so transport technologies must be implemented in both (async) twisted and (sync) python fashion.
WSGI comptibility with other frameworks than Django (ie: flask).
There is no description (one line) for this project on github.
Current version does not offer any hints about sending an event to a user or a group of users.
ModelEvents are fixed to model classes, not instances.
In order to support such feature, event naming must be defined, currently appname.ModelName are used. This could be generalized to something like event_prefix.GroupName or event_prefix.UserName.
In the template tags: https://github.com/machinalis/telegraphy/blob/master/telegraphy/contrib/django_telegraphy/templatetags/telegraphy_tags.py#L48
an exception should raise if the request is not in the context. Like in https://github.com/machinalis/telegraphy/blob/master/telegraphy/contrib/django_telegraphy/templatetags/telegraphy_tags.py#L69
I'm not a Twisted expert and unfortunately I haven't found any explanation in the docs on which is the best setup to use telegraphy in production?
Your recommendation would really help me out.
Kind regards
Create management command to integrate Crossbar.IO
Actual event is just a JSON or dict, but ModelEvent instances are just responibles of event emission.
Crossbar provides its own CLI, but intialy we'll try to use run_command_start instead of just calling the CLI.
Telegraphy seems to have problems when serializing datetimeformats.
In my case, the field created, a date field:
raise Exception("invalid type for event - serialization failed [%s]" % e)
exceptions.Exception: invalid type for event - serialization failed [datetime.datetime(2014, 3, 5, 20, 10, 30) is not JSON serializable]
Installation instructions must include some notes about Ubunut:
sudo apt-get install python-dev
Twisted requires gcc that is not available by default.
Implement a command that runs django debug mode internal WSGI server (runserver) as well as telegraphy server with reloading support.
When trying to install on Mac OS using virtualenv, there are some issues with Twisted (that also seems to cause issues with autobahn) that makes impossible to use telegraphy there.
I know this is not a problem with telegraphy, but just letting you know that is not working on that platform.
I am using MacOSX 10.9.1 and installed telegraphy via pip. I receive the following error message:
Exception Location: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py in dump_struct, line 723
Request Method: POST
Django Version: 1.6
Python Version: 2.7.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'telegraphy.contrib.django_telegraphy',
'account',
'metron',
'eventlog',
'django_extensions']
Installed Middleware:
['django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware']
Traceback:
File "/Users/sebastian/Developer/Zaumdo/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
return self.dispatch(request, _args, *_kwargs)
request, _args, *_kwargs)
return super(GroupAwareMixin, self).dispatch(request, _args, *_kwargs)
return handler(request, _args, *_kwargs)
return super(GroupAwareMixin, self).post(request, _args, *_kwargs)
return super(BaseCreateView, self).post(request, _args, *_kwargs)
return self.form_valid(form)
self.group.associate(self.object)
instance.save()
force_update=force_update, update_fields=update_fields)
update_fields=update_fields, raw=raw, using=using)
response = receiver(signal=self, sender=sender, **named)
self.send_to_gateway(instance, self.OP_CREATE)
self.gateway_proxy.send_event(event)
return self.__send(self.__name, args)
allow_none=self.__allow_none)
data = m.dumps(params)
dump(v, write)
f(self, value, write)
dump(v, write)
f(self, value, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
dump(v, write)
f(self, value, write)
self.dump_struct(value.**dict**, write)
raise TypeError, "cannot marshal recursive dictionaries"
Exception Value: cannot marshal recursive dictionaries
version 0.8 does not work. this version does not support the module listenWS. The version 0.6.2 is not available in pypi. I do?
I was just glancing through your code and I noticed that your Gateway AuthToken class uses a uuid3 (configured with a DNS namespace) of a timestamp. It doesn't look like it's used anywhere, but I have to warn you that this will not produce a cryptographically secure value.
I'd like to encourage you to use an HMAC based token signature using a configurable application secret. This is how Django does it (link to Signer) and Tornado (link to create_signed_value) do it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.