iceframex 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.
Files changed (35) hide show
  1. iceframex-0.1.0/LICENSE +192 -0
  2. iceframex-0.1.0/PKG-INFO +278 -0
  3. iceframex-0.1.0/README.md +171 -0
  4. iceframex-0.1.0/iceframex/__init__.py +43 -0
  5. iceframex-0.1.0/iceframex/core.py +247 -0
  6. iceframex-0.1.0/iceframex/distributed/__init__.py +5 -0
  7. iceframex-0.1.0/iceframex/distributed/engine.py +213 -0
  8. iceframex-0.1.0/iceframex/entrypoints.py +93 -0
  9. iceframex-0.1.0/iceframex/exceptions.py +33 -0
  10. iceframex-0.1.0/iceframex/formats/__init__.py +62 -0
  11. iceframex-0.1.0/iceframex/formats/base.py +79 -0
  12. iceframex-0.1.0/iceframex/formats/delta.py +170 -0
  13. iceframex-0.1.0/iceframex/formats/hudi.py +149 -0
  14. iceframex-0.1.0/iceframex/formats/iceberg.py +281 -0
  15. iceframex-0.1.0/iceframex/mcp/__init__.py +5 -0
  16. iceframex-0.1.0/iceframex/mcp/server.py +360 -0
  17. iceframex-0.1.0/iceframex/py.typed +0 -0
  18. iceframex-0.1.0/iceframex/query.py +46 -0
  19. iceframex-0.1.0/iceframex/testing/__init__.py +19 -0
  20. iceframex-0.1.0/iceframex/testing/duckdb_validate.py +155 -0
  21. iceframex-0.1.0/iceframex/utils.py +52 -0
  22. iceframex-0.1.0/iceframex.egg-info/PKG-INFO +278 -0
  23. iceframex-0.1.0/iceframex.egg-info/SOURCES.txt +33 -0
  24. iceframex-0.1.0/iceframex.egg-info/dependency_links.txt +1 -0
  25. iceframex-0.1.0/iceframex.egg-info/entry_points.txt +4 -0
  26. iceframex-0.1.0/iceframex.egg-info/requires.txt +99 -0
  27. iceframex-0.1.0/iceframex.egg-info/top_level.txt +1 -0
  28. iceframex-0.1.0/pyproject.toml +185 -0
  29. iceframex-0.1.0/setup.cfg +4 -0
  30. iceframex-0.1.0/tests/test_core.py +170 -0
  31. iceframex-0.1.0/tests/test_distributed.py +66 -0
  32. iceframex-0.1.0/tests/test_duckdb_validation.py +120 -0
  33. iceframex-0.1.0/tests/test_formats.py +36 -0
  34. iceframex-0.1.0/tests/test_mcp.py +61 -0
  35. iceframex-0.1.0/tests/test_utils.py +62 -0
@@ -0,0 +1,192 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but not
32
+ limited to compiled object code, generated documentation, and
33
+ conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work (an
38
+ example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other
43
+ modifications represent, as a whole, an original work of authorship.
44
+
45
+ "Contribution" shall mean any work of authorship, including the
46
+ original version of the Work and any modifications or additions to
47
+ that Work or Derivative Works of that Work, that is intentionally
48
+ submitted to Licensor for inclusion in the Work by the copyright
49
+ owner or by an individual or Legal Entity authorized to submit on
50
+ their behalf. For the purposes of this definition, "submitted"
51
+ means any form of electronic, verbal, or written communication sent
52
+ to the Licensor or its representatives, including but not limited to
53
+ communication on electronic mailing lists, source code control
54
+ systems, and issue tracking systems that are managed by, or on
55
+ behalf of, the Licensor for the purpose of discussing and improving
56
+ the Work.
57
+
58
+ "Contributor" shall mean Licensor and any individual or Legal Entity
59
+ on behalf of whom a Contribution has been received by Licensor and
60
+ subsequently incorporated within the Work.
61
+
62
+ 2. Grant of Copyright License. Subject to the terms and conditions of
63
+ this License, each Contributor hereby grants to You a perpetual,
64
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
65
+ copyright license to reproduce, prepare Derivative Works of,
66
+ publicly display, publicly perform, sublicense, and distribute the
67
+ Work and such Derivative Works in Source or Object form.
68
+
69
+ 3. Grant of Patent License. Subject to the terms and conditions of this
70
+ License, each Contributor hereby grants to You a perpetual,
71
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
+ (except as stated in this section) patent license to make, have
73
+ made, use, offer to sell, sell, import, and otherwise transfer the
74
+ Work, where such license applies only to those patent claims
75
+ licensable by such Contributor that are necessarily infringed by
76
+ their Contribution(s) alone or by combination of their Contribution(s)
77
+ with the Work to which such Contribution(s) was submitted. If You
78
+ institute patent litigation against any entity (including a
79
+ cross-claim or counterclaim) alleging that the Work or a
80
+ Contribution incorporated within the Work constitutes direct or
81
+ contributory patent infringement, then any patent licenses granted
82
+ to You under this License for that Work shall terminate as of the
83
+ date such litigation is filed.
84
+
85
+ 4. Redistribution. You may reproduce and distribute copies of the Work
86
+ or Derivative Works thereof in any medium, with or without
87
+ modifications, and in Source or Object form, provided that You meet
88
+ the following conditions:
89
+
90
+ (a) You must give any other recipients of the Work or Derivative
91
+ Works a copy of this License; and
92
+
93
+ (b) You must cause any modified files to carry prominent notices
94
+ stating that You changed the files; and
95
+
96
+ (c) You must retain, in the Source form of any Derivative Works that
97
+ You distribute, all copyright, patent, trademark, and attribution
98
+ notices from the Source form of the Work, excluding those notices
99
+ that do not pertain to any part of the Derivative Works; and
100
+
101
+ (d) If the Work includes a "NOTICE" text file as part of its
102
+ distribution, then any Derivative Works that You distribute must
103
+ include a readable copy of the attribution notices contained within
104
+ such NOTICE file, excluding those notices that do not pertain to any
105
+ part of the Derivative Works, in at least one of the following
106
+ places: within a NOTICE text file distributed as part of the
107
+ Derivative Works; within the Source form or documentation, if
108
+ provided along with the Derivative Works; or, within a display
109
+ generated by the Derivative Works, if and wherever such third-party
110
+ notices normally appear. The contents of the NOTICE file are for
111
+ informational purposes only and do not modify the License. You may
112
+ add Your own attribution notices within Derivative Works that You
113
+ distribute, alongside or as an addendum to the NOTICE text from the
114
+ Work, provided that such additional attribution notices do not
115
+ modify the License.
116
+
117
+ You may add Your own copyright statement to Your modifications and
118
+ may provide additional or different license terms and conditions
119
+ for use, reproduction, or distribution of Your modifications, or for
120
+ any such Derivative Works as a whole, provided Your use,
121
+ reproduction, and distribution of the Work otherwise complies with
122
+ the conditions stated in this License.
123
+
124
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
125
+ any Contribution intentionally submitted for inclusion in the Work
126
+ by You to the Licensor shall be under the terms and conditions of
127
+ this License, without any additional terms or conditions.
128
+ Notwithstanding the above, nothing herein shall supersede or modify
129
+ the terms of any separate license agreement you may have executed
130
+ with Licensor regarding such Contributions.
131
+
132
+ 6. Trademarks. This License does not grant permission to use the trade
133
+ names, trademarks, service marks, or product names of the Licensor,
134
+ except as required to reasonable and customary use in describing the
135
+ origin of the Work and reproducing the content of the NOTICE file.
136
+
137
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed
138
+ to in writing, the Licensor provides the Work (and each Contributor
139
+ provides its Contributions) on an "AS IS" BASIS, WITHOUT
140
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
141
+ including, without limitation, any warranties or conditions of
142
+ TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
143
+ PURPOSE. You are solely responsible for determining the
144
+ appropriateness of using or redistributing the Work and assume any
145
+ risks associated with Your exercise of permissions under this License.
146
+
147
+ 8. Limitation of Liability. In no event and under no legal theory,
148
+ whether in tort (including negligence), contract, or otherwise,
149
+ unless required by applicable law (such as deliberate and
150
+ negligent acts) or agreed to in writing, shall any Contributor be
151
+ liable to You for damages, including any direct, indirect, special,
152
+ incidental, or consequential damages of any character arising as a
153
+ result of this License or out of the use or inability to use the
154
+ Work (including but not limited to damages for loss of goodwill,
155
+ work stoppage, computer failure or malfunction, or any and all other
156
+ commercial damages or losses), even if such Contributor has been
157
+ advised of the possibility of such damages.
158
+
159
+ 9. Accepting Warranty or Additional Liability. While redistributing
160
+ the Work or Derivative Works thereof, You may choose to offer, and
161
+ charge a fee for, acceptance of support, warranty, indemnity, or
162
+ other liability obligations and/or rights consistent with this
163
+ License. However, in accepting such obligations, You may act only
164
+ on Your own behalf and on Your sole responsibility, not on behalf
165
+ of any other Contributor, and only if You have agreed to pay such
166
+ additional obligations.
167
+
168
+ END OF TERMS AND CONDITIONS
169
+
170
+ APPENDIX: How to apply the Apache License to your work.
171
+
172
+ To apply the Apache License to your work, attach the following
173
+ boilerplate notice, with the fields enclosed by brackets "[]"
174
+ replaced with your own identifying information. (Don't include
175
+ the brackets!) The text should be enclosed in the appropriate
176
+ comment syntax for the file format. We recommend that it be
177
+ included at the top of every source file in a form that is obvious
178
+ to the reader.
179
+
180
+ Copyright [yyyy] [name of copyright owner]
181
+
182
+ Licensed under the Apache License, Version 2.0 (the "License");
183
+ you may not use this file except in compliance with the License.
184
+ You may obtain a copy of the License at
185
+
186
+ http://www.apache.org/licenses/LICENSE-2.0
187
+
188
+ Unless required by applicable law or agreed to in writing, software
189
+ distributed under the License is distributed on an "AS IS" BASIS,
190
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
191
+ See the License for the specific language governing permissions and
192
+ limitations under the License.
@@ -0,0 +1,278 @@
1
+ Metadata-Version: 2.4
2
+ Name: iceframex
3
+ Version: 0.1.0
4
+ Summary: Unified DataFrame-like API for Apache Iceberg, Delta Lake, and Apache Hemi with distributed execution and a read-write MCP server
5
+ Author-email: iceframex maintainers <maintainers@iceframex.dev>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/iceframex/iceframex
8
+ Project-URL: Documentation, https://github.com/iceframex/iceframex/tree/main/docs
9
+ Project-URL: Repository, https://github.com/iceframex/iceframex
10
+ Project-URL: Issues, https://github.com/iceframex/iceframex/issues
11
+ Keywords: iceberg,delta lake,hudi,dataframe,data engineering,lakehouse,mcp,distributed
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Database
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: pyiceberg<0.14,>=0.11.0
27
+ Requires-Dist: pyarrow>=14.0.0
28
+ Requires-Dist: polars>=1.0.0
29
+ Requires-Dist: python-dotenv>=1.0.0
30
+ Requires-Dist: mcp<3,>=2.1.0
31
+ Provides-Extra: aws
32
+ Requires-Dist: s3fs>=2023.1.0; extra == "aws"
33
+ Requires-Dist: boto3>=1.28.0; extra == "aws"
34
+ Provides-Extra: gcs
35
+ Requires-Dist: gcsfs>=2023.1.0; extra == "gcs"
36
+ Provides-Extra: azure
37
+ Requires-Dist: adlfs>=2023.1.0; extra == "azure"
38
+ Provides-Extra: delta
39
+ Requires-Dist: deltalake>=0.15.0; extra == "delta"
40
+ Provides-Extra: hudi
41
+ Requires-Dist: getdaft>=0.2.0; extra == "hudi"
42
+ Provides-Extra: ray
43
+ Requires-Dist: ray>=2.0.0; extra == "ray"
44
+ Provides-Extra: dask
45
+ Requires-Dist: dask[dataframe]>=2023.1.0; extra == "dask"
46
+ Provides-Extra: ingestion
47
+ Requires-Dist: iceframex[delta,hudi]; extra == "ingestion"
48
+ Requires-Dist: fastexcel>=0.9.0; extra == "ingestion"
49
+ Requires-Dist: gspread>=6.0.0; extra == "ingestion"
50
+ Requires-Dist: lxml>=4.9.0; extra == "ingestion"
51
+ Requires-Dist: html5lib; extra == "ingestion"
52
+ Requires-Dist: beautifulsoup4; extra == "ingestion"
53
+ Requires-Dist: pandas>=2.0.0; extra == "ingestion"
54
+ Requires-Dist: requests; extra == "ingestion"
55
+ Requires-Dist: datasets; extra == "ingestion"
56
+ Requires-Dist: pyperclip; extra == "ingestion"
57
+ Requires-Dist: connectorx>=0.3.0; extra == "ingestion"
58
+ Requires-Dist: sqlalchemy>=2.0.0; extra == "ingestion"
59
+ Requires-Dist: fpdf2>=2.7.0; extra == "ingestion"
60
+ Requires-Dist: markdown-it-py>=3.0.0; extra == "ingestion"
61
+ Requires-Dist: pyreadstat; extra == "ingestion"
62
+ Provides-Extra: cli
63
+ Requires-Dist: typer>=0.9.0; extra == "cli"
64
+ Requires-Dist: rich>=13.0.0; extra == "cli"
65
+ Provides-Extra: agent
66
+ Requires-Dist: openai>=1.0.0; extra == "agent"
67
+ Requires-Dist: anthropic>=0.18.0; extra == "agent"
68
+ Requires-Dist: google-generativeai>=0.3.0; extra == "agent"
69
+ Requires-Dist: rich>=13.0.0; extra == "agent"
70
+ Provides-Extra: cache
71
+ Requires-Dist: diskcache>=5.6.0; extra == "cache"
72
+ Provides-Extra: streaming
73
+ Requires-Dist: kafka-python>=2.0.0; extra == "streaming"
74
+ Provides-Extra: monitoring
75
+ Requires-Dist: psutil>=5.9.0; extra == "monitoring"
76
+ Requires-Dist: prometheus-client>=0.19.0; extra == "monitoring"
77
+ Provides-Extra: notebook
78
+ Requires-Dist: ipython>=8.0.0; extra == "notebook"
79
+ Requires-Dist: ipywidgets>=8.0.0; extra == "notebook"
80
+ Provides-Extra: pydantic
81
+ Requires-Dist: pydantic>=2.0.0; extra == "pydantic"
82
+ Provides-Extra: datafusion
83
+ Requires-Dist: datafusion>=35.0.0; extra == "datafusion"
84
+ Provides-Extra: viz
85
+ Requires-Dist: altair>=5.0.0; extra == "viz"
86
+ Provides-Extra: dev
87
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
88
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
89
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
90
+ Requires-Dist: pytest-timeout>=2.3.0; extra == "dev"
91
+ Requires-Dist: black>=23.0.0; extra == "dev"
92
+ Requires-Dist: ruff>=0.0.270; extra == "dev"
93
+ Requires-Dist: mypy>=1.3.0; extra == "dev"
94
+ Requires-Dist: pyiceberg[sql-sqlite]>=0.11.0; extra == "dev"
95
+ Requires-Dist: typer>=0.9.0; extra == "dev"
96
+ Requires-Dist: rich>=13.0.0; extra == "dev"
97
+ Requires-Dist: pandas>=2.0.0; extra == "dev"
98
+ Provides-Extra: all
99
+ Requires-Dist: iceframex[aws,azure,gcs]; extra == "all"
100
+ Requires-Dist: iceframex[delta,hudi]; extra == "all"
101
+ Requires-Dist: iceframex[dask,ray]; extra == "all"
102
+ Requires-Dist: iceframex[ingestion]; extra == "all"
103
+ Requires-Dist: iceframex[cli]; extra == "all"
104
+ Requires-Dist: iceframex[agent]; extra == "all"
105
+ Requires-Dist: iceframex[cache,datafusion,monitoring,notebook,pydantic,streaming,viz]; extra == "all"
106
+ Dynamic: license-file
107
+
108
+ # iceframex
109
+
110
+ **Unified DataFrame-like API for Apache Iceberg, Delta Lake, and Apache Hudi** — with distributed execution and a read-write MCP server.
111
+
112
+ [![PyPI version](https://badge.fury.io/py/iceframex.svg)](https://pypi.org/project/iceframex/)
113
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
114
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/)
115
+
116
+ ## Why iceframex?
117
+
118
+ iceframex is a fork of [IceFrame](https://github.com/AlexMercedCoder/iceframe) that bridges three key gaps:
119
+
120
+ | Gap | IceFrame | iceframex |
121
+ |-----|----------|-----------|
122
+ | Table formats | Iceberg only | Iceberg + Delta Lake + Apache Hudi |
123
+ | Compute | Single-node only | Ray / Dask distributed execution |
124
+ | MCP server | Read-only | Read-write (opt-in) |
125
+ | Python floor | 3.10 | 3.9 |
126
+
127
+ One `UnifiedTable` API works across all three lakehouse formats:
128
+
129
+ ```python
130
+ from iceframex import UnifiedTable
131
+
132
+ config = {
133
+ "uri": "http://localhost:8181",
134
+ "type": "rest",
135
+ "warehouse": "s3://my-bucket/warehouse",
136
+ }
137
+
138
+ ice = UnifiedTable(config) # Iceberg (default)
139
+ ice_delta = UnifiedTable(config, format="delta") # Delta Lake
140
+ ice_hudi = UnifiedTable(config, format="hudi") # Apache Hudi
141
+
142
+ ice.create_table("db.users", schema=arrow_schema)
143
+ df = ice.read_table("db.users", limit=100)
144
+ ice.append_to_table("db.users", new_rows)
145
+ ```
146
+
147
+ ## Install
148
+
149
+ ```bash
150
+ pip install iceframex
151
+ ```
152
+
153
+ ### Extras
154
+
155
+ ```bash
156
+ # Cloud storage
157
+ pip install iceframex[aws,gcs,azure]
158
+
159
+ # Multi-format (Delta, Hudi)
160
+ pip install iceframex[delta,hudi]
161
+
162
+ # Distributed execution (Ray, Dask)
163
+ pip install iceframex[ray,dask]
164
+
165
+ # CLI
166
+ pip install iceframex[cli]
167
+
168
+ # LLM agent tooling
169
+ pip install iceframex[agent]
170
+
171
+ # Everything
172
+ pip install iceframex[all]
173
+ ```
174
+
175
+ ## Quick start
176
+
177
+ ### Create and write a table
178
+
179
+ ```python
180
+ import pyarrow as pa
181
+ from iceframex import UnifiedTable
182
+
183
+ config = {
184
+ "uri": "http://localhost:8181",
185
+ "type": "rest",
186
+ "warehouse": "s3://my-bucket/warehouse",
187
+ }
188
+ ice = UnifiedTable(config)
189
+
190
+ schema = pa.schema([
191
+ pa.field("id", pa.int64()),
192
+ pa.field("name", pa.string()),
193
+ pa.field("created_at", pa.timestamp("us")),
194
+ ])
195
+
196
+ ice.create_table("db.users", schema)
197
+ ice.append_to_table("db.users", {"id": [1, 2], "name": ["Alice", "Bob"]})
198
+ ```
199
+
200
+ ### Read with Polars
201
+
202
+ ```python
203
+ df = ice.read_table("db.users", columns=["id", "name"], limit=50)
204
+ print(df)
205
+ ```
206
+
207
+ ### Distributed execution (Ray)
208
+
209
+ ```python
210
+ from iceframex import UnifiedTable
211
+ from iceframex.distributed import DistributedEngine
212
+
213
+ ice = UnifiedTable(config)
214
+ engine = DistributedEngine(backend="ray")
215
+
216
+ df = engine.read_table(ice, "db.events", columns=["id", "ts"], num_partitions=8)
217
+ engine.write_table(ice, "db.events_out", df, mode="append")
218
+ engine.shutdown()
219
+ ```
220
+
221
+ ### Read-write MCP server
222
+
223
+ Start the server (read-write by default):
224
+
225
+ ```bash
226
+ export ICEBERG_CATALOG_URI=http://localhost:8181
227
+ export ICEBERG_CATALOG_TYPE=rest
228
+ export ICEBERG_WAREHOUSE=s3://my-bucket/warehouse
229
+ iceframex-mcp
230
+ ```
231
+
232
+ Connect any MCP client. Available tools include:
233
+
234
+ **Read:** `list_tables`, `describe_table`, `get_schema`, `execute_query`, `get_table_stats`, `table_exists`
235
+
236
+ **Write** (requires `ICEFRAMEX_MCP_READ_ONLY=0`): `create_table`, `append_to_table`, `overwrite_table`, `delete_from_table`, `drop_table`
237
+
238
+ To run read-only (safer for shared agents):
239
+
240
+ ```bash
241
+ export ICEFRAMEX_MCP_READ_ONLY=1
242
+ iceframex-mcp
243
+ ```
244
+
245
+ ### CLI
246
+
247
+ ```bash
248
+ iceframex list-tables --config-uri http://localhost:8181 --config-type rest --namespace db
249
+ iceframex read-table --config-uri http://localhost:8181 --config-type rest --table db.users
250
+ iceframex mcp
251
+ ```
252
+
253
+ ## Architecture
254
+
255
+ * `iceframex.core.UnifiedTable` — single entry point, format-agnostic CRUD.
256
+ * `iceframex.formats` — pluggable backends (`IcebergBackend`, `DeltaBackend`, `HudiBackend`) behind `BaseTableBackend`.
257
+ * `iceframex.distributed.DistributedEngine` — Ray/Dask-backed parallel reads and writes.
258
+ * `iceframex.mcp.server` — stdio MCP server with optional read-write mode.
259
+
260
+ ## Roadmap
261
+
262
+ - [ ] True distributed scan pushdown (not just client-side repartition)
263
+ - [ ] Delta Lake `merge` / upsert support
264
+ - [ ] Hudi write support via native Hudi (not just Daft)
265
+ - [ ] More ingestion sources (Kafka, SQL, HTML, etc.)
266
+ - [ ] Async API
267
+
268
+ ## Contributing
269
+
270
+ See [CONTRIBUTING](CONTRIBUTING.md) in the IceFrame repo — patterns apply here too. Pull requests welcome.
271
+
272
+ ## License
273
+
274
+ Apache-2.0. See [LICENSE](LICENSE).
275
+
276
+ ## Attribution
277
+
278
+ iceframex is a fork of [IceFrame](https://github.com/AlexMercedCoder/iceframe) by Alex Merced, licensed under Apache-2.0. The core table operations, catalog handling, and expression system are derived from IceFrame.
@@ -0,0 +1,171 @@
1
+ # iceframex
2
+
3
+ **Unified DataFrame-like API for Apache Iceberg, Delta Lake, and Apache Hudi** — with distributed execution and a read-write MCP server.
4
+
5
+ [![PyPI version](https://badge.fury.io/py/iceframex.svg)](https://pypi.org/project/iceframex/)
6
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
7
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/)
8
+
9
+ ## Why iceframex?
10
+
11
+ iceframex is a fork of [IceFrame](https://github.com/AlexMercedCoder/iceframe) that bridges three key gaps:
12
+
13
+ | Gap | IceFrame | iceframex |
14
+ |-----|----------|-----------|
15
+ | Table formats | Iceberg only | Iceberg + Delta Lake + Apache Hudi |
16
+ | Compute | Single-node only | Ray / Dask distributed execution |
17
+ | MCP server | Read-only | Read-write (opt-in) |
18
+ | Python floor | 3.10 | 3.9 |
19
+
20
+ One `UnifiedTable` API works across all three lakehouse formats:
21
+
22
+ ```python
23
+ from iceframex import UnifiedTable
24
+
25
+ config = {
26
+ "uri": "http://localhost:8181",
27
+ "type": "rest",
28
+ "warehouse": "s3://my-bucket/warehouse",
29
+ }
30
+
31
+ ice = UnifiedTable(config) # Iceberg (default)
32
+ ice_delta = UnifiedTable(config, format="delta") # Delta Lake
33
+ ice_hudi = UnifiedTable(config, format="hudi") # Apache Hudi
34
+
35
+ ice.create_table("db.users", schema=arrow_schema)
36
+ df = ice.read_table("db.users", limit=100)
37
+ ice.append_to_table("db.users", new_rows)
38
+ ```
39
+
40
+ ## Install
41
+
42
+ ```bash
43
+ pip install iceframex
44
+ ```
45
+
46
+ ### Extras
47
+
48
+ ```bash
49
+ # Cloud storage
50
+ pip install iceframex[aws,gcs,azure]
51
+
52
+ # Multi-format (Delta, Hudi)
53
+ pip install iceframex[delta,hudi]
54
+
55
+ # Distributed execution (Ray, Dask)
56
+ pip install iceframex[ray,dask]
57
+
58
+ # CLI
59
+ pip install iceframex[cli]
60
+
61
+ # LLM agent tooling
62
+ pip install iceframex[agent]
63
+
64
+ # Everything
65
+ pip install iceframex[all]
66
+ ```
67
+
68
+ ## Quick start
69
+
70
+ ### Create and write a table
71
+
72
+ ```python
73
+ import pyarrow as pa
74
+ from iceframex import UnifiedTable
75
+
76
+ config = {
77
+ "uri": "http://localhost:8181",
78
+ "type": "rest",
79
+ "warehouse": "s3://my-bucket/warehouse",
80
+ }
81
+ ice = UnifiedTable(config)
82
+
83
+ schema = pa.schema([
84
+ pa.field("id", pa.int64()),
85
+ pa.field("name", pa.string()),
86
+ pa.field("created_at", pa.timestamp("us")),
87
+ ])
88
+
89
+ ice.create_table("db.users", schema)
90
+ ice.append_to_table("db.users", {"id": [1, 2], "name": ["Alice", "Bob"]})
91
+ ```
92
+
93
+ ### Read with Polars
94
+
95
+ ```python
96
+ df = ice.read_table("db.users", columns=["id", "name"], limit=50)
97
+ print(df)
98
+ ```
99
+
100
+ ### Distributed execution (Ray)
101
+
102
+ ```python
103
+ from iceframex import UnifiedTable
104
+ from iceframex.distributed import DistributedEngine
105
+
106
+ ice = UnifiedTable(config)
107
+ engine = DistributedEngine(backend="ray")
108
+
109
+ df = engine.read_table(ice, "db.events", columns=["id", "ts"], num_partitions=8)
110
+ engine.write_table(ice, "db.events_out", df, mode="append")
111
+ engine.shutdown()
112
+ ```
113
+
114
+ ### Read-write MCP server
115
+
116
+ Start the server (read-write by default):
117
+
118
+ ```bash
119
+ export ICEBERG_CATALOG_URI=http://localhost:8181
120
+ export ICEBERG_CATALOG_TYPE=rest
121
+ export ICEBERG_WAREHOUSE=s3://my-bucket/warehouse
122
+ iceframex-mcp
123
+ ```
124
+
125
+ Connect any MCP client. Available tools include:
126
+
127
+ **Read:** `list_tables`, `describe_table`, `get_schema`, `execute_query`, `get_table_stats`, `table_exists`
128
+
129
+ **Write** (requires `ICEFRAMEX_MCP_READ_ONLY=0`): `create_table`, `append_to_table`, `overwrite_table`, `delete_from_table`, `drop_table`
130
+
131
+ To run read-only (safer for shared agents):
132
+
133
+ ```bash
134
+ export ICEFRAMEX_MCP_READ_ONLY=1
135
+ iceframex-mcp
136
+ ```
137
+
138
+ ### CLI
139
+
140
+ ```bash
141
+ iceframex list-tables --config-uri http://localhost:8181 --config-type rest --namespace db
142
+ iceframex read-table --config-uri http://localhost:8181 --config-type rest --table db.users
143
+ iceframex mcp
144
+ ```
145
+
146
+ ## Architecture
147
+
148
+ * `iceframex.core.UnifiedTable` — single entry point, format-agnostic CRUD.
149
+ * `iceframex.formats` — pluggable backends (`IcebergBackend`, `DeltaBackend`, `HudiBackend`) behind `BaseTableBackend`.
150
+ * `iceframex.distributed.DistributedEngine` — Ray/Dask-backed parallel reads and writes.
151
+ * `iceframex.mcp.server` — stdio MCP server with optional read-write mode.
152
+
153
+ ## Roadmap
154
+
155
+ - [ ] True distributed scan pushdown (not just client-side repartition)
156
+ - [ ] Delta Lake `merge` / upsert support
157
+ - [ ] Hudi write support via native Hudi (not just Daft)
158
+ - [ ] More ingestion sources (Kafka, SQL, HTML, etc.)
159
+ - [ ] Async API
160
+
161
+ ## Contributing
162
+
163
+ See [CONTRIBUTING](CONTRIBUTING.md) in the IceFrame repo — patterns apply here too. Pull requests welcome.
164
+
165
+ ## License
166
+
167
+ Apache-2.0. See [LICENSE](LICENSE).
168
+
169
+ ## Attribution
170
+
171
+ iceframex is a fork of [IceFrame](https://github.com/AlexMercedCoder/iceframe) by Alex Merced, licensed under Apache-2.0. The core table operations, catalog handling, and expression system are derived from IceFrame.
@@ -0,0 +1,43 @@
1
+ """
2
+ iceframex - Unified DataFrame-like API for Apache Iceberg, Delta Lake, and Apache Hudi.
3
+
4
+ iceframex provides a simple, intuitive API for working with lakehouse tables
5
+ using REST or SQL catalogs with local and distributed execution.
6
+
7
+ Improvements over IceFrame:
8
+ * Multi-format table support (Iceberg, Delta Lake, Apache Hudi) through one
9
+ :class:`UnifiedTable` API.
10
+ * Distributed execution backends (Ray, Dask) for larger-than-memory scans.
11
+ * A read-write MCP server so AI agents can both query and mutate tables.
12
+ * Python 3.9+ support (IceFrame requires 3.10+).
13
+ """
14
+
15
+ #: Single source of truth for the package version. ``pyproject.toml`` reads it
16
+ #: from here via ``[tool.setuptools.dynamic]``.
17
+ __version__ = "0.1.0"
18
+
19
+ from iceframex.core import UnifiedTable
20
+ from iceframex.exceptions import (
21
+ CatalogError,
22
+ IceFrameXError,
23
+ SchemaError,
24
+ TableNotFoundError,
25
+ UnsupportedFormatError,
26
+ ValidationError,
27
+ )
28
+ from iceframex.formats import TableFormat, detect_format
29
+ from iceframex.utils import load_catalog_config_from_env
30
+
31
+ __all__ = [
32
+ "UnifiedTable",
33
+ "TableFormat",
34
+ "detect_format",
35
+ "load_catalog_config_from_env",
36
+ "IceFrameXError",
37
+ "CatalogError",
38
+ "TableNotFoundError",
39
+ "SchemaError",
40
+ "ValidationError",
41
+ "UnsupportedFormatError",
42
+ "__version__",
43
+ ]