openavmkit.cloud.azure
AzureAnonymousService
AzureAnonymousService(container_url, access)
Bases: AzureService
Azure-specific CloudService object.
Attributes:
| Name | Type | Description |
|---|---|---|
connection_string |
str
|
Your Azure connection string |
blob_service_client |
BlobServiceClient
|
Azure Blob Service Client |
container_client |
ContainerClient
|
Azure Container Client |
Initialize AzureService object
Attributes:
| Name | Type | Description |
|---|---|---|
container_url |
str
|
The url of a publicly accessible Azure container |
access |
CloudAccess
|
What kind of access/permission ("read_only", "read_write") |
Source code in openavmkit/cloud/azure.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
upload_file
upload_file(remote_file_path, local_file_path)
Upload a local file to the Azure service
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
remote_file_path
|
str
|
The remote path on the Azure service you want to upload your local file to |
required |
local_file_path
|
str
|
The local path to the file on your local computer that you want to upload |
required |
Source code in openavmkit/cloud/azure.py
166 167 168 169 170 171 172 173 174 175 176 177 178 179 | |
AzureCredentials
AzureCredentials(connection_string)
Bases: CloudCredentials
Authentication credentials for Azure
Initialize AzureCredentials object
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_string
|
str
|
Your Azure connection string |
required |
Source code in openavmkit/cloud/azure.py
15 16 17 18 19 20 21 22 23 24 | |
AzureService
AzureService(credentials, container_name, access)
Bases: CloudService
Azure-specific CloudService object.
Attributes:
| Name | Type | Description |
|---|---|---|
connection_string |
str
|
Your Azure connection string |
blob_service_client |
BlobServiceClient
|
Azure Blob Service Client |
container_client |
ContainerClient
|
Azure Container Client |
Initialize AzureService object
Attributes:
| Name | Type | Description |
|---|---|---|
credentials |
AzureCredentials
|
Authentication credentials for Azure |
container_name |
str
|
The name of your Azure container |
access |
CloudAccess
|
What kind of access/permission ("read_only", "read_write") |
Source code in openavmkit/cloud/azure.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
download_file
download_file(remote_file, local_file_path)
Download a remote file from the Azure service
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
remote_file
|
CloudFile
|
The file to download |
required |
local_file_path
|
str
|
The path on your local computer you want to save the remote file to |
required |
Source code in openavmkit/cloud/azure.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | |
list_files
list_files(remote_path)
List all the files at the given path on Azure
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
remote_path
|
str
|
Path on Azure you want to query |
required |
Returns:
| Type | Description |
|---|---|
list[CloudFile]
|
A listing of all the files contained within the queried path on the remote Azure service |
Source code in openavmkit/cloud/azure.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
upload_file
upload_file(remote_file_path, local_file_path)
Upload a local file to the Azure service
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
remote_file_path
|
str
|
The remote path on the Azure service you want to upload your local file to |
required |
local_file_path
|
str
|
The local path to the file on your local computer that you want to upload |
required |
Source code in openavmkit/cloud/azure.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
get_creds_from_env_azure
get_creds_from_env_azure()
Reads and returns Azure credentials from the environment settings
Returns:
| Type | Description |
|---|---|
AzureCredentials
|
The credentials for Azure stored in environment settings |
Source code in openavmkit/cloud/azure.py
224 225 226 227 228 229 230 231 232 233 234 235 | |
init_service_azure
init_service_azure(credentials, access, cloud_settings)
Initializes the Azure service
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
credentials
|
AzureCredentials
|
The credentials to your Azure account |
required |
access
|
CloudAccess
|
What kind of access/permission ("read_only", "read_write") |
required |
cloud_settings
|
dict
|
Local project settings for cloud storage |
required |
Source code in openavmkit/cloud/azure.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |