duckrun 0.2.13__tar.gz → 0.2.14.dev0__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.

Potentially problematic release.


This version of duckrun might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duckrun
3
- Version: 0.2.13
3
+ Version: 0.2.14.dev0
4
4
  Summary: Lakehouse task runner powered by DuckDB for Microsoft Fabric
5
5
  Author: mim
6
6
  License: MIT
@@ -53,7 +53,8 @@ class Duckrun:
53
53
 
54
54
  def __init__(self, workspace_id: str, lakehouse_id: str, schema: str = "dbo",
55
55
  sql_folder: Optional[str] = None, compaction_threshold: int = 10,
56
- scan_all_schemas: bool = False, storage_account: str = "onelake"):
56
+ scan_all_schemas: bool = False, storage_account: str = "onelake",
57
+ token_only: bool = False):
57
58
  # Store GUIDs for internal use
58
59
  self.workspace_id = workspace_id
59
60
  self.lakehouse_id = lakehouse_id
@@ -62,6 +63,7 @@ class Duckrun:
62
63
  self.compaction_threshold = compaction_threshold
63
64
  self.scan_all_schemas = scan_all_schemas
64
65
  self.storage_account = storage_account
66
+ self.token_only = token_only
65
67
 
66
68
  # Construct proper ABFSS URLs
67
69
  import re
@@ -93,12 +95,19 @@ class Duckrun:
93
95
  except ImportError:
94
96
  pass # Not in Colab, use default transport
95
97
 
96
- self._attach_lakehouse()
97
- self._register_lookup_functions()
98
+ # Only attach lakehouse and register functions if not token_only mode
99
+ if not token_only:
100
+ self._attach_lakehouse()
101
+ self._register_lookup_functions()
102
+ else:
103
+ # In token_only mode, just create the secret for authentication
104
+ self._create_onelake_secret()
105
+ print("✓ Token authenticated (fast mode - tables not listed)")
98
106
 
99
107
  @classmethod
100
108
  def connect(cls, connection_string: str, sql_folder: Optional[str] = None,
101
- compaction_threshold: int = 100, storage_account: str = "onelake"):
109
+ compaction_threshold: int = 100, storage_account: str = "onelake",
110
+ token_only: bool = False):
102
111
  """
103
112
  Create and connect to lakehouse or workspace.
104
113
 
@@ -112,6 +121,7 @@ class Duckrun:
112
121
  sql_folder: Optional path or URL to SQL files folder
113
122
  compaction_threshold: File count threshold for compaction
114
123
  storage_account: Storage account name (default: "onelake")
124
+ token_only: If True, only authenticate without listing tables (faster connection)
115
125
 
116
126
  Examples:
117
127
  # Workspace management only (supports spaces in names)
@@ -125,6 +135,9 @@ class Duckrun:
125
135
  dr = Duckrun.connect("My Workspace/My Lakehouse.lakehouse") # defaults to dbo schema
126
136
  dr = Duckrun.connect("workspace/lakehouse.lakehouse", storage_account="xxx-onelake") # custom storage
127
137
 
138
+ # Fast connection without table listing (token only)
139
+ dr = Duckrun.connect("workspace/lakehouse.lakehouse", token_only=True)
140
+
128
141
  Note:
129
142
  Internally resolves friendly names (with spaces) to GUIDs and constructs proper ABFSS URLs:
130
143
  "My Workspace/My Lakehouse.lakehouse/schema" becomes
@@ -169,7 +182,7 @@ class Duckrun:
169
182
  # Resolve friendly names to GUIDs and construct proper ABFSS path
170
183
  workspace_id, lakehouse_id = cls._resolve_names_to_guids(workspace_name, lakehouse_name)
171
184
 
172
- return cls(workspace_id, lakehouse_id, schema, sql_folder, compaction_threshold, scan_all_schemas, storage_account)
185
+ return cls(workspace_id, lakehouse_id, schema, sql_folder, compaction_threshold, scan_all_schemas, storage_account, token_only)
173
186
 
174
187
  @classmethod
175
188
  def _resolve_names_to_guids(cls, workspace_name: str, lakehouse_name: str) -> tuple[str, str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: duckrun
3
- Version: 0.2.13
3
+ Version: 0.2.14.dev0
4
4
  Summary: Lakehouse task runner powered by DuckDB for Microsoft Fabric
5
5
  Author: mim
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "duckrun"
7
- version = "0.2.13"
7
+ version = "0.2.14.dev0"
8
8
  description = "Lakehouse task runner powered by DuckDB for Microsoft Fabric"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes