polymo 1.1.0__tar.gz → 1.2.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 (30) hide show
  1. {polymo-1.1.0 → polymo-1.2.0}/PKG-INFO +19 -23
  2. {polymo-1.1.0 → polymo-1.2.0}/README.md +13 -15
  3. {polymo-1.1.0 → polymo-1.2.0}/pyproject.toml +1 -6
  4. polymo-1.2.0/src/polymo/cli.py +70 -0
  5. polymo-1.1.0/src/polymo/cli.py +0 -70
  6. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/__init__.py +0 -0
  7. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/__init__.py +0 -0
  8. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/app.py +0 -0
  9. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/preview.py +0 -0
  10. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/examples/countries.polymo.json +0 -0
  11. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/examples/githubrepos.polymo.json +0 -0
  12. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/examples/jsonplaceholder.polymo.json +0 -0
  13. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/examples/jsonplaceholder_endpoints.polymo.json +0 -0
  14. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/examples/weather.polymo.json +0 -0
  15. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/favicon.ico +0 -0
  16. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/favicon.png +0 -0
  17. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/index.html +0 -0
  18. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/logo.png +0 -0
  19. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/logo192.png +0 -0
  20. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/main.css +0 -0
  21. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/main.js +0 -0
  22. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/static/mockServiceWorker.js +0 -0
  23. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/builder/templates/index.html +0 -0
  24. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/codegen/__init__.py +0 -0
  25. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/codegen/generator.py +0 -0
  26. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/codegen/templates/core.py.jinja +0 -0
  27. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/codegen/templates/dp.py.jinja +0 -0
  28. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/codegen/templating.py +0 -0
  29. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/config.py +0 -0
  30. {polymo-1.1.0 → polymo-1.2.0}/src/polymo/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: polymo
3
- Version: 1.1.0
3
+ Version: 1.2.0
4
4
  Summary: Generate standalone Lakeflow Declarative Pipelines scripts from a point-and-click REST connector builder
5
5
  Keywords: spark,pyspark,rest,api,ingestion,data-engineering,etl,http
6
6
  Author: Daniel Tom
@@ -21,18 +21,16 @@ Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Operating System :: OS Independent
22
22
  Classifier: Typing :: Typed
23
23
  Requires-Dist: jinja2>=3.1.6
24
- Requires-Dist: fastapi>=0.110 ; extra == 'builder'
25
- Requires-Dist: uvicorn>=0.24 ; extra == 'builder'
26
- Requires-Dist: jinja2>=3.1.6 ; extra == 'builder'
27
- Requires-Dist: pyspark>=4 ; extra == 'builder'
28
- Requires-Dist: pyarrow>=13 ; extra == 'builder'
29
- Requires-Dist: requests>=2.31 ; extra == 'builder'
24
+ Requires-Dist: fastapi>=0.110
25
+ Requires-Dist: uvicorn>=0.24
26
+ Requires-Dist: pyspark>=4
27
+ Requires-Dist: pyarrow>=13
28
+ Requires-Dist: requests>=2.31
30
29
  Requires-Python: >=3.10
31
30
  Project-URL: Documentation, https://dan1elt0m.github.io/polymo/
32
31
  Project-URL: Homepage, https://github.com/dan1elt0m/polymo
33
32
  Project-URL: Issues, https://github.com/dan1elt0m/polymo/issues
34
33
  Project-URL: Repository, https://github.com/dan1elt0m/polymo.git
35
- Provides-Extra: builder
36
34
  Description-Content-Type: text/markdown
37
35
 
38
36
  <p align="center">
@@ -114,30 +112,28 @@ The YAML runtime (`spark.read.format("polymo")`, `PolymoConfig`,
114
112
  ready to move yet.
115
113
 
116
114
  ## How to start?
117
- Locally you probably want to install polymo along with the Builder UI:
118
115
 
119
116
  ```bash
120
- pip install "polymo[builder]"
117
+ pip install polymo
121
118
  ```
122
119
 
123
- This comes with all UI deps such as pyspark.
120
+ This installs everything you need, Builder UI included — FastAPI, Uvicorn,
121
+ PySpark, PyArrow, and requests all come along, so there's nothing extra to
122
+ opt into.
123
+
124
+ Note that `polymo` is never a dependency of the scripts it generates —
125
+ nothing you export needs polymo installed to run.
126
+
127
+ ## Launch the builder UI
124
128
 
125
- Scripting connector generation directly in Python (calling `generate()` /
126
- `parse_config()` without the UI — see the [API reference](docs/api.md))
127
- doesn't need pyspark at all. In that case, just install the bare minimum
128
- deps with:
129
129
  ```bash
130
- pip install polymo
130
+ polymo
131
131
  ```
132
132
 
133
- Note that `pip install polymo` alone does not install the Builder UI, and
134
- `polymo` is never a dependency of the scripts it generates — nothing you
135
- export needs polymo installed to run.
136
-
137
- ## Launch the builder UI
133
+ Or without installing it first:
138
134
 
139
- ```bash
140
- polymo builder
135
+ ```bash
136
+ uvx polymo
141
137
  ```
142
138
 
143
139
  #### (Optional) Run the Builder in Docker
@@ -77,30 +77,28 @@ The YAML runtime (`spark.read.format("polymo")`, `PolymoConfig`,
77
77
  ready to move yet.
78
78
 
79
79
  ## How to start?
80
- Locally you probably want to install polymo along with the Builder UI:
81
80
 
82
81
  ```bash
83
- pip install "polymo[builder]"
82
+ pip install polymo
84
83
  ```
85
84
 
86
- This comes with all UI deps such as pyspark.
85
+ This installs everything you need, Builder UI included — FastAPI, Uvicorn,
86
+ PySpark, PyArrow, and requests all come along, so there's nothing extra to
87
+ opt into.
88
+
89
+ Note that `polymo` is never a dependency of the scripts it generates —
90
+ nothing you export needs polymo installed to run.
91
+
92
+ ## Launch the builder UI
87
93
 
88
- Scripting connector generation directly in Python (calling `generate()` /
89
- `parse_config()` without the UI — see the [API reference](docs/api.md))
90
- doesn't need pyspark at all. In that case, just install the bare minimum
91
- deps with:
92
94
  ```bash
93
- pip install polymo
95
+ polymo
94
96
  ```
95
97
 
96
- Note that `pip install polymo` alone does not install the Builder UI, and
97
- `polymo` is never a dependency of the scripts it generates — nothing you
98
- export needs polymo installed to run.
99
-
100
- ## Launch the builder UI
98
+ Or without installing it first:
101
99
 
102
- ```bash
103
- polymo builder
100
+ ```bash
101
+ uvx polymo
104
102
  ```
105
103
 
106
104
  #### (Optional) Run the Builder in Docker
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "polymo"
3
- version = "1.1.0"
3
+ version = "1.2.0"
4
4
  description = "Generate standalone Lakeflow Declarative Pipelines scripts from a point-and-click REST connector builder"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -27,13 +27,8 @@ classifiers = [
27
27
  ]
28
28
  dependencies = [
29
29
  "jinja2>=3.1.6",
30
- ]
31
-
32
- [project.optional-dependencies]
33
- builder = [
34
30
  "fastapi>=0.110",
35
31
  "uvicorn>=0.24",
36
- "jinja2>=3.1.6",
37
32
  "pyspark>=4",
38
33
  "pyarrow>=13",
39
34
  "requests>=2.31",
@@ -0,0 +1,70 @@
1
+ """Command line entry points for polymo."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ from typing import Sequence
7
+
8
+
9
+ def main(argv: Sequence[str] | None = None) -> int:
10
+ parser = argparse.ArgumentParser(
11
+ prog="polymo", description="Launch the local polymo Builder UI"
12
+ )
13
+ parser.add_argument(
14
+ "--host", default="127.0.0.1", help="Host to bind (default: %(default)s)"
15
+ )
16
+ parser.add_argument(
17
+ "--port", type=int, default=8000, help="Port to bind (default: %(default)s)"
18
+ )
19
+ parser.add_argument(
20
+ "--reload",
21
+ action="store_true",
22
+ help="Enable auto-reload (useful during development)",
23
+ )
24
+
25
+ args = parser.parse_args(argv)
26
+
27
+ if not _require_builder_deps():
28
+ return 1
29
+
30
+ import uvicorn
31
+
32
+ uvicorn.run(
33
+ "polymo.builder.app:create_app",
34
+ host=args.host,
35
+ port=args.port,
36
+ reload=args.reload,
37
+ factory=True,
38
+ )
39
+ return 0
40
+
41
+
42
+ def _require_builder_deps() -> bool:
43
+ """Verify the install is intact (pyspark present and compatible).
44
+
45
+ polymo now depends on pyspark unconditionally, so a missing or
46
+ incompatible pyspark means the install itself is broken. Returns True
47
+ when the environment is ready to launch the builder. On a missing
48
+ pyspark install, prints a friendly hint and returns False so the caller
49
+ can exit cleanly instead of tracebacking.
50
+ """
51
+ try:
52
+ import pyspark
53
+ except ModuleNotFoundError:
54
+ print(
55
+ "polymo's dependencies are incomplete — reinstall with: "
56
+ "pip install --force-reinstall polymo"
57
+ )
58
+ return False
59
+
60
+ if not pyspark.__version__.startswith("4."):
61
+ raise ImportError(
62
+ "pyspark>=4.0.0 is required: reinstall with "
63
+ "pip install --force-reinstall polymo"
64
+ )
65
+
66
+ return True
67
+
68
+
69
+ if __name__ == "__main__": # pragma: no cover
70
+ raise SystemExit(main())
@@ -1,70 +0,0 @@
1
- """Command line entry points for polymo."""
2
-
3
- from __future__ import annotations
4
-
5
- import argparse
6
- from typing import Sequence
7
-
8
-
9
- def main(argv: Sequence[str] | None = None) -> int:
10
- parser = argparse.ArgumentParser(
11
- prog="polymo", description="Utilities for the polymo toolkit"
12
- )
13
- subparsers = parser.add_subparsers(dest="command")
14
- bld_parser = subparsers.add_parser("builder", help="Launch the local builder UI")
15
- bld_parser.add_argument(
16
- "--host", default="127.0.0.1", help="Host to bind (default: %(default)s)"
17
- )
18
- bld_parser.add_argument(
19
- "--port", type=int, default=8000, help="Port to bind (default: %(default)s)"
20
- )
21
- bld_parser.add_argument(
22
- "--reload",
23
- action="store_true",
24
- help="Enable auto-reload (useful during development)",
25
- )
26
-
27
- args = parser.parse_args(argv)
28
-
29
- if args.command == "builder":
30
- if not _require_builder_deps():
31
- return 1
32
-
33
- import uvicorn
34
-
35
- uvicorn.run(
36
- "polymo.builder.app:create_app",
37
- host=args.host,
38
- port=args.port,
39
- reload=args.reload,
40
- factory=True,
41
- )
42
- return 0
43
-
44
- parser.print_help()
45
- return 1
46
-
47
-
48
- def _require_builder_deps() -> bool:
49
- """Verify the ``builder`` extra (pyspark) is installed and compatible.
50
-
51
- Returns True when the environment is ready to launch the builder.
52
- On a missing pyspark install, prints a friendly hint and returns False
53
- so the caller can exit cleanly instead of tracebacking.
54
- """
55
- try:
56
- import pyspark
57
- except ModuleNotFoundError:
58
- print("The builder needs extras: pip install 'polymo[builder]'")
59
- return False
60
-
61
- if not pyspark.__version__.startswith("4."):
62
- raise ImportError(
63
- "pyspark>=4.0.0 is required: run pip install 'polymo[builder]'"
64
- )
65
-
66
- return True
67
-
68
-
69
- if __name__ == "__main__": # pragma: no cover
70
- raise SystemExit(main())
File without changes
File without changes
File without changes
File without changes