biosimulators_utils.licensing package#
Submodules#
biosimulators_utils.licensing.core module#
Tool for managing licenses through environment variables
- Author:
Jonathan Karr <karr@mssm.edu>
- Date:
2021-09-1
- Copyright:
2021, Center for Reproducible Biomedical Modeling
- License:
MIT
- class biosimulators_utils.licensing.core.LicenseManager[source]#
Bases:
AbstractContextManager
Base singleton class for managing setting up licenses for software packages from environment variables
- abstract property ENV_VAR_PREFIX[source]#
Get the prefix for environment variables
- Returns:
prefix for environment variables
- Return type:
str
- __exit__(exc_type, exc_value, traceback)[source]#
Exit a context
- Parameters:
exc_type
exc_value
traceback
- get_keys_from_env_vars()[source]#
Get the license keys for the software package from environment variables
- Returns:
environment license variables for a software package
- Return type:
dict
biosimulators_utils.licensing.gurobi module#
Tool for managing Gurobi licenses through environment variables
- Author:
Jonathan Karr <karr@mssm.edu>
- Date:
2021-09-1
- Copyright:
2021, Center for Reproducible Biomedical Modeling
- License:
MIT
- class biosimulators_utils.licensing.gurobi.GurobiLicenseManager[source]#
Bases:
LicenseManager
Gurobi license manager
- get_keys_from_env_vars()[source]#
Get the license keys for the software package from environment variables
- Returns:
environment license variables for a software package
- Return type:
dict
- is_package_available()[source]#
Determine whether the package is installed
- Returns:
whether the package is installed
- Return type:
bool