chris.models.types
NewTypes for ChRIS models.
1""" 2NewTypes for ChRIS models. 3""" 4 5from typing import NewType, Union 6 7Username = NewType("Username", str) 8"""ChRIS user account username""" 9Password = NewType("Password", str) 10"""ChRIS user account password""" 11ChrisURL = NewType("ChrisURL", str) 12"""ChRIS backend API base URL""" 13 14ApiUrl = NewType("ApiUrl", str) 15"""Any CUBE URL which I am too lazy to be more specific about.""" 16ResourceId = NewType("ResourceId", int) 17"""ID number which I am too lazy to be more specific about.""" 18PluginName = NewType("PluginName", str) 19"""Name of a ChRIS plugin""" 20ImageTag = NewType("ImageTag", str) 21"""OCI image tag (informally, a Docker Image name)""" 22PluginVersion = NewType("PluginVersion", str) 23"""Version string of a ChRIS plugin""" 24 25PluginUrl = NewType("PluginUrl", str) 26""" 27URL of a ChRIS plugin. 28 29## Examples 30 31- https://chrisstore.co/api/v1/plugins/5/ 32- https://cube.chrisproject.org/api/v1/plugins/6/ 33""" 34PluginSearchUrl = NewType("PluginSearchUrl", str) 35 36PluginId = NewType("PluginId", int) 37 38UserUrl = NewType("UserUrl", str) 39UserId = NewType("UserId", int) 40 41AdminUrl = NewType("AdminUrl", str) 42"""A admin resource URL ending with `/chris-admin/api/v1/`""" 43ComputeResourceName = NewType("ComputeResourceName", str) 44ComputeResourceId = NewType("ComputeResourceId", str) 45 46PfconUrl = NewType("PfconUrl", str) 47 48FeedId = NewType("FeedId", str) 49 50 51CubeFilePath = NewType("CubeFilePath", str) 52 53 54CUBEErrorCode = NewType("CUBEErrorCode", str) 55 56ContainerImageTag = NewType("ContainerImageTag", str) 57 58PipingId = NewType("PipingId", int) 59PipelineId = NewType("PipelineId", int) 60 61 62ParameterName = NewType("ParameterName", str) 63ParameterType = Union[str, int, float, bool] 64 65PipelineParameterId = NewType("ParameterLocalId", int) 66PluginParameterId = NewType("ParameterGlobalId", int) 67PluginInstanceId = NewType("PluginInstanceId", int) 68 69FileFname = NewType("FileFname", str) 70FileResourceName = NewType("FileResourceName", str) 71FileId = NewType("FileId", int) 72 73FilesUrl = NewType("FilesUrl", str) 74FileResourceUrl = NewType("FileResourceUrl", str) 75PipelineUrl = NewType("PipelineUrl", str) 76PipingsUrl = NewType("PipingsUrl", str) 77PipelinePluginsUrl = NewType("PipelinePluginsUrl", str) 78PipelineDefaultParametersUrl = NewType("PipelineDefaultParametersUrl", str) 79PipingUrl = NewType("PipingUrl", str) 80 81PipelineParameterUrl = NewType("PipingParameterUrl", str) 82PluginInstanceUrl = NewType("PluginInstanceUrl", str) 83PluginInstancesUrl = NewType("PluginInstancesUrl", str) 84DescendantsUrl = NewType("DescendantsUrl", str) 85PipelineInstancesUrl = NewType("PipelineInstancesUrl", str) 86PluginInstanceParamtersUrl = NewType("PluginInstanceParametersUrl", str) 87ComputeResourceUrl = NewType("ComputeResourceUrl", str) 88SplitsUrl = NewType("SplitsUrl", str) 89FeedUrl = NewType("FeedUrl", str) 90NoteId = NewType("NoteId", int) 91"""A feed note's ID number.""" 92NoteUrl = NewType("NoteUrl", str) 93""" 94A feed's note URL. 95 96## Examples 97 98- https://cube.chrisproject.org/api/v1/note4/ 99""" 100PluginParametersUrl = NewType("PluginParametersUrl", str) 101TagsUrl = NewType("TagsUrl", str) 102TaggingsUrl = NewType("TaggingsUrl", str) 103CommentsUrl = NewType("CommentsUrl", str)
Username = chris.models.types.Username
ChRIS user account username
Password = chris.models.types.Password
ChRIS user account password
ChrisURL = chris.models.types.ChrisURL
ChRIS backend API base URL
ApiUrl = chris.models.types.ApiUrl
Any CUBE URL which I am too lazy to be more specific about.
ResourceId = chris.models.types.ResourceId
ID number which I am too lazy to be more specific about.
PluginName = chris.models.types.PluginName
Name of a ChRIS plugin
ImageTag = chris.models.types.ImageTag
OCI image tag (informally, a Docker Image name)
PluginVersion = chris.models.types.PluginVersion
Version string of a ChRIS plugin
PluginUrl = chris.models.types.PluginUrl
URL of a ChRIS plugin.
Examples
AdminUrl = chris.models.types.AdminUrl
A admin resource URL ending with /chris-admin/api/v1/
NoteId = chris.models.types.NoteId
A feed note's ID number.
NoteUrl = chris.models.types.NoteUrl