Git Product home page Git Product logo

rexpro-python's Introduction

rexpro

rexpro-python is a RexPro socket interface for python, specifically designed for use with Titan (http://thinkaurelius.github.io/titan/) via RexPro (https://github.com/tinkerpop/rexster/wiki/RexPro). For those already familiar with Blueprints (https://github.com/tinkerpop/blueprints/wiki) there is is a simple example.

Documentation

rexpro documentation can be found at http://rexpro-python.readthedocs.org/

Installation

$ pip install rexpro

Testing

To get rexpro unit tests running you'll need a titan installation with rexster server configured with a test graph setup::

    <graph>
        <graph-name>graph</graph-name>
        <graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
        <!-- <graph-location>/tmp/titan</graph-location> -->
        <graph-read-only>false</graph-read-only>
        <properties>
            <storage.backend>cassandra</storage.backend>
            <storage.index.search.backend>elasticsearch</storage.index.search.backend>
            <storage.index.search.directory>../db/es</storage.index.search.directory>
            <storage.index.search.client-only>false</storage.index.search.client-only>
            <storage.index.search.local-mode>true</storage.index.search.local-mode>
        </properties>
        <extensions>
          <allows>
            <allow>tp:gremlin</allow>
          </allows>
        </extensions>
    </graph>
    <graph>
        <graph-name>graph</graph-name>
        <graph-type>tinkergraph</graph-type>
        <graph-mock-tx>true</graph-mock-tx>
        <extensions>
            <allows>
                <allow>tp:gremlin</allow>
            </allows>
        </extensions>
    </graph>
    <graph>
        <graph-name>tinkergraph</graph-name>
        <graph-type>tinkergraph</graph-type>
        <graph-location>data/graph-example-1</graph-location>
        <graph-storage>graphson</graph-storage>
        <extensions>
            <allows>
                <allow>tp:gremlin</allow>
            </allows>
        </extensions>
    </graph>

rexpro-python's People

Contributors

aolieman avatar ashald avatar bdeggleston avatar corbinbs avatar nvie avatar timludwinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rexpro-python's Issues

Connection Pooling

Connection Pooling would be helpful. Would be ideal if green-thread friendly - considering using the gevent library

IncompleteRexProRequestException: Message envelope is incomplete

I get a ton of these in titan-server-0.4.4/log/rextitan.log:

Grizzly(3)] WARN com.tinkerpop.rexster.protocol.filter.RexProServerFilter - com.tinkerpop.rexster.protocol.server.IncompleteRexProRequestException: Message envelope is incomplete. Message length set to 4617 but the buffer only contains 1448

I assume it belongs here since I'm using rexpro-python (0.3.3) on the client to submit requests to the server where I'm seeing these.

Unit test without full titan server?

Howdy,

Is it possible to run unit tests without actually having a full titan server? I was thinking about a way to run an embedded rexster server, with an in-memory TinkerGraph for unit testing, have you ever considered this?

Thanks

Missing import: six

I'm getting an error after upgrading to the latest version (0.1.2) about a missing module: six

Here is a simple log of what's happening:

C:\temp\test> virtualenv _env
New python executable in _env\Scripts\python.exe
Installing setuptools, pip...done.
C:\temp\test> .\_env\Scripts\activate.ps1
(_env) C:\temp\test> pip install rexpro
Downloading/unpacking rexpro
  Downloading rexpro-0.1.2.tar.gz
  Running setup.py (path:C:\temp\test\_env\build\rexpro\setup.py) egg_info for package rexpro
    C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'extra_requires'
      warnings.warn(msg)

Downloading/unpacking msgpack-python (from rexpro)
  Running setup.py (path:C:\temp\test\_env\build\msgpack-python\setup.py) egg_info for package msgpack-python

Installing collected packages: rexpro, msgpack-python
  Running setup.py install for rexpro
    C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'extra_requires'
      warnings.warn(msg)

  Running setup.py install for msgpack-python
    building 'msgpack._packer' extension
    WARNING: Failed to compile extensiom modules.
    msgpack uses fallback pure python implementation.
    Unable to find vcvarsall.bat
    building 'msgpack._unpacker' extension
    WARNING: Failed to compile extensiom modules.
    msgpack uses fallback pure python implementation.
    Unable to find vcvarsall.bat

Successfully installed rexpro msgpack-python
Cleaning up...
(_env) C:\temp\test> pip list
msgpack-python (0.4.2)
pip (1.5.4)
rexpro (0.1.2)
setuptools (2.2)
(_env) C:\temp\test> python
Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from rexpro import RexProConnection
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\temp\test\_env\lib\site-packages\rexpro\__init__.py", line 4, in <module>
    from rexpro.connection import RexProConnection
  File "C:\temp\test\_env\lib\site-packages\rexpro\connection.py", line 2, in <module>
    from rexpro.messages import ErrorResponse
  File "C:\temp\test\_env\lib\site-packages\rexpro\messages.py", line 12, in <module>
    from rexpro._compat import string_types, integer_types, float_types, array_types
  File "C:\temp\test\_env\lib\site-packages\rexpro\_compat.py", line 2, in <module>
    import six
ImportError: No module named six
>>>

Polling for features unnecessarily

Hi,

We noticed that the rexpro client was frequently polling for features (g.getFeatures().toMap()). We saw it executing this query in rexpro/connectors/base.py when a new session is created, but nothing ever uses the result. Can this be removed? We deleted it in our fork and everything seems to be working.

Adam

Possible msgpack issues

Hello,

Please be aware that a new version of msgpack-python was released yesterday. There is a serious bug between this new version of msgpack and rexpro-python that revolves around casting params as long (ex: param: 1234567890L) . It is not yet clear what the packed buffer contains, however, Rexster seems to evaluate the deserialized param as null.

I have filed bug msgpack/msgpack-python#169 but it is unclear wether it will be fixed.

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.