Building Web Applications with Python and Neo4j
eBook - ePub

Building Web Applications with Python and Neo4j

Sumit Gupta

Share book
  1. 184 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Building Web Applications with Python and Neo4j

Sumit Gupta

Book details
Book preview
Table of contents
Citations

About This Book

If you are a Python developer and want to expand your understanding of Python-based web applications over Neo4j graph data models, this is the book for you.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Building Web Applications with Python and Neo4j an online PDF/ePUB?
Yes, you can access Building Web Applications with Python and Neo4j by Sumit Gupta in PDF and/or ePUB format, as well as other popular books in Informatique & Programmation en Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781783983988

Building Web Applications with Python and Neo4j


Table of Contents

Building Web Applications with Python and Neo4j
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Your First Query with Neo4j
Thinking in graphs for SQL developers
Comparing SQL and Cypher
Evolving graph structures from SQL models
Licensing and configuring – Neo4j
Licensing – Community Edition
Licensing – Enterprise Edition
Installing Neo4J Community Edition on Linux/Unix
Installing as a Linux tar / standalone application
Installing as a Linux service
Installing Neo4j Enterprise Edition on Unix/Linux
Using the Neo4j shell
Introducing the Neo4j REST interface
Authorization and authentication
CRUD operations
Running queries from the Neo4j browser
Summary
2. Querying the Graph with Cypher
Basic anatomy of a Cypher query
Brief details of Cypher
Cypher execution phases
Parsing, validating, and generating the execution plan
Locating the initial node(s)
Selecting and traversing the relationships
Changing and/or returning the values
The structure of Cypher
The read operations
MATCH
OPTIONAL MATCH
START
AGGREGATION
The create or update operations
Create
SET
MERGE
The delete operation
Pattern and pattern matching
Sample dataset
Pattern for nodes
Pattern for labels
Pattern for relationships
Pattern for properties
Using the where clause with patterns
Using patterns in the where clause
Using general clauses with patterns
The order by clause
The limit and skip clauses
The WITH clause
The UNION and UNION ALL clauses
Working with nodes and relationships
Summary
3. Mutating Graph with Cypher
Creating nodes and relationships
Working with nodes
Single node
Multiple nodes
Node with labels
Node with properties
Working with relationships
Single relationships
Multiple relationships
Relationships with properties
Nodes and relationships with full paths
Creating unique nodes and relationships
CREATE UNIQUE and MERGE
Working with constraints
Transforming nodes and relationships
Updating node properties
Updating a label
Updating relationships
Cypher query optimizations
Indexes
Index sampling
Understanding execution plans
Analyzing and optimizing queries
Summary
4. Getting Python and Neo4j to Talk Py2neo
Installing and configuring py2neo
Prerequisites
Installing py2neo
Exploring the py2neo APIs
Graph
Authentication
Node
Relationship
Cypher
Transactions
Paths
Creating a social network with py2neo
Batch imports
Unit testing
Summary
5. Build RESTful Service with Flask and Py2neo
Introducing (and installing) Flask
Setting up web applications with Flask and Flask-RESTful
Your first Flask application
Displaying static content
Displaying dynamic content
Your first Flask RESTful API
JSON processing
REST APIs for social network data using py2neo
ORM for graph databases py2neo – OGM
Social network application with Flask-RESTful and OGM
Creating object model
Creating REST APIs over data models
Summary
6. Using Neo4j with Django and Neomodel
Installing and configuring Neomodel
Declaring models and properties
Defining nodes
Defining properties
Persisting and querying a social data model
Adding relationships to models
Running Cypher queries
Using Neomodel in a Django app
Signals in Neomodel
Summary
7. Deploying Neo4j in Production
Neo4j logical architecture
Disk/filesystem
Record files
Transaction logs
Caches
Core Java API
Traversal framework
REST API
Neo4j physical architecture
High availability
Fault tolerance
Data replication and data locality
Advanced settings
Monitoring the health of the Neo4J nodes
Neo4j browser
Webadmin
JMX beans
Backup and recovery
Summary
Index

Building Web Applications with Python and Neo4j

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2015
Production reference: 1100715
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-398-8
www.packtpub.com

Credits

Author
Sumit Gupta
Reviewers
Adarsh Deshratnam
Gianluca Tiepolo
Tsanyo Tsanev
Manuel Vives
Commissioning Editor
Kunal Parikh
Acquisition Editor
Larissa Pinto
Content Development Editor
Anish Sukumaran
Technical Editors
Novina Kewalramani
Ryan Kochery
Manal Pednekar
Copy Editors
Vikrant Phadke
Alpha Singh
Project Coordinator
Izzat Contractor
Proofreader
Safis Editing
Indexer
Rekha Nair
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat

About the Author

Sumit Gupta is a seasoned professional, innovator, and technology evangelist, with over 100 months of experience in architecting, managing, and delivering en...

Table of contents