code-interpreter template starts from Python 3.12 and includes
common data analysis, visualization, scraping, and ML packages.
Python Packages
ipykernel, jupyter_client, and
bash_kernel.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Python data, ML, plotting, and notebook packages included in the standard code-interpreter template.
code-interpreter template starts from Python 3.12 and includes
common data analysis, visualization, scraping, and ML packages.
numpy
pandas
matplotlib
seaborn
plotly
scipy
scikit-learn
pillow
requests
beautifulsoup4
nltk
opencv-python-headless
xgboost
ipykernel, jupyter_client, and
bash_kernel.
machine.install_packages(["humanize==4.9.0"])
result = machine.run_code("""
import humanize
print(humanize.intword(1234567))
""")
print("".join(result.logs.stdout))
nullspace machine code install mch_123 humanize==4.9.0
nullspace machine code run mch_123 "import humanize
print(humanize.intword(1234567))"
# install_packages runs a pip command through the code interpreter
# returns a Server-Sent Events stream of JSON events
curl -N -X POST "${NULLSPACE_API_URL}/v1/machines/mch_123/code/execute" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"code": "!pip install humanize==4.9.0"}'
curl -N -X POST "${NULLSPACE_API_URL}/v1/machines/mch_123/code/execute" \
-H "Authorization: Bearer ${NULLSPACE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"code": "import humanize\nprint(humanize.intword(1234567))"}'