Azure Synapse Analytics Notebook Utilities Stub

raw JSON →
1.6.3 verified Fri May 01 auth: no python

A stub package that mimics the `mssparkutils` API from Azure Synapse Analytics notebooks, allowing local development and CI builds without a Synapse environment. Current version is 1.6.3. Released on PyPI with low cadence; no official changelog.

pip install dummy-notebookutils
error ModuleNotFoundError: No module named 'notebookutils'
cause Package not installed or installed in a different environment.
fix
Run pip install dummy-notebookutils and ensure the Python environment is the same as the execution context.
error AttributeError: module 'notebookutils' has no attribute 'mssparkutils'
cause Import path mistake; common wrong import: `from mssparkutils import mssparkutils`.
fix
Use from notebookutils import mssparkutils (the stub's top-level module is notebookutils).
gotcha All functions return dummy/placeholder values, not real data. The package is intended only for local development and CI; never use in production.
fix Wrap usage in a try-except or environment check to use real mssparkutils on Synapse and dummy locally.
breaking The package may not cover all mssparkutils APIs. Methods like `mssparkutils.env` or newer additions may be missing.
fix Check the stub's source code on GitHub to verify method existence before relying on it.
deprecated The package is no longer actively maintained; no updates since 2023.
fix Consider alternatives like `mssparkutils` stubs from other sources or mock the API yourself.
pip install dummy-notebookutils==1.6.3

Basic usage to verify import and understand the dummy API.

from notebookutils import mssparkutils

# Example: list files in a lakehouse path
path = "abfss://container@storage.dfs.core.windows.net/"
files = mssparkutils.fs.ls(path)
print(files)

# Example: get secret (dummy returns placeholder)
secret = mssparkutils.credentials.getSecret("my-key-vault", "my-secret")
print(secret)