Python API
This commands section primarily focuses on using Singularity Python from within Python and then in an interactive shell (for testing). We will first discuss the Python API, meaning functions that you can use in python to work with Singularity images or instances. Python is strong in the world of scientific programming, and so if you are reading these notes it’s likely that you want to integrate Singularity containers into your Python applications. We wrote you a client to do that! Please select the type of command you are interested in below to continue!
- Images: base API to interact with containers:
- Instances: interact with container instances.
- OCI: interact with the OCI command group (3.1.0 and up)
Note that for any command that allows specifying sudo
, you can provide additional options to sudo
(e.g., -E
to preserve the environment) via sudo_options
.