Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lebedov/iorient
Access OrientDB via IPython
https://github.com/lebedov/iorient
ipython orientdb python
Last synced: 9 days ago
JSON representation
Access OrientDB via IPython
- Host: GitHub
- URL: https://github.com/lebedov/iorient
- Owner: lebedov
- License: other
- Created: 2015-07-23T15:15:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-17T13:19:20.000Z (almost 7 years ago)
- Last Synced: 2024-10-13T03:48:43.855Z (23 days ago)
- Topics: ipython, orientdb, python
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 4
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.rst
Awesome Lists containing this project
README
.. -*- rst -*-
.. image:: https://raw.githubusercontent.com/lebedov/iorient/master/iorient.png
:alt: iorientPackage Description
-------------------
IOrient is an IPython extension for running queries against an `OrientDB
`_ graph database within IPython using OrientDB's SQL
dialect and `Gremlin `_... image:: https://img.shields.io/pypi/v/iorient.svg
:target: https://pypi.python.org/pypi/iorient
:alt: Latest VersionInstallation
------------
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 VOne 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 databasesOnce 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 rDevelopment
-----------
The latest release of the package may be obtained from
`GitHub `_.Author
------
See the included `AUTHORS.rst`_ file for more information... _AUTHORS.rst: AUTHORS.rst
License
-------
This software is licensed under the
`BSD License `_.
See the included `LICENSE.rst`_ file for more information... _LICENSE.rst: LICENSE.rst