Skip to content

Commit 9189da1

Browse files
committed
py-files support locally
1 parent 202b77b commit 9189da1

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,21 @@ The SDK automatically handles all dependency packaging for Data Cloud deployment
104104

105105
**No need to worry about platform compatibility** - the SDK handles this automatically through the Docker-based packaging process.
106106

107+
## py-files directory
108+
109+
Your Python dependencies can be packaged as .py files, .zip archives (containing multiple .py files or a Python package structure), or .egg files.
110+
111+
```
112+
.
113+
├── payload
114+
│ ├── config.json
115+
│ ├── entrypoint.py
116+
├── py-files
117+
│ ├── moduleA
118+
│ │ ├── __init__.py
119+
│ │ ├── moduleA.py
120+
```
121+
107122
## API
108123

109124
Your entry point script will define logic using the `Client` object which wraps data access layers.

src/datacustomcode/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def run_entrypoint(
3535
dependencies: The dependencies to import.
3636
profile: The credentials profile to use.
3737
"""
38+
add_py_folder(entrypoint)
3839
if profile != "default":
3940
if config.reader_config and hasattr(config.reader_config, "options"):
4041
config.reader_config.options["credentials_profile"] = profile
@@ -56,7 +57,6 @@ def run_entrypoint(
5657
raise exc
5758
except (ModuleNotFoundError, AttributeError) as inner_exc:
5859
raise inner_exc from exc
59-
add_py_folder(entrypoint)
6060
runpy.run_path(entrypoint, init_globals=globals(), run_name="__main__")
6161

6262

0 commit comments

Comments
 (0)