terrafox-datalake 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.
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: terrafox-datalake
3
+ Version: 0.1.0
4
+ Summary: Automated connector wrapper for streaming data securely from a private MinIO Data Lake
5
+ Author: Sethu Gopalan
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: pandas
12
+ Requires-Dist: s3fs
13
+ Dynamic: author
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: requires-dist
18
+ Dynamic: requires-python
19
+ Dynamic: summary
20
+
21
+ # Terrafox Data Lake Connector
22
+ A simple, secure wrapper module to stream files out of your private data lake into remote notebook runtimes seamlessly.
@@ -0,0 +1,2 @@
1
+ # Terrafox Data Lake Connector
2
+ A simple, secure wrapper module to stream files out of your private data lake into remote notebook runtimes seamlessly.
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,21 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="terrafox-datalake",
5
+ version="0.1.0",
6
+ author="Sethu Gopalan",
7
+ description="Automated connector wrapper for streaming data securely from a private MinIO Data Lake",
8
+ long_description=open("README.md").read(),
9
+ long_description_content_type="text/markdown",
10
+ packages=find_packages(),
11
+ install_requires=[
12
+ "pandas",
13
+ "s3fs"
14
+ ],
15
+ classifiers=[
16
+ "Programming Language :: Python :: 3",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Operating System :: OS Independent",
19
+ ],
20
+ python_requires=">=3.7",
21
+ )
@@ -0,0 +1,39 @@
1
+ import os
2
+ import pandas as pd
3
+ from functools import partial
4
+
5
+ ENDPOINT = "https://minio.terrafoxai.com"
6
+
7
+ def connect(user=None, password=None):
8
+ user = user or os.environ.get("MINIO_USER")
9
+ password = password or os.environ.get("MINIO_PASSWORD")
10
+
11
+ if not user or not password:
12
+ import getpass
13
+ print("🔐 Data Lake credentials not found in environment settings.")
14
+ user = user or input("Enter MinIO Username: ")
15
+ password = password or getpass.getpass("Enter MinIO Password: ")
16
+
17
+ os.environ["AWS_ACCESS_KEY_ID"] = user
18
+ os.environ["AWS_SECRET_ACCESS_KEY"] = password
19
+
20
+ pd.read_csv = partial(pd.read_csv, storage_options={
21
+ "key": user,
22
+ "secret": password,
23
+ "client_kwargs": {"endpoint_url": ENDPOINT}
24
+ })
25
+
26
+ print("🚀 Terrafox Data Lake Connected Natively via Background Environment!")
27
+
28
+ def get_spark(app_name="Terrafox-DataLake"):
29
+ from pyspark.sql import SparkSession
30
+ user = os.environ.get("AWS_ACCESS_KEY_ID")
31
+ password = os.environ.get("AWS_SECRET_ACCESS_KEY")
32
+ return SparkSession.builder \
33
+ .appName(app_name) \
34
+ .config("spark.hadoop.fs.s3a.endpoint", ENDPOINT) \
35
+ .config("spark.hadoop.fs.s3a.access.key", user) \
36
+ .config("spark.hadoop.fs.s3a.secret.key", password) \
37
+ .config("spark.hadoop.fs.s3a.path.style.access", "true") \
38
+ .config("spark.hadoop.fs.s3a.impl", "org.apache.hadoop.fs.s3a.S3AFileSystem") \
39
+ .getOrCreate()
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.4
2
+ Name: terrafox-datalake
3
+ Version: 0.1.0
4
+ Summary: Automated connector wrapper for streaming data securely from a private MinIO Data Lake
5
+ Author: Sethu Gopalan
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: pandas
12
+ Requires-Dist: s3fs
13
+ Dynamic: author
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: requires-dist
18
+ Dynamic: requires-python
19
+ Dynamic: summary
20
+
21
+ # Terrafox Data Lake Connector
22
+ A simple, secure wrapper module to stream files out of your private data lake into remote notebook runtimes seamlessly.
@@ -0,0 +1,8 @@
1
+ README.md
2
+ setup.py
3
+ terrafox_datalake/__init__.py
4
+ terrafox_datalake.egg-info/PKG-INFO
5
+ terrafox_datalake.egg-info/SOURCES.txt
6
+ terrafox_datalake.egg-info/dependency_links.txt
7
+ terrafox_datalake.egg-info/requires.txt
8
+ terrafox_datalake.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ terrafox_datalake