Database Reference
In-Depth Information
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /path/to/your/workspace/practicalneo4j-python/app/adapter.wsgi
Alias /css/ /path/to/your/workspace/practicalneo4j-python/app/public/css/
Alias /fonts/ /path/to/your/workspace/practicalneo4j-python/app/public/fonts/
Alias /img/ /path/to/your/workspace/practicalneo4j-python/app/public/img/
Alias /js/ /path/to/your/workspace/practicalneo4j-python/app/public/js/
<Directory /path/to/your/workspace/practicalneo4j-python/app/bottle>
Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /path/to/your/workspace/practicalneo4j-python/app/logs/error.log
LogLevel warn
</VirtualHost>
Py2neo
This section covers basic operations and usage of the Py2neo library with the goal of understanding the library before
implementing it within an application. The next section of this chapter will walk you through a sample application
with specific graph goals and models.
Like most of the language drivers and libraries available for Neo4j, the purpose of Py2neo is to provide a degree of
abstraction over the Neo4j REST API. In addition, the Py2neo API provides some additional enhancements that might
otherwise be required at some other stage in the development of your Python application, such as caching.
Py2neo is maintained by the super-awesome Nigel Small and supported by a number of great Python
graphistas. If you would like to get involved with Py2neo, go to https://github.com/nigelsmall/py2neo .
Note
Each of the following brief sections covers concepts that tie either directly or indirectly to features and
functionality found within the Neo4j Server and REST API. If you choose to go through each language chapter, then
you should notice how each library covers those features and functionality in similar ways but takes advantage of the
language-specific capabilities to ensure the API is flexible and performant.
Managing Nodes and Relationships
Chapters 1 and 2 covered the elements of a graph database, which includes the most basic of graph concepts: the
node. Managing nodes and their properties and relationships will probably account for the bulk of your application's
graph-related code.
Creating a Node
The maintenance of nodes is set in motion with the creation process, as shown in Listing 9-3. Creating a node begins
with setting up a connection to the database and making the node instance. The node properties are set next, and
then the node can be saved to the database.
 
 
Search WWH ::




Custom Search