snowlib 0.1.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.
- snowlib-0.1.0/LICENSE +21 -0
- snowlib-0.1.0/PKG-INFO +93 -0
- snowlib-0.1.0/README.md +26 -0
- snowlib-0.1.0/licenses/THIRD_PARTY.md +130 -0
- snowlib-0.1.0/pyproject.toml +117 -0
- snowlib-0.1.0/setup.cfg +4 -0
- snowlib-0.1.0/src/snowlib/__init__.py +82 -0
- snowlib-0.1.0/src/snowlib/_data/connections.toml.example +73 -0
- snowlib-0.1.0/src/snowlib/_data/test_config.toml.example +20 -0
- snowlib-0.1.0/src/snowlib/config/__init__.py +12 -0
- snowlib-0.1.0/src/snowlib/config/config.py +89 -0
- snowlib-0.1.0/src/snowlib/config/paths.py +133 -0
- snowlib-0.1.0/src/snowlib/connection/__init__.py +5 -0
- snowlib-0.1.0/src/snowlib/connection/base.py +181 -0
- snowlib-0.1.0/src/snowlib/connection/connection.py +161 -0
- snowlib-0.1.0/src/snowlib/io/__init__.py +12 -0
- snowlib-0.1.0/src/snowlib/io/names.py +242 -0
- snowlib-0.1.0/src/snowlib/io/read.py +125 -0
- snowlib-0.1.0/src/snowlib/io/write.py +103 -0
- snowlib-0.1.0/src/snowlib/primitives/__init__.py +60 -0
- snowlib-0.1.0/src/snowlib/primitives/context.py +150 -0
- snowlib-0.1.0/src/snowlib/primitives/data.py +176 -0
- snowlib-0.1.0/src/snowlib/primitives/execution.py +274 -0
- snowlib-0.1.0/src/snowlib/primitives/job.py +121 -0
- snowlib-0.1.0/src/snowlib/primitives/metadata.py +277 -0
- snowlib-0.1.0/src/snowlib/primitives/result.py +134 -0
- snowlib-0.1.0/src/snowlib/primitives/streaming.py +63 -0
- snowlib-0.1.0/src/snowlib/py.typed +0 -0
- snowlib-0.1.0/src/snowlib.egg-info/PKG-INFO +93 -0
- snowlib-0.1.0/src/snowlib.egg-info/SOURCES.txt +31 -0
- snowlib-0.1.0/src/snowlib.egg-info/dependency_links.txt +1 -0
- snowlib-0.1.0/src/snowlib.egg-info/requires.txt +54 -0
- snowlib-0.1.0/src/snowlib.egg-info/top_level.txt +1 -0
snowlib-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Rashad Aziz
|
|
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.
|
snowlib-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: snowlib
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python-Snowflake utilities
|
|
5
|
+
Author: Rashad Aziz
|
|
6
|
+
Maintainer: Rashad Aziz
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/rashtastic/snowlib
|
|
9
|
+
Project-URL: Documentation, https://github.com/rashtastic/snowlib/tree/main/docs
|
|
10
|
+
Project-URL: Repository, https://github.com/rashtastic/snowlib.git
|
|
11
|
+
Project-URL: Bug Tracker, https://github.com/rashtastic/snowlib/issues
|
|
12
|
+
Keywords: snowflake
|
|
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.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Database
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.9
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
License-File: licenses/THIRD_PARTY.md
|
|
30
|
+
Requires-Dist: snowflake-connector-python[pandas]>=3.17.0; python_version < "3.14"
|
|
31
|
+
Requires-Dist: snowflake-connector-python>=3.17.0; python_version >= "3.14"
|
|
32
|
+
Requires-Dist: pandas
|
|
33
|
+
Requires-Dist: tomli>=2.0.0; python_version < "3.11"
|
|
34
|
+
Requires-Dist: pyyaml
|
|
35
|
+
Requires-Dist: keyring
|
|
36
|
+
Requires-Dist: cryptography
|
|
37
|
+
Requires-Dist: pydantic>=2.0
|
|
38
|
+
Requires-Dist: importlib_resources>=1.3; python_version < "3.9"
|
|
39
|
+
Provides-Extra: pandas
|
|
40
|
+
Requires-Dist: pandas; extra == "pandas"
|
|
41
|
+
Requires-Dist: pyarrow; python_version < "3.14" and extra == "pandas"
|
|
42
|
+
Provides-Extra: snowpark
|
|
43
|
+
Requires-Dist: snowflake-connector-python[pandas]<4.0.0,>=3.17.0; python_version < "3.14" and extra == "snowpark"
|
|
44
|
+
Requires-Dist: snowflake-connector-python<4.0.0,>=3.17.0; python_version >= "3.14" and extra == "snowpark"
|
|
45
|
+
Requires-Dist: snowflake-snowpark-python[modin]>=1.9.0; python_version < "3.14" and extra == "snowpark"
|
|
46
|
+
Provides-Extra: excel
|
|
47
|
+
Requires-Dist: xlrd; extra == "excel"
|
|
48
|
+
Requires-Dist: xlsxwriter; extra == "excel"
|
|
49
|
+
Requires-Dist: openpyxl; extra == "excel"
|
|
50
|
+
Requires-Dist: html5lib; extra == "excel"
|
|
51
|
+
Provides-Extra: dev
|
|
52
|
+
Requires-Dist: pytest; extra == "dev"
|
|
53
|
+
Requires-Dist: pytest-xdist; extra == "dev"
|
|
54
|
+
Requires-Dist: mypy; extra == "dev"
|
|
55
|
+
Requires-Dist: pyright; extra == "dev"
|
|
56
|
+
Requires-Dist: types-pyyaml; extra == "dev"
|
|
57
|
+
Requires-Dist: pandas-stubs; extra == "dev"
|
|
58
|
+
Requires-Dist: ipykernel; extra == "dev"
|
|
59
|
+
Requires-Dist: tox; extra == "dev"
|
|
60
|
+
Requires-Dist: pip-licenses; extra == "dev"
|
|
61
|
+
Requires-Dist: snowflake-snowpark-python[modin]>=1.9.0; extra == "dev"
|
|
62
|
+
Requires-Dist: xlrd; extra == "dev"
|
|
63
|
+
Requires-Dist: xlsxwriter; extra == "dev"
|
|
64
|
+
Requires-Dist: openpyxl; extra == "dev"
|
|
65
|
+
Requires-Dist: html5lib; extra == "dev"
|
|
66
|
+
Dynamic: license-file
|
|
67
|
+
|
|
68
|
+
# ❄️ SnowLib
|
|
69
|
+
|
|
70
|
+
Python-Snowflake utilities
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install snowlib
|
|
74
|
+
pip install snowlib[snowpark]
|
|
75
|
+
pip install snowlib[excel]
|
|
76
|
+
pip install snowlib[snowpark,excel]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Compatibility
|
|
80
|
+
|
|
81
|
+
| Python | snowflake-connector-python | snowflake-snowpark-python | pandas | pyarrow |
|
|
82
|
+
|--------|----------------------------|---------------------------|--------|---------|
|
|
83
|
+
| 3.14 | >=3.17.0 | - | ✓ | - |
|
|
84
|
+
| 3.13 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
85
|
+
| 3.12 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
86
|
+
| 3.11 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
87
|
+
| 3.10 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
88
|
+
| 3.9 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
89
|
+
|
|
90
|
+
**Notes:**
|
|
91
|
+
- ✓ = Supported with `[snowpark]` extra
|
|
92
|
+
- \- = Not supported (no wheel available or incompatible)
|
|
93
|
+
- Python 3.14 uses base connector only (Snowpark pending compatibility)
|
snowlib-0.1.0/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ❄️ SnowLib
|
|
2
|
+
|
|
3
|
+
Python-Snowflake utilities
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install snowlib
|
|
7
|
+
pip install snowlib[snowpark]
|
|
8
|
+
pip install snowlib[excel]
|
|
9
|
+
pip install snowlib[snowpark,excel]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Compatibility
|
|
13
|
+
|
|
14
|
+
| Python | snowflake-connector-python | snowflake-snowpark-python | pandas | pyarrow |
|
|
15
|
+
|--------|----------------------------|---------------------------|--------|---------|
|
|
16
|
+
| 3.14 | >=3.17.0 | - | ✓ | - |
|
|
17
|
+
| 3.13 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
18
|
+
| 3.12 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
19
|
+
| 3.11 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
20
|
+
| 3.10 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
21
|
+
| 3.9 | >=3.17.0, <4.0.0 | ✓ | ✓ | ✓ |
|
|
22
|
+
|
|
23
|
+
**Notes:**
|
|
24
|
+
- ✓ = Supported with `[snowpark]` extra
|
|
25
|
+
- \- = Not supported (no wheel available or incompatible)
|
|
26
|
+
- Python 3.14 uses base connector only (Snowpark pending compatibility)
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
| Name | Version | License | URL | Description |
|
|
2
|
+
|----------------------------|-------------------|--------------------------------------------------------------------------------|----------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
3
|
+
| PyJWT | 2.10.1 | MIT License | https://github.com/jpadilla/pyjwt | JSON Web Token implementation in Python |
|
|
4
|
+
| PyYAML | 6.0.3 | MIT License | https://pyyaml.org/ | YAML parser and emitter for Python |
|
|
5
|
+
| Pygments | 2.19.2 | BSD License | https://pygments.org | Pygments is a syntax highlighting package written in Python. |
|
|
6
|
+
| annotated-types | 0.7.0 | MIT License | https://github.com/annotated-types/annotated-types | Reusable constraint types to use with typing.Annotated |
|
|
7
|
+
| asn1crypto | 1.5.1 | MIT License | https://github.com/wbond/asn1crypto | Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X.509 and TSP |
|
|
8
|
+
| asttokens | 3.0.0 | Apache 2.0 | https://github.com/gristlabs/asttokens | Annotate AST trees with source code positions |
|
|
9
|
+
| boto3 | 1.40.51 | Apache Software License | https://github.com/boto/boto3 | The AWS SDK for Python |
|
|
10
|
+
| botocore | 1.40.51 | Apache-2.0 | https://github.com/boto/botocore | Low-level, data-driven core of boto 3. |
|
|
11
|
+
| cachetools | 6.2.1 | MIT License | https://github.com/tkem/cachetools/ | Extensible memoizing collections and decorators |
|
|
12
|
+
| certifi | 2025.10.5 | Mozilla Public License 2.0 (MPL 2.0) | https://github.com/certifi/python-certifi | Python package for providing Mozilla's CA Bundle. |
|
|
13
|
+
| cffi | 1.17.1 | MIT License | http://cffi.readthedocs.org | Foreign Function Interface for Python calling C code. |
|
|
14
|
+
| chardet | 5.2.0 | GNU Lesser General Public License v2 or later (LGPLv2+) | https://github.com/chardet/chardet | Universal encoding detector for Python 3 |
|
|
15
|
+
| charset-normalizer | 3.4.3 | MIT | https://github.com/jawah/charset_normalizer/blob/master/CHANGELOG.md | The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet. |
|
|
16
|
+
| cloudpickle | 3.1.1 | BSD License | https://github.com/cloudpipe/cloudpickle | Pickler class to extend the standard pickle.Pickler functionality |
|
|
17
|
+
| colorama | 0.4.6 | BSD License | https://github.com/tartley/colorama | Cross-platform colored terminal text. |
|
|
18
|
+
| comm | 0.2.3 | BSD License | https://github.com/ipython/comm | Jupyter Python Comm implementation, for usage in ipykernel, xeus-python etc. |
|
|
19
|
+
| cryptography | 46.0.0 | UNKNOWN | https://github.com/pyca/cryptography | cryptography is a package which provides cryptographic recipes and primitives to Python developers. |
|
|
20
|
+
| debugpy | 1.8.17 | MIT License | https://aka.ms/debugpy | An implementation of the Debug Adapter Protocol for Python |
|
|
21
|
+
| decorator | 5.2.1 | BSD License | UNKNOWN | Decorators for Humans |
|
|
22
|
+
| distlib | 0.4.0 | Python Software Foundation License | https://github.com/pypa/distlib | Distribution utilities |
|
|
23
|
+
| et_xmlfile | 2.0.0 | MIT License | https://foss.heptapod.net/openpyxl/et_xmlfile | An implementation of lxml.xmlfile for the standard library |
|
|
24
|
+
| execnet | 2.1.1 | MIT License | https://execnet.readthedocs.io/en/latest/ | execnet: rapid multi-Python deployment |
|
|
25
|
+
| executing | 2.2.1 | MIT License | https://github.com/alexmojaki/executing | Get the currently executing AST node of a frame, and other information |
|
|
26
|
+
| filelock | 3.20.0 | The Unlicense (Unlicense) | https://github.com/tox-dev/py-filelock | A platform independent file lock. |
|
|
27
|
+
| fsspec | 2025.9.0 | UNKNOWN | https://github.com/fsspec/filesystem_spec | File-system specification |
|
|
28
|
+
| html5lib | 1.1 | MIT License | https://github.com/html5lib/html5lib-python | HTML parser based on the WHATWG HTML specification |
|
|
29
|
+
| idna | 3.11 | UNKNOWN | https://github.com/kjd/idna | Internationalized Domain Names in Applications (IDNA) |
|
|
30
|
+
| iniconfig | 2.1.0 | MIT License | https://github.com/pytest-dev/iniconfig | brain-dead simple config-ini parsing |
|
|
31
|
+
| ipykernel | 7.0.0 | BSD 3-Clause License | https://ipython.org | IPython Kernel for Jupyter |
|
|
32
|
+
| | | | | |
|
|
33
|
+
| | | Copyright (c) 2015, IPython Development Team | | |
|
|
34
|
+
| | | | | |
|
|
35
|
+
| | | All rights reserved. | | |
|
|
36
|
+
| | | | | |
|
|
37
|
+
| | | Redistribution and use in source and binary forms, with or without | | |
|
|
38
|
+
| | | modification, are permitted provided that the following conditions are met: | | |
|
|
39
|
+
| | | | | |
|
|
40
|
+
| | | 1. Redistributions of source code must retain the above copyright notice, this | | |
|
|
41
|
+
| | | list of conditions and the following disclaimer. | | |
|
|
42
|
+
| | | | | |
|
|
43
|
+
| | | 2. Redistributions in binary form must reproduce the above copyright notice, | | |
|
|
44
|
+
| | | this list of conditions and the following disclaimer in the documentation | | |
|
|
45
|
+
| | | and/or other materials provided with the distribution. | | |
|
|
46
|
+
| | | | | |
|
|
47
|
+
| | | 3. Neither the name of the copyright holder nor the names of its | | |
|
|
48
|
+
| | | contributors may be used to endorse or promote products derived from | | |
|
|
49
|
+
| | | this software without specific prior written permission. | | |
|
|
50
|
+
| | | | | |
|
|
51
|
+
| | | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | | |
|
|
52
|
+
| | | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | | |
|
|
53
|
+
| | | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | | |
|
|
54
|
+
| | | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | | |
|
|
55
|
+
| | | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | |
|
|
56
|
+
| | | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | | |
|
|
57
|
+
| | | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | | |
|
|
58
|
+
| | | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | | |
|
|
59
|
+
| | | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | | |
|
|
60
|
+
| | | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | |
|
|
61
|
+
| ipython | 9.6.0 | BSD License | https://ipython.org | IPython: Productive Interactive Computing |
|
|
62
|
+
| ipython_pygments_lexers | 1.1.1 | BSD License | https://github.com/ipython/ipython-pygments-lexers | Defines a variety of Pygments lexers for highlighting IPython code. |
|
|
63
|
+
| ipywidgets | 8.1.7 | BSD License | http://jupyter.org | Jupyter interactive widgets |
|
|
64
|
+
| jaraco.classes | 3.4.0 | MIT License | https://github.com/jaraco/jaraco.classes | Utility functions for Python class constructs |
|
|
65
|
+
| jaraco.context | 6.0.1 | MIT License | https://github.com/jaraco/jaraco.context | Useful decorators and context managers |
|
|
66
|
+
| jaraco.functools | 4.3.0 | UNKNOWN | https://github.com/jaraco/jaraco.functools | Functools like those found in stdlib |
|
|
67
|
+
| jedi | 0.19.2 | MIT License | https://github.com/davidhalter/jedi | An autocompletion tool for Python that can be used for text editors. |
|
|
68
|
+
| jmespath | 1.0.1 | MIT License | https://github.com/jmespath/jmespath.py | JSON Matching Expressions |
|
|
69
|
+
| jupyter_client | 8.6.3 | BSD License | https://jupyter.org | Jupyter protocol implementation and client libraries |
|
|
70
|
+
| jupyter_core | 5.8.1 | UNKNOWN | https://jupyter.org | Jupyter core package. A base package on which Jupyter projects rely. |
|
|
71
|
+
| jupyterlab_widgets | 3.0.15 | BSD License | https://github.com/jupyter-widgets/ipywidgets | Jupyter interactive widgets for JupyterLab |
|
|
72
|
+
| keyring | 25.6.0 | MIT License | https://github.com/jaraco/keyring | Store and access your passwords safely. |
|
|
73
|
+
| matplotlib-inline | 0.1.7 | BSD License | https://github.com/ipython/matplotlib-inline | Inline Matplotlib backend for Jupyter |
|
|
74
|
+
| modin | 0.37.1 | Apache 2 | https://github.com/modin-project/modin | Modin: Make your pandas code run faster by changing one line of code. |
|
|
75
|
+
| more-itertools | 10.8.0 | UNKNOWN | https://github.com/more-itertools/more-itertools | More routines for operating on iterables, beyond itertools |
|
|
76
|
+
| mypy | 1.18.2 | MIT License | https://www.mypy-lang.org/ | Optional static typing for Python |
|
|
77
|
+
| mypy_extensions | 1.1.0 | UNKNOWN | https://github.com/python/mypy_extensions | Type system extensions for programs checked with the mypy type checker. |
|
|
78
|
+
| nest-asyncio | 1.6.0 | BSD License | https://github.com/erdewit/nest_asyncio | Patch asyncio to allow nested event loops |
|
|
79
|
+
| nodeenv | 1.9.1 | BSD License | https://github.com/ekalinin/nodeenv | Node.js virtual environment builder |
|
|
80
|
+
| numpy | 2.3.3 | BSD License | https://numpy.org | Fundamental package for array computing in Python |
|
|
81
|
+
| openpyxl | 3.1.5 | MIT License | https://openpyxl.readthedocs.io | A Python library to read/write Excel 2010 xlsx/xlsm files |
|
|
82
|
+
| packaging | 25.0 | Apache Software License; BSD License | https://github.com/pypa/packaging | Core utilities for Python packages |
|
|
83
|
+
| pandas | 2.3.1 | BSD License | https://pandas.pydata.org | Powerful data structures for data analysis, time series, and statistics |
|
|
84
|
+
| pandas-stubs | 2.3.2.250926 | BSD License | https://pandas.pydata.org | Type annotations for pandas |
|
|
85
|
+
| parso | 0.8.5 | MIT License | https://github.com/davidhalter/parso | A Python Parser |
|
|
86
|
+
| pathspec | 0.12.1 | Mozilla Public License 2.0 (MPL 2.0) | UNKNOWN | Utility library for gitignore style pattern matching of file paths. |
|
|
87
|
+
| platformdirs | 4.5.0 | MIT License | https://github.com/tox-dev/platformdirs | A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`. |
|
|
88
|
+
| pluggy | 1.6.0 | MIT License | UNKNOWN | plugin and hook calling mechanisms for python |
|
|
89
|
+
| prompt_toolkit | 3.0.52 | BSD License | https://github.com/prompt-toolkit/python-prompt-toolkit | Library for building powerful interactive command lines in Python |
|
|
90
|
+
| protobuf | 6.31.1 | 3-Clause BSD License | https://developers.google.com/protocol-buffers/ | UNKNOWN |
|
|
91
|
+
| psutil | 7.1.0 | BSD-3-Clause | https://github.com/giampaolo/psutil | Cross-platform lib for process and system monitoring. |
|
|
92
|
+
| pure_eval | 0.2.3 | MIT License | http://github.com/alexmojaki/pure_eval | Safely evaluate AST nodes without side effects |
|
|
93
|
+
| pyOpenSSL | 25.3.0 | Apache Software License | https://pyopenssl.org/ | Python wrapper module around the OpenSSL library |
|
|
94
|
+
| pyarrow | 21.0.0 | Apache Software License | https://arrow.apache.org/ | Python library for Apache Arrow |
|
|
95
|
+
| pycparser | 2.23 | BSD License | https://github.com/eliben/pycparser | C parser in Python |
|
|
96
|
+
| pydantic | 2.12.1 | UNKNOWN | https://github.com/pydantic/pydantic | Data validation using Python type hints |
|
|
97
|
+
| pydantic_core | 2.41.3 | UNKNOWN | https://github.com/pydantic/pydantic-core | Core functionality for Pydantic validation and serialization |
|
|
98
|
+
| pyproject-api | 1.10.0 | MIT License | https://pyproject-api.readthedocs.io | API to interact with the python pyproject.toml based projects |
|
|
99
|
+
| pyright | 1.1.406 | MIT | https://github.com/RobertCraigie/pyright-python | Command line wrapper for pyright |
|
|
100
|
+
| pytest | 8.4.2 | MIT License | https://docs.pytest.org/en/latest/ | pytest: simple powerful testing with Python |
|
|
101
|
+
| pytest-xdist | 3.8.0 | UNKNOWN | https://github.com/pytest-dev/pytest-xdist | pytest xdist plugin for distributed testing, most importantly across multiple CPUs |
|
|
102
|
+
| python-dateutil | 2.9.0.post0 | Apache Software License; BSD License | https://github.com/dateutil/dateutil | Extensions to the standard Python datetime module |
|
|
103
|
+
| pytz | 2025.2 | MIT License | http://pythonhosted.org/pytz | World timezone definitions, modern and historical |
|
|
104
|
+
| pywin32 | 311 | Python Software Foundation License | https://github.com/mhammond/pywin32 | Python for Window Extensions |
|
|
105
|
+
| pywin32-ctypes | 0.2.3 | BSD-3-Clause | https://github.com/enthought/pywin32-ctypes | A (partial) reimplementation of pywin32 using ctypes/cffi |
|
|
106
|
+
| pyzmq | 27.1.0 | BSD License | https://pyzmq.readthedocs.org | Python bindings for 0MQ |
|
|
107
|
+
| requests | 2.32.5 | Apache Software License | https://requests.readthedocs.io | Python HTTP for Humans. |
|
|
108
|
+
| s3transfer | 0.14.0 | Apache Software License | https://github.com/boto/s3transfer | An Amazon S3 Transfer Manager |
|
|
109
|
+
| six | 1.17.0 | MIT License | https://github.com/benjaminp/six | Python 2 and 3 compatibility utilities |
|
|
110
|
+
| snowflake-connector-python | 3.18.0 | Apache Software License | https://www.snowflake.com/ | Snowflake Connector for Python |
|
|
111
|
+
| snowflake-snowpark-python | 1.40.0 | Apache Software License | https://www.snowflake.com/ | Snowflake Snowpark for Python |
|
|
112
|
+
| sortedcontainers | 2.4.0 | Apache Software License | http://www.grantjenks.com/docs/sortedcontainers/ | Sorted Containers -- Sorted List, Sorted Dict, Sorted Set |
|
|
113
|
+
| stack-data | 0.6.3 | MIT License | http://github.com/alexmojaki/stack_data | Extract data from python stack frames and tracebacks for informative displays |
|
|
114
|
+
| tomlkit | 0.13.3 | MIT License | https://github.com/sdispater/tomlkit | Style preserving TOML library |
|
|
115
|
+
| tornado | 6.5.2 | Apache Software License | http://www.tornadoweb.org/ | Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. |
|
|
116
|
+
| tox | 4.31.0 | MIT License | http://tox.readthedocs.org | tox is a generic virtualenv management and test command line tool |
|
|
117
|
+
| tqdm | 4.67.1 | MIT License; Mozilla Public License 2.0 (MPL 2.0) | https://tqdm.github.io | Fast, Extensible Progress Meter |
|
|
118
|
+
| traitlets | 5.14.3 | BSD License | https://github.com/ipython/traitlets | Traitlets Python configuration system |
|
|
119
|
+
| types-PyYAML | 6.0.12.20250915 | UNKNOWN | https://github.com/python/typeshed | Typing stubs for PyYAML |
|
|
120
|
+
| types-pytz | 2025.2.0.20250809 | UNKNOWN | https://github.com/python/typeshed | Typing stubs for pytz |
|
|
121
|
+
| typing-inspection | 0.4.2 | UNKNOWN | https://github.com/pydantic/typing-inspection | Runtime typing introspection tools |
|
|
122
|
+
| typing_extensions | 4.15.0 | UNKNOWN | https://github.com/python/typing_extensions | Backported and Experimental Type Hints for Python 3.9+ |
|
|
123
|
+
| tzdata | 2025.2 | Apache Software License | https://github.com/python/tzdata | Provider of IANA time zone data |
|
|
124
|
+
| tzlocal | 5.3.1 | MIT License | https://github.com/regebro/tzlocal/blob/master/CHANGES.txt | tzinfo object for the local timezone |
|
|
125
|
+
| urllib3 | 2.5.0 | UNKNOWN | https://github.com/urllib3/urllib3/blob/main/CHANGES.rst | HTTP library with thread-safe connection pooling, file post, and more. |
|
|
126
|
+
| virtualenv | 20.35.3 | MIT License | https://github.com/pypa/virtualenv | Virtual Python Environment builder |
|
|
127
|
+
| webencodings | 0.5.1 | BSD License | https://github.com/SimonSapin/python-webencodings | Character encoding aliases for legacy web content |
|
|
128
|
+
| widgetsnbextension | 4.0.14 | BSD License | http://jupyter.org | Jupyter interactive widgets for Jupyter Notebook |
|
|
129
|
+
| xlrd | 2.0.2 | BSD License | http://www.python-excel.org/ | Library for developers to extract data from Microsoft Excel (tm) .xls spreadsheet files |
|
|
130
|
+
| xlsxwriter | 3.2.9 | BSD License | https://github.com/jmcnamara/XlsxWriter | A Python module for creating Excel XLSX files. |
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "snowlib"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Python-Snowflake utilities"
|
|
9
|
+
readme = {file = "README.md", content-type = "text/markdown"}
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE", "licenses/THIRD_PARTY.md"]
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
authors = [{name = "Rashad Aziz"}]
|
|
14
|
+
maintainers = [{name = "Rashad Aziz"}]
|
|
15
|
+
keywords = ["snowflake"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.9",
|
|
22
|
+
"Programming Language :: Python :: 3.10",
|
|
23
|
+
"Programming Language :: Python :: 3.11",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Programming Language :: Python :: 3.14",
|
|
27
|
+
"Topic :: Database",
|
|
28
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
|
+
"Typing :: Typed",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
dependencies = [
|
|
33
|
+
"snowflake-connector-python[pandas]>=3.17.0; python_version < '3.14'",
|
|
34
|
+
"snowflake-connector-python>=3.17.0; python_version >= '3.14'",
|
|
35
|
+
"pandas",
|
|
36
|
+
"tomli>=2.0.0; python_version < '3.11'",
|
|
37
|
+
"pyyaml",
|
|
38
|
+
"keyring",
|
|
39
|
+
"cryptography",
|
|
40
|
+
"pydantic>=2.0",
|
|
41
|
+
"importlib_resources>=1.3; python_version < '3.9'",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Homepage = "https://github.com/rashtastic/snowlib"
|
|
46
|
+
Documentation = "https://github.com/rashtastic/snowlib/tree/main/docs"
|
|
47
|
+
Repository = "https://github.com/rashtastic/snowlib.git"
|
|
48
|
+
"Bug Tracker" = "https://github.com/rashtastic/snowlib/issues"
|
|
49
|
+
|
|
50
|
+
[project.optional-dependencies]
|
|
51
|
+
pandas = [
|
|
52
|
+
"pandas",
|
|
53
|
+
"pyarrow; python_version<'3.14'", # No Windows wheel for 3.14 yet
|
|
54
|
+
]
|
|
55
|
+
snowpark = [
|
|
56
|
+
"snowflake-connector-python[pandas]<4.0.0,>=3.17.0; python_version < '3.14'",
|
|
57
|
+
"snowflake-connector-python<4.0.0,>=3.17.0; python_version >= '3.14'",
|
|
58
|
+
"snowflake-snowpark-python[modin]>=1.9.0; python_version < '3.14'", # Snowpark requires python_version<3.14
|
|
59
|
+
]
|
|
60
|
+
excel = [
|
|
61
|
+
"xlrd",
|
|
62
|
+
"xlsxwriter",
|
|
63
|
+
"openpyxl",
|
|
64
|
+
"html5lib",
|
|
65
|
+
]
|
|
66
|
+
dev = [
|
|
67
|
+
# Testing
|
|
68
|
+
"pytest",
|
|
69
|
+
"pytest-xdist",
|
|
70
|
+
"mypy",
|
|
71
|
+
"pyright",
|
|
72
|
+
"types-pyyaml",
|
|
73
|
+
"pandas-stubs", # Type stubs for pandas (dev/type-checking only)
|
|
74
|
+
"ipykernel",
|
|
75
|
+
"tox",
|
|
76
|
+
# Distribution
|
|
77
|
+
"pip-licenses",
|
|
78
|
+
# Optional
|
|
79
|
+
"snowflake-snowpark-python[modin]>=1.9.0",
|
|
80
|
+
"xlrd",
|
|
81
|
+
"xlsxwriter",
|
|
82
|
+
"openpyxl",
|
|
83
|
+
"html5lib",
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
[tool.setuptools]
|
|
87
|
+
package-dir = {"" = "src"}
|
|
88
|
+
|
|
89
|
+
[tool.setuptools.packages.find]
|
|
90
|
+
where = ["src"]
|
|
91
|
+
include = ["snowlib*"]
|
|
92
|
+
|
|
93
|
+
[tool.setuptools.package-data]
|
|
94
|
+
snowlib = ["_data/*.example"]
|
|
95
|
+
|
|
96
|
+
[tool.setuptools.dynamic]
|
|
97
|
+
version = {attr = "snowlib.__version__"}
|
|
98
|
+
|
|
99
|
+
[tool.mypy]
|
|
100
|
+
plugins = ["pydantic.mypy"]
|
|
101
|
+
python_version = "3.11"
|
|
102
|
+
warn_return_any = true
|
|
103
|
+
warn_unused_configs = true
|
|
104
|
+
disallow_untyped_defs = true
|
|
105
|
+
disallow_incomplete_defs = true
|
|
106
|
+
check_untyped_defs = true
|
|
107
|
+
no_implicit_optional = true
|
|
108
|
+
warn_redundant_casts = true
|
|
109
|
+
warn_unused_ignores = true
|
|
110
|
+
warn_no_return = true
|
|
111
|
+
warn_unreachable = true
|
|
112
|
+
strict_equality = true
|
|
113
|
+
|
|
114
|
+
[tool.pydantic-mypy]
|
|
115
|
+
init_forbid_extra = true
|
|
116
|
+
init_typed = true
|
|
117
|
+
warn_required_dynamic_aliases = true
|
snowlib-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
snowlib - Python-Snowflake utilities
|
|
3
|
+
|
|
4
|
+
Code is organized in layers
|
|
5
|
+
- config/ and connection/ as the interface for Snowflake packages
|
|
6
|
+
- primitives/ wraps these in low-level functions
|
|
7
|
+
- io/ is the beginning of higher-level convenience functions
|
|
8
|
+
|
|
9
|
+
Likely to expand to cortex and leaning more into snowpark
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
# Layer 1: Core connectivity
|
|
13
|
+
from snowlib.config import load_profile, list_profiles
|
|
14
|
+
from snowlib.connection import SnowflakeConnector, SnowparkConnector
|
|
15
|
+
|
|
16
|
+
# Layer 2: Primitives
|
|
17
|
+
from snowlib.primitives import (
|
|
18
|
+
# Context
|
|
19
|
+
SnowflakeContext,
|
|
20
|
+
QueryResult,
|
|
21
|
+
QueryJob,
|
|
22
|
+
# Execution
|
|
23
|
+
execute_sql,
|
|
24
|
+
execute_sql_async,
|
|
25
|
+
fetch_one,
|
|
26
|
+
fetch_all,
|
|
27
|
+
fetch_df,
|
|
28
|
+
execute_block,
|
|
29
|
+
# Data I/O
|
|
30
|
+
read_table,
|
|
31
|
+
write_table,
|
|
32
|
+
# Metadata
|
|
33
|
+
get_columns,
|
|
34
|
+
table_exists,
|
|
35
|
+
list_tables,
|
|
36
|
+
get_current_database,
|
|
37
|
+
get_current_schema,
|
|
38
|
+
get_current_warehouse,
|
|
39
|
+
get_current_role,
|
|
40
|
+
# Streaming
|
|
41
|
+
fetch_batches,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# Layer 3: I/O with name resolution
|
|
45
|
+
from snowlib.io import read, write, query
|
|
46
|
+
|
|
47
|
+
__version__ = "0.1.0"
|
|
48
|
+
__all__ = [
|
|
49
|
+
# Layer 1
|
|
50
|
+
"load_profile",
|
|
51
|
+
"list_profiles",
|
|
52
|
+
"SnowflakeConnector",
|
|
53
|
+
"SnowparkConnector",
|
|
54
|
+
# Layer 2: Context
|
|
55
|
+
"SnowflakeContext",
|
|
56
|
+
"QueryResult",
|
|
57
|
+
"QueryJob",
|
|
58
|
+
# Layer 2: Execution
|
|
59
|
+
"execute_sql",
|
|
60
|
+
"execute_sql_async",
|
|
61
|
+
"fetch_one",
|
|
62
|
+
"fetch_all",
|
|
63
|
+
"fetch_df",
|
|
64
|
+
"execute_block",
|
|
65
|
+
# Layer 2: Data I/O
|
|
66
|
+
"read_table",
|
|
67
|
+
"write_table",
|
|
68
|
+
# Layer 2: Metadata
|
|
69
|
+
"get_columns",
|
|
70
|
+
"table_exists",
|
|
71
|
+
"list_tables",
|
|
72
|
+
"get_current_database",
|
|
73
|
+
"get_current_schema",
|
|
74
|
+
"get_current_warehouse",
|
|
75
|
+
"get_current_role",
|
|
76
|
+
# Layer 2: Streaming
|
|
77
|
+
"fetch_batches",
|
|
78
|
+
# Layer 3: I/O
|
|
79
|
+
"read",
|
|
80
|
+
"write",
|
|
81
|
+
"query",
|
|
82
|
+
]
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Snowflake Connection Profiles
|
|
2
|
+
#
|
|
3
|
+
# Copy this file to 'connections.toml' and fill in your connectivity details.
|
|
4
|
+
#
|
|
5
|
+
# These are just examples- you can name the profiles as you like.
|
|
6
|
+
|
|
7
|
+
# Default profile - SSO/browser authentication
|
|
8
|
+
[default]
|
|
9
|
+
account = "your-account.region"
|
|
10
|
+
user = "your_username"
|
|
11
|
+
warehouse = "YOUR_WAREHOUSE"
|
|
12
|
+
database = "YOUR_DATABASE"
|
|
13
|
+
authenticator = "externalbrowser"
|
|
14
|
+
|
|
15
|
+
# Development environment
|
|
16
|
+
[dev]
|
|
17
|
+
account = "your-account.region"
|
|
18
|
+
user = "your_username"
|
|
19
|
+
warehouse = "DEV_WH"
|
|
20
|
+
database = "DEV_DATABASE"
|
|
21
|
+
schema = "DEV_SCHEMA"
|
|
22
|
+
authenticator = "externalbrowser"
|
|
23
|
+
|
|
24
|
+
# Production environment
|
|
25
|
+
[prod]
|
|
26
|
+
account = "your-account.region"
|
|
27
|
+
user = "your_username"
|
|
28
|
+
warehouse = "PROD_WH"
|
|
29
|
+
database = "PROD_DATABASE"
|
|
30
|
+
role = "PROD_ROLE"
|
|
31
|
+
authenticator = "externalbrowser"
|
|
32
|
+
|
|
33
|
+
# Testing - password authentication
|
|
34
|
+
[test]
|
|
35
|
+
account = "your-account.region"
|
|
36
|
+
user = "test_user"
|
|
37
|
+
warehouse = "TEST_WH"
|
|
38
|
+
database = "TEST_DATABASE"
|
|
39
|
+
authenticator = "snowflake"
|
|
40
|
+
|
|
41
|
+
# Interactive debugging
|
|
42
|
+
[debug]
|
|
43
|
+
account = "your-account.region"
|
|
44
|
+
user = "your_username"
|
|
45
|
+
warehouse = "DEV_WH"
|
|
46
|
+
database = "DEV_DATABASE"
|
|
47
|
+
schema = "SCRATCH"
|
|
48
|
+
role = "DEV_ROLE"
|
|
49
|
+
authenticator = "externalbrowser"
|
|
50
|
+
|
|
51
|
+
# Keypair authentication - environment variable
|
|
52
|
+
[service]
|
|
53
|
+
account = "your-account.region"
|
|
54
|
+
user = "service_account"
|
|
55
|
+
warehouse = "SERVICE_WH"
|
|
56
|
+
database = "SERVICE_DATABASE"
|
|
57
|
+
role = "SERVICE_ROLE"
|
|
58
|
+
authenticator = "SNOWFLAKE_JWT"
|
|
59
|
+
private_key_file = "~/.snowflake/rsa_key.p8"
|
|
60
|
+
private_key_passphrase_env = "ENV_VAR_WITH_PASSPHRASE"
|
|
61
|
+
|
|
62
|
+
# Keypair authentication - Windows Credential Manager
|
|
63
|
+
[service_keyring]
|
|
64
|
+
account = "your-account.region"
|
|
65
|
+
user = "service_account"
|
|
66
|
+
warehouse = "SERVICE_WH"
|
|
67
|
+
database = "SERVICE_DATABASE"
|
|
68
|
+
role = "SERVICE_ROLE"
|
|
69
|
+
authenticator = "SNOWFLAKE_JWT"
|
|
70
|
+
private_key_file = "~/.snowflake/rsa_key.p8"
|
|
71
|
+
use_keyring = true
|
|
72
|
+
keyring_service = "snowflake"
|
|
73
|
+
keyring_username = "service_account_keypair"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Example Test Configuration for pytest
|
|
2
|
+
# Copy this to test_config.toml and customize for your environment
|
|
3
|
+
#
|
|
4
|
+
# This file is used by the snowlib test suite (pytest) to configure
|
|
5
|
+
# test database connections and test data locations.
|
|
6
|
+
# NOT for general-purpose connection configuration - use connections.toml for that.
|
|
7
|
+
|
|
8
|
+
[test]
|
|
9
|
+
# Profile to use for tests (from connections.toml)
|
|
10
|
+
# This profile should have permissions to create/drop/truncate tables
|
|
11
|
+
profile = "test"
|
|
12
|
+
|
|
13
|
+
# Database and schema for test operations
|
|
14
|
+
# You may want to provide a dedicated test schema, as tests will create and drop tables
|
|
15
|
+
database = "YOUR_TEST_DATABASE"
|
|
16
|
+
schema = "YOUR_TEST_SCHEMA"
|
|
17
|
+
|
|
18
|
+
# Test table names (will be created/dropped during tests)
|
|
19
|
+
write_table = "TEST_WRITE_TABLE"
|
|
20
|
+
temp_table = "TEST_TEMP_TABLE"
|