Coder Social home page Coder Social logo

iorient's Introduction

iorient

Package Description

IOrient is an IPython extension for running queries against an OrientDB graph database within IPython using OrientDB's SQL dialect and Gremlin.

Latest Version Downloads

Installation

The package may be installed as follows:

pip install iorient

After installation, the extension may be loaded within an IPython session with

%load_ext iorient

Usage Examples

Set user name, password, server host, and database name:

%orient user:passwd@localhost/dbname

Same as above, but also specify the port:

%orient user:passwd@localhost:2424/dbname

Multiple connections to different databases may be opened. Once a connection has been established, it can be used by specifying its user, server, and database name:

%%orient user@server/dbname
SELECT * FROM V

One can also execute Gremlin queries using the -g option:

%orient -g g.V[0]

Several special commands similar to those provided by the OrientDB console are also available:

%orient create database foobar memory graph
%orient drop database foobar
%orient disconnect
%orient current database
%orient current server
%orient list classes
%orient list databases

Once at least one connection has been opened, specifying a query without a connection string will use the last used connection:

%orient SELECT * FROM V

To display query results in JSON format results using Python's pprint module rather than return them, use the -j option:

%orient -j SELECT * FROM V

One can also print the results in tabular format with a maximum field width:

%orient -t 100 SELECT * FROM V

Results of a query can also be viewed in a similar manner with the %oview command:

r = %orient SELECT * FROM V
%oview -j r
%oview -t 100 r

Development

The latest release of the package may be obtained from GitHub.

Author

See the included AUTHORS.rst file for more information.

License

This software is licensed under the BSD License. See the included LICENSE.rst file for more information.

iorient's People

Contributors

lebedov avatar mdaparte avatar

Watchers

James Cloos avatar  avatar

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.