Neo4j API explanation for Python - python

Does anybody knows where can I find a document of the Neo4j API for Python?
I'm newbie and I'm looking for a document with the list of methods and properties and the explanation of each one, or something similar.
I'm using the Neo4j Community Edition (well in fact I'm using the embedded Neo4j database in Python).
At same time I'm trying to use neoclipse to see the graph,... but sometimes the graph don't reflect the changes that I've made.

I've found myself in a similar situation, and after reading the source code of python-embedded in github, I did realize that in the examples that they show, it's almost everything that you could make in a different way from python, if you take a look to the code, they are just light wrappers to be able to use neo4j in a more "pythonic" manner and lifting all the burden that represent to connect to the java classes, but in the long run, if you want to get all the information, you need to read some of javadocs of the native api. In my impression this is one of those projects that you contribute more documentation and code, not look for something more.
By the way the new release 1.6 is already on github, which include a convenient wrapper to use cypher from python-embedded GraphDatabase.query, not just indexes and traversals.

The documentation for the latest version of neo4j can be found here:
http://docs.neo4j.org/chunked/milestone/
Docs on the python bindings specifically can be found here:
http://docs.neo4j.org/chunked/milestone/python-embedded.html

Related

What is PEP-249?

Are PEP-249 "rules" that Python database modules (eg psycopg) should follow?
Is PEP-249 not any Python code, class or something that can be "touchable", or something that is already (natively) inside Python itself?
Is PEP-249 a basis for the database modules that will be used by the Python language?
Taken from PEP-249 introduction:
This API has been defined to encourage similarity between the Python modules that are used to access databases. By doing this, we hope to achieve a consistency leading to more easily understood modules, code that is generally more portable across databases, and a broader reach of database connectivity from Python.
PEPs, i.e. Python Enhancement Proposals, are just that: proposals (see PEP-1). In this case, it's a proposal of a standard, "canonical" API design for database libraries. It isn't necessarily a "law of the land", but rather a reference for people who build such APIs.
The community has come together, decided that it might be a good idea to come up with something common, and put it up as a PEP. The PEP got accepted, and now it will be seen as a kind of a standard.
Whether or not this standard is followed is in the hands of the maintainers of each particular library. It's all a matter of agreement between developers.

login to obiee and execute SQL using python

I've tried various ways of extracting reports from Oracle Business Intelligence (not hosted locally, version 11g), and the best I've come up with so far is the pyobiee library here, which is pretty good: https://github.com/kazei92/pyobiee. I've managed to login and extract reports that I've already written, but in an ideal world I would be able to interrogate the SQL directly. I've tried this using the executeSQL function in pyobiee, but I can only manage to extract a column or two and then it can't do any more. I think I'm limited by my understanding of the SQL syntax which is not a familiar one (it's more logical, no GROUP BY requirement), and I can't find a decent summary of how to use it. Where I have found summaries, I've followed them and it doesn't work (https://docs.oracle.com/middleware/12212/biee/BIESQ/toc.htm#BIESQ102). Please can you advise where I can find a better summary of the logical SQL syntax? The other possibility is that there is something wrong with the pyobiee library (hasn't been maintained since August). I would be open to using pyodbc or cx_Oracle instead, but I can't work out how to login using these routes. Please can you advise?
The reason I'm taking this route is because my organisation has mapping tables that are not held in obiee and there is no prospect of getting them in there. So I'm working on extracting using python so that I can add the mapping tables in SQL server.
I advise you to rethink what you are doing. First of all the python is a wrapper around the OBI web services which in itself isn't wrong, but an additional layer of abstraction which hides most of the web services and functionalities. There are way more than three...
Second - the real question is "What exactly are you trying top achieve?". If you simply want data from the OBI server, then you can just as well get that over ODBC. No need for 50 additional technologies in the middle.
As far as LSQL is concerned: Yes, there is a reference: https://docs.oracle.com/middleware/12212/biee/BIESQ/BIESQ.pdf
BUT you will definitely need to know what you want to access since what's governing things is the RPD. A metadata layer. Not a database.

Betfair Python API

My answer is quite specific to the Betfair API however I would like to know how to use more APIs in general. I'm quite new to this sort of thing so don't really know how it works. I've just downloaded this package: https://github.com/jmcarp/betfair.py
My question is, how am I supposed to know the functions that come associated with it? How am I supposed to be able to know how to pull the data that I want from any given website without having any resource describing the functionality of the API?
These library is only a binding (with several errors) to Betfair APIs.
You can find documentation about this API, and therefore about this library, in Developer's web.
If you're interested in how to use Betfair APIs in Python you can take a look at Betfair's code samples.

How to get a list of InputMethods supported by iBus engine?

I have a simple vim plugin that allows son very basic manipulation of iBus engines and input methods within vim. See here for details.
To complete the plugin I need a way to obtain a list of supported InputMethods for the currently set iBus engine. For example the mozc engine has Hiragana, Katakana, Latin, WideLatin and Direct. I would like to be able to get this list using Python but I am unable to find out examples or documentation on how.
Also I need a way to find out what is the current active InputMethod but this also have proved to be a difficult task. Mostly due to lack of documentations or examples.
Any tips on how to accomplish these two tasks would be greatly appreciated.

Does one often use libraries outside the standard ones?

I am trying to learn Python and referencing the documentation for the standard Python library from the Python website, and I was wondering if this was really the only library and documentation I will need or is there more? I do not plan to program advanced 3d graphics or anything advanced at the moment.
Edit:
Thanks very much for the responses, they were very useful. My problem is where to start on a script I have been thinking of. I want to write a script that converts images into a web format but I am not completely sure where to begin. Thanks for any more help you can provide.
For the basics, yes, the standard Python library is probably all you'll need. But as you continue programming in Python, eventually you will need some other library for some task -- for instance, I recently needed to generate a tone at a specific, but differing, frequency for an application, and pyAudiere did the job just right.
A lot of the other libraries out there generate their documentation differently from the core Python style -- it's just visually different, the content is the same. Some only have docstrings, and you'll be best off reading them in a console, perhaps.
Regardless of how the other documentation is generated, get used to looking through the Python APIs to find the functions/classes/methods you need. When the time comes for you to use non-core libraries, you'll know what you want to do, but you'll have to find how to do it.
For the future, it wouldn't hurt to be familiar with C, either. There's a number of Python libraries that are actually just wrappers around C libraries, and the documentation for the Python libraries is just the same as the documentation for the C libraries. PyOpenGL comes to mind, but it's been a while since I've personally used it.
As others have said, it depends on what you're into. The package index at http://pypi.python.org/pypi/ has categories and summaries that are helpful in seeing what other libraries are available for different purposes. (Select "Browse packages" on the left to see the categories.)
One very common library, that should also fit your current needs, is the Python Image Library (PIL).
Note: the latest version is still in beta, and available only at Effbot site.
If you're just beginning, all you'll need to know is the stuff you can get from the Python website. Failing that a quick Google is the fastest way to get (most) Python answers these days.
As you develop your skills and become more advanced, you'll start looking for more exciting things to do, at which point you'll naturally start coming across other libraries (for example, pygame) that you can use for your more advanced projects.
It's very hard to answer this without knowing what you're planning on using Python for. I recommend Dive Into Python as a useful resource for learning Python.
In terms of popular third party frameworks, for web applications there's the Django framework and associated documentation, network stuff there's Twisted ... the list goes on. It really depends on what you're hoping to do!
Assuming that the standard library doesn't provide what we need and we don't have the time, or the knowledge, to implement the code we reuse 3rd party libraries.
This is a common attitude regardless of the programming language.
If there's a chance that someone else ever wanted to do what you want to do, there's a chance that someone created a library for it. A few minutes Googling something like "python image library" will find you what you need, or let you know that someone hasn't created a library for your purposes.

Categories