Skip to content

Latest commit

 

History

History
291 lines (135 loc) · 5.78 KB

velocitas_lib.md

File metadata and controls

291 lines (135 loc) · 5.78 KB

module velocitas_lib


function get_valid_arch

get_valid_arch(arch: str) → str

Return a known architecture for the given arch.

Args:

  • arch (str): The architecture of the profile.

Returns:

  • str: valid architecture.

function require_env

require_env(name: str) → str

Require and return an environment variable.

Args:

  • name (str): The name of the variable.

Raises:

  • ValueError: In case the environment variable is not set.

Returns:

  • str: The value of the variable.

function get_workspace_dir

get_workspace_dir() → str

Return the workspace directory.


function get_app_manifest

get_app_manifest() → Dict[str, Any]

function get_script_path

get_script_path() → str

Return the absolute path to the directory the invoked Python script is located in.


function get_package_path

get_package_path() → str

Return the absolute path to the package directory the invoked Python script belongs to.


function get_project_cache_dir

get_project_cache_dir() → str

Return the project's cache directory.

Returns:

  • str: The path to the project's cache directory.

function get_cache_data

get_cache_data() → Dict[str, Any]

Return the data of the cache as Python object.


function get_log_file_name

get_log_file_name(service_id: str, runtime_id: str) → str

Build the log file name for the given service and runtime.

Args:

  • service_id (str): The ID of the service to log.
  • runtime_id (str): The ID of the runtime to log.

Returns:

  • str: The log file name.

function get_programming_language

get_programming_language() → str

Return the programming language of the project.


function create_log_file

create_log_file(service_id: str, runtime_id: str) → TextIOWrapper

Create a log file for the given service and runtime.

Args:

  • service_id (str): The ID of the service to log.
  • runtime_id (str): The ID of the runtime to log.

Returns:

  • TextIOWrapper: The log file.

function download_file

download_file(uri: str, local_file_path: str) → None

function is_uri

is_uri(path: str) → bool

Check if the provided path is a URI.

Args:

  • path (str): The path to check.

Returns:

  • bool: True if the path is a URI. False otherwise.

function obtain_local_file_path

obtain_local_file_path(
    path_or_uri: str,
    download_path: Optional[str] = None
) → str

Return the absolute path to the file, specified by a absolute/relative local path or with an URI.

Args:

  • path_or_uri (str): Absolute/relative local path or URI.
  • download_path (str): The path to download the file.

Returns:

  • str: The absolute path to the file.

This file was automatically generated via lazydocs.