wordslab = Wordslab()wordslab-notebooks-lib.core
Python SDK to programmatically access all services provided by wordslab-notebooks execution environment
wordslab-notebooks python SDK
The WordslabNotebooks class is the entry point to access all wordslab-notebooks resources.
Wordslab
def Wordslab(
):
Initialize self. See help(type(self)) for accurate signature.
wordslab.python_lib_version'0.0.11'
wordslab.env.version'2025-12'
Develop a Python library with nbdev
Install the python client library in development mode
cd $WORDSLAB_WORKSPACE/wordslab-notebooks-lib
source .venv/bin/activate
# Install nbdev and twine
# Install the wordslab-notebooks-lib python library in editable mode
uv sync --dev
# Install the current package in editable mode
uv pip install -e .Generate the python library from the source notebooks
cd $WORDSLAB_WORKSPACE/wordslab-notebooks-lib
source .venv/bin/activate
# Export notebooks to Python modules
nbdev_export
# Clean the notebooks before commit in git
nbdev_cleanTest the python client library
After installing the client library in development mode once, you can iterate fast: - create a notebook using the kernel “wordslab-notebooks-lib” - restart the kernel if needed - import wordslab_notebooks_lib - use the functions defined in the library
Publish the extension to pypi when ready
Create a file called ~/.pypirc with your token details. It should have these contents:
[pypi]
username = __token__
password = your_pypi_tokenThen execute the following commands:
cd $WORDSLAB_WORKSPACE/wordslab-notebooks-lib
source .venv/bin/activate
# Bump the version number
nbdev_bump_version
# Publish to PyPI
nbdev_pypi