graphxr-database-proxy 1.0.2__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/LICENSE +20 -20
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/MANIFEST.in +27 -27
- {graphxr_database_proxy-1.0.2/src/graphxr_database_proxy.egg-info → graphxr_database_proxy-1.0.3}/PKG-INFO +209 -208
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/README.md +163 -163
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/README.zh.md +150 -150
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/doc/API_Reference.md +492 -492
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/doc/DEV_GUIDE.md +79 -74
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/doc/DEV_GUIDE.zh.md +82 -75
- graphxr_database_proxy-1.0.3/doc/DOCKER_PUBLISHING.md +18 -0
- graphxr_database_proxy-1.0.3/doc/DOCKER_PUBLISHING.zh.md +22 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/doc/FRONTEND_INTEGRATION.zh.md +182 -182
- graphxr_database_proxy-1.0.3/doc/PYPI_PUBLISHING.md +302 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/doc/PYPI_PUBLISHING.zh.md +261 -360
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/doc/USAGE.md +247 -193
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/doc/USAGE.zh.md +203 -203
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/examples/auth_methods_example.py +295 -295
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/examples/env_variables_example.py +301 -301
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/examples/future_database_support.py +221 -221
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/examples/get_project_apis_example.py +238 -238
- graphxr_database_proxy-1.0.3/examples/google_adc.py +166 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/examples/python_api_example.py +293 -293
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/examples/quick_start.py +126 -126
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/pyproject.toml +87 -86
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/requirements.txt +9 -9
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/setup.cfg +4 -4
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/__init__.py +15 -15
- graphxr_database_proxy-1.0.3/src/graphxr_database_proxy/api/auth.py +50 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/api/database.py +273 -265
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/api/google.py +468 -460
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/api/projects.py +104 -98
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/common/util.py +47 -47
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/drivers/base.py +55 -55
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/drivers/factory.py +35 -35
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/drivers/spanner.py +870 -870
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/launcher.py +63 -63
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/main.py +122 -122
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/models/google.py +49 -49
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/models/project.py +486 -486
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/proxy.py +536 -536
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/proxyForDev.py +289 -289
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/services/project_service.py +149 -149
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3/src/graphxr_database_proxy.egg-info}/PKG-INFO +209 -208
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy.egg-info/SOURCES.txt +6 -10
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy.egg-info/requires.txt +1 -0
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/favicon.ico +0 -0
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/index.html +0 -1
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/main.7391ee9773c403483393.css +0 -175
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/main.7391ee9773c403483393.css.map +0 -1
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/main.e566ea8f459c5b8df2b4.js +0 -2
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/main.e566ea8f459c5b8df2b4.js.map +0 -1
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/vendors.f303e096f3b6701f9410.js +0 -3
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/vendors.f303e096f3b6701f9410.js.LICENSE.txt +0 -95
- graphxr_database_proxy-1.0.2/src/graphxr_database_proxy/static/vendors.f303e096f3b6701f9410.js.map +0 -1
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/api/__init__.py +0 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/drivers/__init__.py +0 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/models/__init__.py +0 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy/services/__init__.py +0 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy.egg-info/dependency_links.txt +0 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy.egg-info/entry_points.txt +0 -0
- {graphxr_database_proxy-1.0.2 → graphxr_database_proxy-1.0.3}/src/graphxr_database_proxy.egg-info/top_level.txt +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Kineviz
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kineviz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# 包含静态文件
|
|
2
|
-
recursive-include src/graphxr_database_proxy/static *
|
|
3
|
-
|
|
4
|
-
# 包含文档文件
|
|
5
|
-
include README.md
|
|
6
|
-
include LICENSE
|
|
7
|
-
include *.md
|
|
8
|
-
|
|
9
|
-
# 包含配置文件
|
|
10
|
-
include pyproject.toml
|
|
11
|
-
include requirements.txt
|
|
12
|
-
|
|
13
|
-
# 包含示例和文档
|
|
14
|
-
recursive-include examples *.py
|
|
15
|
-
recursive-include doc *.md
|
|
16
|
-
|
|
17
|
-
# 排除不需要的文件
|
|
18
|
-
global-exclude *.pyc
|
|
19
|
-
global-exclude *.pyo
|
|
20
|
-
global-exclude *~
|
|
21
|
-
global-exclude .git*
|
|
22
|
-
global-exclude .env*
|
|
23
|
-
prune .venv
|
|
24
|
-
prune __pycache__
|
|
25
|
-
prune .pytest_cache
|
|
26
|
-
prune node_modules
|
|
27
|
-
prune frontend/node_modules
|
|
1
|
+
# 包含静态文件
|
|
2
|
+
recursive-include src/graphxr_database_proxy/static *
|
|
3
|
+
|
|
4
|
+
# 包含文档文件
|
|
5
|
+
include README.md
|
|
6
|
+
include LICENSE
|
|
7
|
+
include *.md
|
|
8
|
+
|
|
9
|
+
# 包含配置文件
|
|
10
|
+
include pyproject.toml
|
|
11
|
+
include requirements.txt
|
|
12
|
+
|
|
13
|
+
# 包含示例和文档
|
|
14
|
+
recursive-include examples *.py
|
|
15
|
+
recursive-include doc *.md
|
|
16
|
+
|
|
17
|
+
# 排除不需要的文件
|
|
18
|
+
global-exclude *.pyc
|
|
19
|
+
global-exclude *.pyo
|
|
20
|
+
global-exclude *~
|
|
21
|
+
global-exclude .git*
|
|
22
|
+
global-exclude .env*
|
|
23
|
+
prune .venv
|
|
24
|
+
prune __pycache__
|
|
25
|
+
prune .pytest_cache
|
|
26
|
+
prune node_modules
|
|
27
|
+
prune frontend/node_modules
|
|
28
28
|
prune frontend/.webpack-cache
|
|
@@ -1,208 +1,209 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: graphxr-database-proxy
|
|
3
|
-
Version: 1.0.
|
|
4
|
-
Summary: GraphXR Database Proxy - Secure middleware for connecting GraphXR to databases
|
|
5
|
-
Author-email: Sean Li <sean@kineviz.com>, Kineviz <support@kineviz.com>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/Kineviz/graphxr-database-proxy
|
|
8
|
-
Project-URL: Documentation, https://docs.kineviz.com/graphxr-database-proxy
|
|
9
|
-
Project-URL: Repository, https://github.com/Kineviz/graphxr-database-proxy
|
|
10
|
-
Project-URL: Bug Tracker, https://github.com/Kineviz/graphxr-database-proxy/issues
|
|
11
|
-
Classifier: Development Status :: 4 - Beta
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Requires-Python: >=3.8
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE
|
|
21
|
-
Requires-Dist: fastapi>=0.104.0
|
|
22
|
-
Requires-Dist: uvicorn[standard]>=0.24.0
|
|
23
|
-
Requires-Dist: pydantic>=2.0.0
|
|
24
|
-
Requires-Dist: python-multipart>=0.0.6
|
|
25
|
-
Requires-Dist: google-cloud-spanner>=3.40.0
|
|
26
|
-
Requires-Dist: google-
|
|
27
|
-
Requires-Dist: google-auth>=
|
|
28
|
-
Requires-Dist:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Requires-Dist: pytest
|
|
35
|
-
Requires-Dist: pytest-
|
|
36
|
-
Requires-Dist:
|
|
37
|
-
Requires-Dist:
|
|
38
|
-
Requires-Dist:
|
|
39
|
-
Requires-Dist:
|
|
40
|
-
Requires-Dist:
|
|
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
|
-
uv pip install -
|
|
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
|
-
uv pip install -
|
|
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
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: graphxr-database-proxy
|
|
3
|
+
Version: 1.0.3
|
|
4
|
+
Summary: GraphXR Database Proxy - Secure middleware for connecting GraphXR to databases
|
|
5
|
+
Author-email: Sean Li <sean@kineviz.com>, Kineviz <support@kineviz.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Kineviz/graphxr-database-proxy
|
|
8
|
+
Project-URL: Documentation, https://docs.kineviz.com/graphxr-database-proxy
|
|
9
|
+
Project-URL: Repository, https://github.com/Kineviz/graphxr-database-proxy
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/Kineviz/graphxr-database-proxy/issues
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Requires-Python: >=3.8
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: fastapi>=0.104.0
|
|
22
|
+
Requires-Dist: uvicorn[standard]>=0.24.0
|
|
23
|
+
Requires-Dist: pydantic>=2.0.0
|
|
24
|
+
Requires-Dist: python-multipart>=0.0.6
|
|
25
|
+
Requires-Dist: google-cloud-spanner>=3.40.0
|
|
26
|
+
Requires-Dist: google-cloud-resource-manager>=1.10.0
|
|
27
|
+
Requires-Dist: google-auth-oauthlib>=1.0.0
|
|
28
|
+
Requires-Dist: google-auth>=2.0.0
|
|
29
|
+
Requires-Dist: aiofiles>=23.0.0
|
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
|
31
|
+
Provides-Extra: ui
|
|
32
|
+
Requires-Dist: aiofiles>=23.0.0; extra == "ui"
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
35
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
37
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
38
|
+
Requires-Dist: isort>=5.12.0; extra == "dev"
|
|
39
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: mypy>=1.5.0; extra == "dev"
|
|
41
|
+
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
42
|
+
Provides-Extra: all
|
|
43
|
+
Requires-Dist: graphxr-database-proxy[dev,ui]; extra == "all"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# GraphXR Database Proxy
|
|
47
|
+
|
|
48
|
+
[](LICENSE)
|
|
49
|
+
[](https://python.org)
|
|
50
|
+
[](https://fastapi.tiangolo.com)
|
|
51
|
+
|
|
52
|
+
> **Language**: [English](https://github.com/Kineviz/graphxr-database-proxy/blob/main/readme.md) | [中文](https://github.com/Kineviz/graphxr-database-proxy/blob/main/readme.zh.md)
|
|
53
|
+
|
|
54
|
+
A secure middleware that connects [GraphXR](https://www.kineviz.com/graphxr) to various backend databases with zero trust architecture.
|
|
55
|
+
|
|
56
|
+
## Features
|
|
57
|
+
|
|
58
|
+
- **Zero Trust Security**: Strict authentication and authorization at the proxy layer
|
|
59
|
+
- **Direct Browser Connectivity**: REST/GraphQL APIs for efficient data access
|
|
60
|
+
- **Multi-Database Support**: Spanner Graph, Neo4j, and more
|
|
61
|
+
- **Open Source**: Fully auditable and customizable
|
|
62
|
+
- **Pure Python**: Easy to deploy and maintain
|
|
63
|
+
|
|
64
|
+
## ⚡ Quick Start for Spanner Graph
|
|
65
|
+
|
|
66
|
+
1. Run the following commands to start graphxr-database-proxy (requires [uv](https://docs.astral.sh/uv/), [node.js](https://nodejs.org/en/download/))
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
git clone https://github.com/Kineviz/graphxr-database-proxy.git
|
|
70
|
+
cd graphxr-database-proxy
|
|
71
|
+
uv venv
|
|
72
|
+
source .venv/bin/activate # or .venv/bin/activate on Windows
|
|
73
|
+
uv pip install -e ".[ui]"
|
|
74
|
+
uv pip install -r requirements.txt
|
|
75
|
+
cd frontend && npm install && npm run build && cd -
|
|
76
|
+
graphxr-proxy --ui
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
2. Visit http://localhost:9080/
|
|
80
|
+
3. Click "Create New Project"
|
|
81
|
+
4. Project Name: "Test"
|
|
82
|
+
5. Database Type: "Google Cloud Spanner"
|
|
83
|
+
6. Authentication Type: "Service Account"
|
|
84
|
+
7. Upload the credential file you exported from GCP Console or gcloud CLI. [Export Instructions](https://github.com/Kineviz/try-graphxr-spannergraph#)
|
|
85
|
+
8. Select "Instance ID" e.g. "demo"
|
|
86
|
+
9. Select "Database ID" e.g. "cymbal"
|
|
87
|
+
10. Select "Property Graph" e.g. "ECommerceGraph"
|
|
88
|
+
11. Click "Create"
|
|
89
|
+
12. For the new project, under Actions, copy the API URL. e.g. "http://localhost:9080/api/spanner/Test"
|
|
90
|
+
13. Go back to GraphXR's Create Project wizard and paste the API URL into GraphXR for a project with a "Database Proxy" database type.
|
|
91
|
+
|
|
92
|
+
## Other ways to start graphxr-database-proxy
|
|
93
|
+
|
|
94
|
+
### Install
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Install from PyPI
|
|
98
|
+
pip install graphxr-database-proxy[ui]
|
|
99
|
+
|
|
100
|
+
# Or from source
|
|
101
|
+
git clone https://github.com/Kineviz/graphxr-database-proxy.git
|
|
102
|
+
cd graphxr-database-proxy
|
|
103
|
+
uv venv
|
|
104
|
+
source .venv/bin/activate # or .venv/bin/activate on Windows
|
|
105
|
+
uv pip install -e ".[ui]"
|
|
106
|
+
uv pip install -r requirements.txt
|
|
107
|
+
cd frontend && npm install && npm run build && cd -
|
|
108
|
+
pip install -e .[ui]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Configure & Run
|
|
112
|
+
|
|
113
|
+
**Option 1: Web UI (Recommended)**
|
|
114
|
+
```bash
|
|
115
|
+
graphxr-proxy --ui
|
|
116
|
+
```
|
|
117
|
+
> Open http://localhost:9080/admin for configuration
|
|
118
|
+
|
|
119
|
+
**Option 2: Python Code with Service Account JSON**
|
|
120
|
+
```python
|
|
121
|
+
from graphxr_database_proxy import DatabaseProxy
|
|
122
|
+
|
|
123
|
+
proxy = DatabaseProxy()
|
|
124
|
+
|
|
125
|
+
service_account_json = {
|
|
126
|
+
"type": "service_account",
|
|
127
|
+
"project_id": "your-gcp-project-id",
|
|
128
|
+
"private_key": "-----BEGIN PRIVATE KEY-----\\n...\\n-----END PRIVATE KEY-----\\n",
|
|
129
|
+
"client_email": "your-service-account@your-gcp-project-id.iam.gserviceaccount.com",
|
|
130
|
+
...
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
project_id = proxy.add_project(
|
|
134
|
+
project_name="project_name",
|
|
135
|
+
database_type="spanner",
|
|
136
|
+
project_id="gcp-project-id",
|
|
137
|
+
instance_id="spanner-instance-id",
|
|
138
|
+
database_id="spanner-database-id",
|
|
139
|
+
credentials=service_account_json,
|
|
140
|
+
graph_name="graph_name" # Optional
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
proxy.start(
|
|
144
|
+
host="0.0.0.0",
|
|
145
|
+
port=9080,
|
|
146
|
+
show_apis=True
|
|
147
|
+
)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Option 3: Python Code with Google Cloud ADC**
|
|
151
|
+
> Your should have set up Google Application Default Credentials (ADC) on the machine running the proxy. See [Google Cloud ADC Documentation](https://cloud.google.com/docs/authentication/production#automatically).
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
from graphxr_database_proxy import DatabaseProxy
|
|
155
|
+
proxy = DatabaseProxy()
|
|
156
|
+
|
|
157
|
+
google_adc_credentials={
|
|
158
|
+
"type": "google_ADC"
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
project_id = proxy.add_project(
|
|
162
|
+
project_name="project_name",
|
|
163
|
+
database_type="spanner",
|
|
164
|
+
project_id="gcp-project-id",
|
|
165
|
+
instance_id="spanner-instance-id",
|
|
166
|
+
database_id="spanner-database-id",
|
|
167
|
+
credentials=google_adc_credentials,
|
|
168
|
+
graph_name="graph_name" # Optional
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
proxy.start(
|
|
172
|
+
host="0.0.0.0",
|
|
173
|
+
port=9080,
|
|
174
|
+
show_apis=True
|
|
175
|
+
)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## 🐳 Docker
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
docker run -d -p 9080:9080 \
|
|
182
|
+
--name graphxr-database-proxy \
|
|
183
|
+
-v ${HOME}/graphxr-database-proxy/config:/app/config \
|
|
184
|
+
kineviz/graphxr-database-proxy:latest
|
|
185
|
+
```
|
|
186
|
+
> You can visit http://localhost:9080/admin for configuration after starting the container.
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## 🤝 Contributing
|
|
191
|
+
|
|
192
|
+
1. Fork the repository
|
|
193
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
194
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
195
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
196
|
+
5. Open a Pull Request
|
|
197
|
+
|
|
198
|
+
## 📄 License
|
|
199
|
+
|
|
200
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
201
|
+
|
|
202
|
+
## 🆘 Support
|
|
203
|
+
|
|
204
|
+
- 🐛 [Issue Tracker](https://github.com/Kineviz/graphxr-database-proxy/issues)
|
|
205
|
+
- 📧 Email: support@kineviz.com
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
**Built with ❤️ by [Kineviz](https://www.kineviz.com)**
|