dre-cli 0.0.1a14__py3-none-win_arm64.whl
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.
- dre_cli/__init__.py +33 -0
- dre_cli/__main__.py +3 -0
- dre_cli/bin/dre-receipt.json +1 -0
- dre_cli/bin/dre.exe +0 -0
- dre_cli-0.0.1a14.dist-info/METADATA +30 -0
- dre_cli-0.0.1a14.dist-info/RECORD +9 -0
- dre_cli-0.0.1a14.dist-info/WHEEL +4 -0
- dre_cli-0.0.1a14.dist-info/entry_points.txt +2 -0
- dre_cli-0.0.1a14.dist-info/top_level.txt +1 -0
dre_cli/__init__.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""DRE, the Declarative Reporting Engine, as a Python package.
|
|
2
|
+
|
|
3
|
+
The package holds the `dre` executable; `dre` (the console command) runs it. Plugins aren't
|
|
4
|
+
bundled: `dre` installs the ones a project declares on demand.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import subprocess
|
|
9
|
+
import sys
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
__version__ = "0.0.1a14"
|
|
13
|
+
DRE_VERSION = "0.0.1-alpha-14"
|
|
14
|
+
|
|
15
|
+
_HERE = Path(__file__).resolve().parent
|
|
16
|
+
_EXE = ".exe" if os.name == "nt" else ""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def executable() -> str:
|
|
20
|
+
"""Path to the bundled `dre` executable."""
|
|
21
|
+
return str(_HERE / "bin" / ("dre" + _EXE))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def run(args, **kwargs):
|
|
25
|
+
"""Run `dre <args>` and return the CompletedProcess (for Python callers, e.g. a Databricks job)."""
|
|
26
|
+
return subprocess.run([executable(), *args], **kwargs)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main():
|
|
30
|
+
exe = executable()
|
|
31
|
+
if os.name == "nt":
|
|
32
|
+
sys.exit(subprocess.run([exe, *sys.argv[1:]]).returncode)
|
|
33
|
+
os.execv(exe, [exe, *sys.argv[1:]])
|
dre_cli/__main__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"schema": 1, "source": "pypi", "version": "0.0.1-alpha-14"}
|
dre_cli/bin/dre.exe
ADDED
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dre-cli
|
|
3
|
+
Version: 0.0.1a14
|
|
4
|
+
Summary: DRE, the Declarative Reporting Engine: SQL in, formatted files out
|
|
5
|
+
Home-page: https://github.com/allenhori/dre
|
|
6
|
+
Project-URL: Source, https://github.com/allenhori/dre
|
|
7
|
+
License: GPL-3.0-only
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
9
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
10
|
+
Requires-Python: >=3.8
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# dre-cli
|
|
14
|
+
|
|
15
|
+
[DRE](https://github.com/allenhori/dre), the Declarative Reporting Engine: SQL in, formatted files out.
|
|
16
|
+
DRE runs SQL reports and writes csv, delimited, fixed-width, parquet or xlsx files, then delivers
|
|
17
|
+
them (S3, GCS, Azure Blob, SFTP/FTP, Databricks Volumes and workspace files, email, Slack).
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install dre-cli # or: uv tool install dre-cli
|
|
21
|
+
dre --help
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This package holds the `dre` 0.0.1-alpha-14 executable. Plugins (databases, file formats,
|
|
25
|
+
destinations) are installed by `dre` on demand, for the ones a project declares. From Python:
|
|
26
|
+
`dre_cli.run(["run", "-s", "daily"])`.
|
|
27
|
+
|
|
28
|
+
In a Databricks job, add `dre-cli` to the job's environment dependencies and run `dre` (or
|
|
29
|
+
`python -m dre_cli`) from a script or notebook. See the
|
|
30
|
+
[README](https://github.com/allenhori/dre#readme) for everything else.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
dre_cli/bin/dre.exe,sha256=kxXUEhdlR9detQB7pxf5Nn3Pf2kQKC7PgOWYT2Sl8cI,12917760
|
|
2
|
+
dre_cli/bin/dre-receipt.json,sha256=WoO0yrxaGGn4T41rd2SvmOCkU77aGE93RmUzSpEACz0,61
|
|
3
|
+
dre_cli/__init__.py,sha256=dfFRaHHWHzWr4lcWVjNut2cFnfCn9zTPbhUhZR4nRJU,906
|
|
4
|
+
dre_cli/__main__.py,sha256=wPCT2_wDa23juvdKNb_YkgW4E5byTdL-hjqLvM3rCjg,33
|
|
5
|
+
dre_cli-0.0.1a14.dist-info/METADATA,sha256=I3uFTL49cjyUqAT007_qlAYBuCBYATDFX2gHq1NYAeM,1268
|
|
6
|
+
dre_cli-0.0.1a14.dist-info/WHEEL,sha256=q0B5LsDArWz5OT_VuTmtsKJhs1SK56iUyXLHkhQPvuQ,97
|
|
7
|
+
dre_cli-0.0.1a14.dist-info/entry_points.txt,sha256=ErbHoqxGE930UI1QZPQnobT67HzlU_Hah0VsPLljquw,37
|
|
8
|
+
dre_cli-0.0.1a14.dist-info/top_level.txt,sha256=Q8UG4UYFMGyS6ExDYiiSNNPV9KSVcIELxnhX2qy1a2o,8
|
|
9
|
+
dre_cli-0.0.1a14.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dre_cli
|