db.neo4j
Module contains class and utility functions to manage interactions with Neo4J database.
Neo4J
Class for managing interaction with Neo4J database.
Attributes:
Name | Type | Description |
---|---|---|
neo4j_url |
str
|
URL for connecting to Neo4j |
neo4j_username |
str
|
Username for Neo4j database |
neo4j_password |
str
|
Password for Neo4j database |
use_env |
bool
|
True if above info are to be collected from env file. |
driver |
GraphDatabase.driver
|
Neo4J driver instance |
Source code in erad\db\neo4j_.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
__init__(neo4j_url=None, neo4j_username=None, neo4j_password=None)
Constructor for Neo4J class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
neo4j_url |
str
|
URL for connecting to Neo4j |
None
|
neo4j_username |
str
|
Username for Neo4j database |
None
|
neo4j_password |
str
|
Password for Neo4j database |
None
|
Source code in erad\db\neo4j_.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
close_driver()
Method to close the driver.
Source code in erad\db\neo4j_.py
160 161 162 |
|
rename_labels(label)
staticmethod
Method to replace the invalid character.
Source code in erad\db\neo4j_.py
78 79 80 81 82 83 84 85 |
|