instackup 0.2.6__tar.gz → 0.4.0__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.
- instackup-0.4.0/.gitignore +310 -0
- instackup-0.4.0/LICENSE +21 -0
- instackup-0.4.0/PKG-INFO +211 -0
- instackup-0.4.0/README.md +151 -0
- instackup-0.4.0/docs/architecture.md +108 -0
- instackup-0.4.0/docs/bigquery_tools.md +585 -0
- instackup-0.4.0/docs/credentials.md +161 -0
- instackup-0.4.0/docs/gcloudstorage_tools.md +546 -0
- instackup-0.4.0/docs/general_tools.md +100 -0
- instackup-0.4.0/docs/gsheets_tools.md +151 -0
- instackup-0.4.0/docs/heroku_tools.md +54 -0
- instackup-0.4.0/docs/redshift_tools.md +476 -0
- instackup-0.4.0/docs/releasing.md +50 -0
- instackup-0.4.0/docs/s3_tools.md +351 -0
- instackup-0.4.0/docs/sql_tools.md +670 -0
- instackup-0.4.0/pyproject.toml +157 -0
- instackup-0.4.0/src/instackup/__init__.py +67 -0
- instackup-0.4.0/src/instackup/_aws.py +40 -0
- instackup-0.4.0/src/instackup/_google.py +69 -0
- instackup-0.4.0/src/instackup/_utils.py +37 -0
- instackup-0.4.0/src/instackup/_version.py +24 -0
- instackup-0.4.0/src/instackup/bigquery_tools.py +686 -0
- instackup-0.4.0/src/instackup/credentials.py +479 -0
- instackup-0.4.0/src/instackup/gcloudstorage_tools.py +386 -0
- instackup-0.4.0/src/instackup/general_tools.py +93 -0
- instackup-0.4.0/src/instackup/gsheets_tools.py +194 -0
- instackup-0.4.0/src/instackup/heroku_tools.py +48 -0
- instackup-0.4.0/src/instackup/redshift_tools.py +161 -0
- instackup-0.4.0/src/instackup/s3_tools.py +270 -0
- instackup-0.4.0/src/instackup/sql_tools.py +383 -0
- instackup-0.4.0/tests/conftest.py +56 -0
- instackup-0.4.0/tests/integration/__init__.py +0 -0
- instackup-0.4.0/tests/integration/test_sql_databases.py +117 -0
- instackup-0.4.0/tests/test_bigquery_tools.py +906 -0
- instackup-0.4.0/tests/test_credentials.py +285 -0
- instackup-0.4.0/tests/test_gcloudstorage_tools.py +717 -0
- instackup-0.4.0/tests/test_general_tools.py +116 -0
- instackup-0.4.0/tests/test_google_auth.py +246 -0
- instackup-0.4.0/tests/test_gsheets_tools.py +350 -0
- instackup-0.4.0/tests/test_heroku_tools.py +112 -0
- instackup-0.4.0/tests/test_package.py +44 -0
- instackup-0.4.0/tests/test_redshift_tools.py +158 -0
- instackup-0.4.0/tests/test_s3_tools.py +257 -0
- instackup-0.4.0/tests/test_sql_tools.py +341 -0
- instackup-0.2.6/PKG-INFO +0 -275
- instackup-0.2.6/README.md +0 -260
- instackup-0.2.6/instackup/bigquery_tools.py +0 -872
- instackup-0.2.6/instackup/gcloudstorage_tools.py +0 -488
- instackup-0.2.6/instackup/general_tools.py +0 -115
- instackup-0.2.6/instackup/gsheets_tools.py +0 -185
- instackup-0.2.6/instackup/heroku_tools.py +0 -58
- instackup-0.2.6/instackup/redshift_tools.py +0 -125
- instackup-0.2.6/instackup/s3_tools.py +0 -388
- instackup-0.2.6/instackup/sql_tools.py +0 -283
- instackup-0.2.6/instackup.egg-info/PKG-INFO +0 -275
- instackup-0.2.6/instackup.egg-info/SOURCES.txt +0 -18
- instackup-0.2.6/instackup.egg-info/dependency_links.txt +0 -1
- instackup-0.2.6/instackup.egg-info/requires.txt +0 -12
- instackup-0.2.6/instackup.egg-info/top_level.txt +0 -2
- instackup-0.2.6/setup.cfg +0 -4
- instackup-0.2.6/setup.py +0 -53
- instackup-0.2.6/test/test_general_tools.py +0 -173
- /instackup-0.2.6/instackup/__init__.py → /instackup-0.4.0/src/instackup/py.typed +0 -0
- {instackup-0.2.6/test → instackup-0.4.0/tests}/__init__.py +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# Created by https://www.gitignore.io/api/linux,macos,python,pycharm,windows,sublimetext
|
|
2
|
+
# Edit at https://www.gitignore.io/?templates=linux,macos,python,pycharm,windows,sublimetext
|
|
3
|
+
|
|
4
|
+
### Linux ###
|
|
5
|
+
*~
|
|
6
|
+
|
|
7
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
8
|
+
.fuse_hidden*
|
|
9
|
+
|
|
10
|
+
# KDE directory preferences
|
|
11
|
+
.directory
|
|
12
|
+
|
|
13
|
+
# Linux trash folder which might appear on any partition or disk
|
|
14
|
+
.Trash-*
|
|
15
|
+
|
|
16
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
17
|
+
.nfs*
|
|
18
|
+
|
|
19
|
+
### macOS ###
|
|
20
|
+
# General
|
|
21
|
+
.DS_Store
|
|
22
|
+
.AppleDouble
|
|
23
|
+
.LSOverride
|
|
24
|
+
|
|
25
|
+
# Icon must end with two \r
|
|
26
|
+
Icon
|
|
27
|
+
|
|
28
|
+
# Thumbnails
|
|
29
|
+
._*
|
|
30
|
+
|
|
31
|
+
# Files that might appear in the root of a volume
|
|
32
|
+
.DocumentRevisions-V100
|
|
33
|
+
.fseventsd
|
|
34
|
+
.Spotlight-V100
|
|
35
|
+
.TemporaryItems
|
|
36
|
+
.Trashes
|
|
37
|
+
.VolumeIcon.icns
|
|
38
|
+
.com.apple.timemachine.donotpresent
|
|
39
|
+
|
|
40
|
+
# Directories potentially created on remote AFP share
|
|
41
|
+
.AppleDB
|
|
42
|
+
.AppleDesktop
|
|
43
|
+
Network Trash Folder
|
|
44
|
+
Temporary Items
|
|
45
|
+
.apdisk
|
|
46
|
+
|
|
47
|
+
### PyCharm ###
|
|
48
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
|
49
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
50
|
+
|
|
51
|
+
# User-specific stuff
|
|
52
|
+
.idea/**/workspace.xml
|
|
53
|
+
.idea/**/tasks.xml
|
|
54
|
+
.idea/**/usage.statistics.xml
|
|
55
|
+
.idea/**/dictionaries
|
|
56
|
+
.idea/**/shelf
|
|
57
|
+
|
|
58
|
+
# Generated files
|
|
59
|
+
.idea/**/contentModel.xml
|
|
60
|
+
|
|
61
|
+
# Sensitive or high-churn files
|
|
62
|
+
.idea/**/dataSources/
|
|
63
|
+
.idea/**/dataSources.ids
|
|
64
|
+
.idea/**/dataSources.local.xml
|
|
65
|
+
.idea/**/sqlDataSources.xml
|
|
66
|
+
.idea/**/dynamic.xml
|
|
67
|
+
.idea/**/uiDesigner.xml
|
|
68
|
+
.idea/**/dbnavigator.xml
|
|
69
|
+
|
|
70
|
+
# Gradle
|
|
71
|
+
.idea/**/gradle.xml
|
|
72
|
+
.idea/**/libraries
|
|
73
|
+
|
|
74
|
+
# Gradle and Maven with auto-import
|
|
75
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
76
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
|
77
|
+
# auto-import.
|
|
78
|
+
# .idea/modules.xml
|
|
79
|
+
# .idea/*.iml
|
|
80
|
+
# .idea/modules
|
|
81
|
+
# *.iml
|
|
82
|
+
# *.ipr
|
|
83
|
+
|
|
84
|
+
# CMake
|
|
85
|
+
cmake-build-*/
|
|
86
|
+
|
|
87
|
+
# Mongo Explorer plugin
|
|
88
|
+
.idea/**/mongoSettings.xml
|
|
89
|
+
|
|
90
|
+
# File-based project format
|
|
91
|
+
*.iws
|
|
92
|
+
|
|
93
|
+
# IntelliJ
|
|
94
|
+
out/
|
|
95
|
+
|
|
96
|
+
# mpeltonen/sbt-idea plugin
|
|
97
|
+
.idea_modules/
|
|
98
|
+
|
|
99
|
+
# JIRA plugin
|
|
100
|
+
atlassian-ide-plugin.xml
|
|
101
|
+
|
|
102
|
+
# Cursive Clojure plugin
|
|
103
|
+
.idea/replstate.xml
|
|
104
|
+
|
|
105
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
106
|
+
com_crashlytics_export_strings.xml
|
|
107
|
+
crashlytics.properties
|
|
108
|
+
crashlytics-build.properties
|
|
109
|
+
fabric.properties
|
|
110
|
+
|
|
111
|
+
# Editor-based Rest Client
|
|
112
|
+
.idea/httpRequests
|
|
113
|
+
|
|
114
|
+
# Android studio 3.1+ serialized cache file
|
|
115
|
+
.idea/caches/build_file_checksums.ser
|
|
116
|
+
|
|
117
|
+
### PyCharm Patch ###
|
|
118
|
+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
|
119
|
+
|
|
120
|
+
# *.iml
|
|
121
|
+
# modules.xml
|
|
122
|
+
# .idea/misc.xml
|
|
123
|
+
# *.ipr
|
|
124
|
+
|
|
125
|
+
# Sonarlint plugin
|
|
126
|
+
.idea/**/sonarlint/
|
|
127
|
+
|
|
128
|
+
# SonarQube Plugin
|
|
129
|
+
.idea/**/sonarIssues.xml
|
|
130
|
+
|
|
131
|
+
# Markdown Navigator plugin
|
|
132
|
+
.idea/**/markdown-navigator.xml
|
|
133
|
+
.idea/**/markdown-navigator/
|
|
134
|
+
|
|
135
|
+
### Python ###
|
|
136
|
+
# Byte-compiled / optimized / DLL files
|
|
137
|
+
__pycache__/
|
|
138
|
+
*.py[cod]
|
|
139
|
+
*$py.class
|
|
140
|
+
|
|
141
|
+
# C extensions
|
|
142
|
+
*.so
|
|
143
|
+
|
|
144
|
+
# Distribution / packaging
|
|
145
|
+
.Python
|
|
146
|
+
build/
|
|
147
|
+
develop-eggs/
|
|
148
|
+
dist/
|
|
149
|
+
downloads/
|
|
150
|
+
eggs/
|
|
151
|
+
.eggs/
|
|
152
|
+
lib/
|
|
153
|
+
lib64/
|
|
154
|
+
parts/
|
|
155
|
+
sdist/
|
|
156
|
+
var/
|
|
157
|
+
wheels/
|
|
158
|
+
pip-wheel-metadata/
|
|
159
|
+
share/python-wheels/
|
|
160
|
+
*.egg-info/
|
|
161
|
+
.installed.cfg
|
|
162
|
+
*.egg
|
|
163
|
+
MANIFEST
|
|
164
|
+
|
|
165
|
+
# PyInstaller
|
|
166
|
+
# Usually these files are written by a python script from a template
|
|
167
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
168
|
+
*.manifest
|
|
169
|
+
*.spec
|
|
170
|
+
|
|
171
|
+
# Installer logs
|
|
172
|
+
pip-log.txt
|
|
173
|
+
pip-delete-this-directory.txt
|
|
174
|
+
|
|
175
|
+
# Unit test / coverage reports
|
|
176
|
+
htmlcov/
|
|
177
|
+
.tox/
|
|
178
|
+
.nox/
|
|
179
|
+
.coverage
|
|
180
|
+
.coverage.*
|
|
181
|
+
.cache
|
|
182
|
+
nosetests.xml
|
|
183
|
+
coverage.xml
|
|
184
|
+
*.cover
|
|
185
|
+
.hypothesis/
|
|
186
|
+
.pytest_cache/
|
|
187
|
+
|
|
188
|
+
# Translations
|
|
189
|
+
*.mo
|
|
190
|
+
*.pot
|
|
191
|
+
|
|
192
|
+
# Scrapy stuff:
|
|
193
|
+
.scrapy
|
|
194
|
+
|
|
195
|
+
# Sphinx documentation
|
|
196
|
+
docs/_build/
|
|
197
|
+
|
|
198
|
+
# PyBuilder
|
|
199
|
+
target/
|
|
200
|
+
|
|
201
|
+
# pyenv
|
|
202
|
+
.python-version
|
|
203
|
+
env/
|
|
204
|
+
venv/
|
|
205
|
+
|
|
206
|
+
# pipenv
|
|
207
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
208
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
209
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
210
|
+
# install all needed dependencies.
|
|
211
|
+
#Pipfile.lock
|
|
212
|
+
|
|
213
|
+
# celery beat schedule file
|
|
214
|
+
celerybeat-schedule
|
|
215
|
+
|
|
216
|
+
# SageMath parsed files
|
|
217
|
+
*.sage.py
|
|
218
|
+
|
|
219
|
+
# Spyder project settings
|
|
220
|
+
.spyderproject
|
|
221
|
+
.spyproject
|
|
222
|
+
|
|
223
|
+
# Rope project settings
|
|
224
|
+
.ropeproject
|
|
225
|
+
|
|
226
|
+
# Mr Developer
|
|
227
|
+
.mr.developer.cfg
|
|
228
|
+
.project
|
|
229
|
+
.pydevproject
|
|
230
|
+
|
|
231
|
+
# mkdocs documentation
|
|
232
|
+
/site
|
|
233
|
+
|
|
234
|
+
# mypy
|
|
235
|
+
.mypy_cache/
|
|
236
|
+
.dmypy.json
|
|
237
|
+
dmypy.json
|
|
238
|
+
|
|
239
|
+
# Pyre type checker
|
|
240
|
+
.pyre/
|
|
241
|
+
|
|
242
|
+
# Log files
|
|
243
|
+
logs/
|
|
244
|
+
*.log
|
|
245
|
+
|
|
246
|
+
### SublimeText ###
|
|
247
|
+
# Cache files for Sublime Text
|
|
248
|
+
*.tmlanguage.cache
|
|
249
|
+
*.tmPreferences.cache
|
|
250
|
+
*.stTheme.cache
|
|
251
|
+
|
|
252
|
+
# Workspace files are user-specific
|
|
253
|
+
*.sublime-workspace
|
|
254
|
+
|
|
255
|
+
# Project files should be checked into the repository, unless a significant
|
|
256
|
+
# proportion of contributors will probably not be using Sublime Text
|
|
257
|
+
# *.sublime-project
|
|
258
|
+
|
|
259
|
+
# SFTP configuration file
|
|
260
|
+
sftp-config.json
|
|
261
|
+
|
|
262
|
+
# Package control specific files
|
|
263
|
+
Package Control.last-run
|
|
264
|
+
Package Control.ca-list
|
|
265
|
+
Package Control.ca-bundle
|
|
266
|
+
Package Control.system-ca-bundle
|
|
267
|
+
Package Control.cache/
|
|
268
|
+
Package Control.ca-certs/
|
|
269
|
+
Package Control.merged-ca-bundle
|
|
270
|
+
Package Control.user-ca-bundle
|
|
271
|
+
oscrypto-ca-bundle.crt
|
|
272
|
+
bh_unicode_properties.cache
|
|
273
|
+
|
|
274
|
+
# Sublime-github package stores a github token in this file
|
|
275
|
+
# https://packagecontrol.io/packages/sublime-github
|
|
276
|
+
GitHub.sublime-settings
|
|
277
|
+
|
|
278
|
+
### Windows ###
|
|
279
|
+
# Windows thumbnail cache files
|
|
280
|
+
Thumbs.db
|
|
281
|
+
Thumbs.db:encryptable
|
|
282
|
+
ehthumbs.db
|
|
283
|
+
ehthumbs_vista.db
|
|
284
|
+
|
|
285
|
+
# Dump file
|
|
286
|
+
*.stackdump
|
|
287
|
+
|
|
288
|
+
# Folder config file
|
|
289
|
+
[Dd]esktop.ini
|
|
290
|
+
|
|
291
|
+
# Recycle Bin used on file shares
|
|
292
|
+
$RECYCLE.BIN/
|
|
293
|
+
|
|
294
|
+
# Windows Installer files
|
|
295
|
+
*.cab
|
|
296
|
+
*.msi
|
|
297
|
+
*.msix
|
|
298
|
+
*.msm
|
|
299
|
+
*.msp
|
|
300
|
+
|
|
301
|
+
# Windows shortcuts
|
|
302
|
+
*.lnk
|
|
303
|
+
|
|
304
|
+
# End of https://www.gitignore.io/api/linux,macos,python,pycharm,windows,sublimetext
|
|
305
|
+
|
|
306
|
+
### instackup ###
|
|
307
|
+
# Generated at build time by hatch-vcs
|
|
308
|
+
src/instackup/_version.py
|
|
309
|
+
.venv/
|
|
310
|
+
.ruff_cache/
|
instackup-0.4.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Daniel Lavedonio de Lima
|
|
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
|
+
SOFTWARE.
|
instackup-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: instackup
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: A package to ease interaction with cloud services, DB connections and commonly used functionalities in data analytics.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Lavedonio/instackup
|
|
6
|
+
Project-URL: Documentation, https://github.com/Lavedonio/instackup/tree/main/docs
|
|
7
|
+
Project-URL: Changelog, https://github.com/Lavedonio/instackup/tree/main/version_logs
|
|
8
|
+
Project-URL: Issues, https://github.com/Lavedonio/instackup/issues
|
|
9
|
+
Author-email: Daniel Lavedonio de Lima <daniel.lavedonio@gmail.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: bigquery,data-engineering,gcs,google-sheets,mysql,postgresql,redshift,s3
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
23
|
+
Classifier: Topic :: Database
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Requires-Dist: pandas>=2.2
|
|
28
|
+
Requires-Dist: pyyaml>=6.0.1
|
|
29
|
+
Provides-Extra: all
|
|
30
|
+
Requires-Dist: boto3>=1.34; extra == 'all'
|
|
31
|
+
Requires-Dist: google-auth>=2.29; extra == 'all'
|
|
32
|
+
Requires-Dist: google-cloud-bigquery-datatransfer>=3.15; extra == 'all'
|
|
33
|
+
Requires-Dist: google-cloud-bigquery[pandas]>=3.25; extra == 'all'
|
|
34
|
+
Requires-Dist: google-cloud-secret-manager>=2.20; extra == 'all'
|
|
35
|
+
Requires-Dist: google-cloud-storage>=2.18; extra == 'all'
|
|
36
|
+
Requires-Dist: gspread>=6.1; extra == 'all'
|
|
37
|
+
Requires-Dist: mysql-connector-python>=9.0; extra == 'all'
|
|
38
|
+
Requires-Dist: pandas-gbq>=0.23; extra == 'all'
|
|
39
|
+
Requires-Dist: psycopg2-binary>=2.9.9; extra == 'all'
|
|
40
|
+
Provides-Extra: aws
|
|
41
|
+
Requires-Dist: boto3>=1.34; extra == 'aws'
|
|
42
|
+
Provides-Extra: gcp
|
|
43
|
+
Requires-Dist: google-auth>=2.29; extra == 'gcp'
|
|
44
|
+
Requires-Dist: google-cloud-bigquery-datatransfer>=3.15; extra == 'gcp'
|
|
45
|
+
Requires-Dist: google-cloud-bigquery[pandas]>=3.25; extra == 'gcp'
|
|
46
|
+
Requires-Dist: google-cloud-secret-manager>=2.20; extra == 'gcp'
|
|
47
|
+
Requires-Dist: google-cloud-storage>=2.18; extra == 'gcp'
|
|
48
|
+
Requires-Dist: pandas-gbq>=0.23; extra == 'gcp'
|
|
49
|
+
Provides-Extra: gsheets
|
|
50
|
+
Requires-Dist: google-auth>=2.29; extra == 'gsheets'
|
|
51
|
+
Requires-Dist: gspread>=6.1; extra == 'gsheets'
|
|
52
|
+
Provides-Extra: mysql
|
|
53
|
+
Requires-Dist: mysql-connector-python>=9.0; extra == 'mysql'
|
|
54
|
+
Provides-Extra: postgresql
|
|
55
|
+
Requires-Dist: psycopg2-binary>=2.9.9; extra == 'postgresql'
|
|
56
|
+
Provides-Extra: redshift
|
|
57
|
+
Requires-Dist: boto3>=1.34; extra == 'redshift'
|
|
58
|
+
Requires-Dist: psycopg2-binary>=2.9.9; extra == 'redshift'
|
|
59
|
+
Description-Content-Type: text/markdown
|
|
60
|
+
|
|
61
|
+
# Instackup
|
|
62
|
+
|
|
63
|
+
[](https://pypi.org/project/instackup/)
|
|
64
|
+
[](https://pypi.org/project/instackup/)
|
|
65
|
+
[](https://github.com/Lavedonio/instackup/actions/workflows/ci.yml)
|
|
66
|
+
[](https://github.com/Lavedonio/instackup/blob/main/LICENSE)
|
|
67
|
+
|
|
68
|
+
This Python library is an open source way to standardize and simplify connections with cloud-based tools, databases and commonly used tools in data manipulation and analysis. It can help BI teams by having a unified source code for local development and testing as well as remote production (automated scheduled run) environments.
|
|
69
|
+
|
|
70
|
+
# Index
|
|
71
|
+
|
|
72
|
+
- [Current release](#current-release)
|
|
73
|
+
- [Installation](#installation)
|
|
74
|
+
- [Quick start](#quick-start)
|
|
75
|
+
- [Credentials](#credentials)
|
|
76
|
+
- [Documentation](#documentation)
|
|
77
|
+
- [Development](#development)
|
|
78
|
+
- [Version logs](#version-logs)
|
|
79
|
+
|
|
80
|
+
# Current release
|
|
81
|
+
**Version 0.4.0 (beta)**: a modernization release with support for Python 3.11–3.15, current versions of every dependency, production-ready credentials (environment variables, secret managers and cloud platform identities), type hints and a full test suite. See [what changed](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.4.0-beta-current_release.md#version-040-beta), including the breaking changes.
|
|
82
|
+
|
|
83
|
+
# Installation
|
|
84
|
+
Instackup needs [Python 3.11 or newer](https://www.python.org/downloads/). Install it with the extras for the services you use:
|
|
85
|
+
|
|
86
|
+
pip install 'instackup[gcp,postgresql]'
|
|
87
|
+
|
|
88
|
+
| Extra | Modules |
|
|
89
|
+
|---|---|
|
|
90
|
+
| `gcp` | `bigquery_tools`, `gcloudstorage_tools` (and GCP Secret Manager credentials) |
|
|
91
|
+
| `gsheets` | `gsheets_tools` |
|
|
92
|
+
| `aws` | `s3_tools` (and AWS Secrets Manager credentials) |
|
|
93
|
+
| `redshift` | `redshift_tools` |
|
|
94
|
+
| `postgresql` | `sql_tools.PostgreSQLTool` |
|
|
95
|
+
| `mysql` | `sql_tools.MySQLTool` |
|
|
96
|
+
| `all` | Everything above |
|
|
97
|
+
|
|
98
|
+
`sql_tools.SQLiteTool`, `general_tools` and `heroku_tools` work without extras.
|
|
99
|
+
|
|
100
|
+
# Quick start
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
from instackup import BigQueryTool, PostgreSQLTool, S3Tool
|
|
104
|
+
|
|
105
|
+
# Databases: credentials come from environment variables, a secret manager or a credentials file
|
|
106
|
+
with PostgreSQLTool() as pg:
|
|
107
|
+
orders = pg.query("SELECT * FROM orders WHERE created_at >= %s", params=("2026-01-01",))
|
|
108
|
+
|
|
109
|
+
# Cloud services: with nothing configured, the platform's own identity is used
|
|
110
|
+
bq = BigQueryTool()
|
|
111
|
+
bq.upload(orders, dataset="analytics", table="orders", if_exists="replace")
|
|
112
|
+
|
|
113
|
+
s3 = S3Tool(uri="s3://my-bucket/exports/")
|
|
114
|
+
s3.upload_file("report.csv")
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The library logs through Python's standard `logging` module. To see what it's doing:
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
import logging
|
|
121
|
+
|
|
122
|
+
logging.basicConfig(level=logging.INFO)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
# Credentials
|
|
126
|
+
Tools look up credentials by service and connection name (`connection="default"` unless you pass another one), in this order:
|
|
127
|
+
|
|
128
|
+
1. `INSTACKUP_<SERVICE>__<CONNECTION>__<KEY>` environment variables, e.g. `INSTACKUP_POSTGRESQL__DEFAULT__PASSWORD`;
|
|
129
|
+
2. a credentials document stored in AWS Secrets Manager (`INSTACKUP_AWS_SECRET_ID`) or GCP Secret Manager (`INSTACKUP_GCP_SECRET_NAME`);
|
|
130
|
+
3. a YAML or JSON file set in `INSTACKUP_CREDENTIALS_FILE` (or the legacy `CREDENTIALS_HOME`), whose values can reference environment variables as `${NAME}`.
|
|
131
|
+
|
|
132
|
+
When Google or AWS credentials aren't configured, the tools use [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials) and the [AWS default credential chain](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html), the recommended setup in production (service accounts, Workload Identity, IAM roles).
|
|
133
|
+
|
|
134
|
+
A minimal local setup:
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
# credentials.yml (use credentials/secret_template.yml as a starting point)
|
|
138
|
+
PostgreSQL:
|
|
139
|
+
default:
|
|
140
|
+
host: localhost
|
|
141
|
+
dbname: postgres
|
|
142
|
+
user: postgres
|
|
143
|
+
password: ${POSTGRES_PASSWORD}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
export INSTACKUP_CREDENTIALS_FILE="$HOME/.config/instackup/credentials.yml"
|
|
148
|
+
export POSTGRES_PASSWORD=...
|
|
149
|
+
gcloud auth application-default login # For Google tools
|
|
150
|
+
aws sso login # For AWS tools
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Read the [credentials guide](https://github.com/Lavedonio/instackup/blob/main/docs/credentials.md) for every option, production recommendations and how to migrate from `CREDENTIALS_HOME`.
|
|
154
|
+
|
|
155
|
+
# Documentation
|
|
156
|
+
|
|
157
|
+
- [Credentials guide](https://github.com/Lavedonio/instackup/blob/main/docs/credentials.md)
|
|
158
|
+
- [Architecture and design decisions](https://github.com/Lavedonio/instackup/blob/main/docs/architecture.md)
|
|
159
|
+
- Modules:
|
|
160
|
+
- [bigquery_tools](https://github.com/Lavedonio/instackup/blob/main/docs/bigquery_tools.md#bigquery_tools): `BigQueryTool`, to query, load and manage BigQuery data, plus PostgreSQL to BigQuery schema conversion.
|
|
161
|
+
- [gcloudstorage_tools](https://github.com/Lavedonio/instackup/blob/main/docs/gcloudstorage_tools.md#gcloudstorage_tools): `GCloudStorageTool`, to manage Google Cloud Storage files and folders.
|
|
162
|
+
- [general_tools](https://github.com/Lavedonio/instackup/blob/main/docs/general_tools.md#general_tools): URI parsing, text normalization and the code location.
|
|
163
|
+
- [gsheets_tools](https://github.com/Lavedonio/instackup/blob/main/docs/gsheets_tools.md#gsheets_tools): `GSheetsTool`, to read and write Google Sheets as DataFrames.
|
|
164
|
+
- [heroku_tools](https://github.com/Lavedonio/instackup/blob/main/docs/heroku_tools.md#heroku_tools): `HerokuTool`, a Heroku CLI wrapper.
|
|
165
|
+
- [redshift_tools](https://github.com/Lavedonio/instackup/blob/main/docs/redshift_tools.md#redshift_tools): `RedShiftTool`, for Redshift queries and UNLOAD to S3.
|
|
166
|
+
- [s3_tools](https://github.com/Lavedonio/instackup/blob/main/docs/s3_tools.md#s3_tools): `S3Tool`, to manage S3 files and folders.
|
|
167
|
+
- [sql_tools](https://github.com/Lavedonio/instackup/blob/main/docs/sql_tools.md#sql_tools): `SQLiteTool`, `PostgreSQLTool` and `MySQLTool`.
|
|
168
|
+
|
|
169
|
+
# Development
|
|
170
|
+
The project uses [uv](https://docs.astral.sh/uv/).
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
uv sync --all-extras # Create .venv with every extra and the dev tools
|
|
174
|
+
uv run pytest # Unit tests
|
|
175
|
+
uv run ruff check # Lint
|
|
176
|
+
uv run ruff format # Format
|
|
177
|
+
uv run mypy # Type check
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Integration tests run against real databases and are skipped unless their URLs are set:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
docker run -d --rm -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:17-alpine
|
|
184
|
+
TEST_POSTGRESQL_URL=postgresql://postgres:postgres@localhost:5432/postgres uv run pytest -m integration
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Every push and pull request runs the [CI workflow](https://github.com/Lavedonio/instackup/blob/main/.github/workflows/ci.yml). Publishing a GitHub release uploads the package to PyPI; see [releasing.md](https://github.com/Lavedonio/instackup/blob/main/docs/releasing.md).
|
|
188
|
+
|
|
189
|
+
# Version logs
|
|
190
|
+
See what changed in every version.
|
|
191
|
+
|
|
192
|
+
- Beta releases
|
|
193
|
+
- [Version 0.4.0](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.4.0-beta-current_release.md#version-040-beta) (current release)
|
|
194
|
+
- [Version 0.3.0](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.3.0-beta.md#version-030-beta)
|
|
195
|
+
- [Version 0.2.6](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.2.6-beta.md#version-026-beta)
|
|
196
|
+
- [Version 0.2.5](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.2.5-beta.md#version-025-beta)
|
|
197
|
+
- [Version 0.2.4](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.2.4-beta.md#version-024-beta)
|
|
198
|
+
- [Version 0.2.3](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.2.3-beta.md#version-023-beta)
|
|
199
|
+
- [Version 0.2.2](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.2.2-beta.md#version-022-beta)
|
|
200
|
+
- [Version 0.2.1](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.2.1-beta.md#version-021-beta)
|
|
201
|
+
- [Version 0.2.0](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.2.0-beta.md#version-020-beta)
|
|
202
|
+
- [Version 0.1.2](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.1.2-beta.md#version-012-beta)
|
|
203
|
+
- [Version 0.1.1](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.1.1-beta.md#version-011-beta)
|
|
204
|
+
- [Version 0.1.0](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.1.0-beta.md#version-010-beta)
|
|
205
|
+
- Alpha releases
|
|
206
|
+
- [Version 0.0.6](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.0.6-alpha.md#version-006-alpha)
|
|
207
|
+
- [Version 0.0.5](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.0.5-alpha.md#version-005-alpha)
|
|
208
|
+
- [Version 0.0.4](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.0.4-alpha.md#version-004-alpha)
|
|
209
|
+
- [Version 0.0.3](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.0.3-alpha.md#version-003-alpha)
|
|
210
|
+
- [Version 0.0.2](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.0.2-alpha.md#version-002-alpha)
|
|
211
|
+
- [Version 0.0.1](https://github.com/Lavedonio/instackup/blob/main/version_logs/v0.0.1-alpha.md#version-001-alpha)
|