lucit_ubdcc_shared_modules package

Submodules

lucit_ubdcc_shared_modules.App module

class lucit_ubdcc_shared_modules.App.App(app_name=None, cwd=None, logger=None, service=None, service_call=None, stop_call=None)[source]

Bases: object

deactivate_license(close_api_session: bool = True) bool | None[source]
static generate_string(length)[source]
async get_backup_from_node(host, port) dict | None[source]
get_backup_timestamp() float | None[source]
async get_backup_timestamp_from_node(host, port) float | None[source]
get_cluster_mgmt_address()[source]
get_dcn_uid_unused_longest_time(selection: list = None) str | None[source]
get_fastapi_instance() FastAPI[source]
get_k8s_nodes() dict[source]
get_k8s_runtime_information()[source]
static get_unix_timestamp()[source]
static get_version() str[source]
static is_compiled() bool[source]
is_shutdown() bool[source]
register_graceful_shutdown() None[source]
async register_or_restart(ubldc_version: str = None)[source]
async static request(url, method, params=None, headers=None, timeout=10) dict[source]
async send_backup_to_node(host, port) dict[source]
set_api_rest_port()[source]
set_status_running() bool[source]
shutdown(message=None) None[source]
sigterm_handler(signal, frame) None[source]
async sleep(seconds: int = 10) bool[source]
static sort_dict(input_dict: dict, reverse: bool = False) dict[source]
start() None[source]
start_licensing_manager() bool[source]
stdout_msg(msg=None, log=None, stdout=True) bool[source]
async ubdcc_get_responsible_dcn_addresses(exchange: str = None, market: str = None)[source]
async ubdcc_node_cancellation()[source]
async ubdcc_node_registration(ubldc_version: str = None, retries: int = 30) bool[source]
async ubdcc_node_sync() bool[source]
async ubdcc_update_depthcache_distribution(exchange: str = None, market: str = None, last_restart_time: int = None, status: str = None) bool[source]
verify_license() bool[source]

lucit_ubdcc_shared_modules.Database module

class lucit_ubdcc_shared_modules.Database.Database(app=None)[source]

Bases: object

add_depthcache(exchange: str = None, market: str = None, desired_quantity: int = None, update_interval: int = None, refresh_interval: int = None) bool[source]
add_depthcache_distribution(exchange: str = None, market: str = None, pod_uid: str = None, scheduled_start_time: float = None) bool[source]
add_pod(name: str = None, uid: str = None, node: str = None, role: str = None, ip: str = None, api_port_rest: int = None, status: str = None, ubldc_version: str = None, version: str = None) bool[source]
delete(key: str = None) bool[source]
delete_depthcache(exchange: str = None, market: str = None) bool[source]
delete_depthcache_distribution(exchange: str = None, market: str = None, pod_uid: str = None) bool[source]
delete_old_pods() bool[source]
delete_pod(uid: str = None) bool[source]
exists_depthcache(exchange: str = None, market: str = None) bool[source]
exists_pod(uid: str = None) bool[source]
get(key: str = None)[source]
get_all() dict[source]
get_available_dcn_pods() dict[source]
get_backup_dict() dict[source]
get_best_dcn(available_pods: dict = None, excluded_pods: list = None) str | None[source]
get_dcn_responsibilities() list[source]
get_depthcache_info(exchange: str = None, market: str = None) dict[source]
get_depthcache_list() dict[source]
get_license_api_secret() str[source]
get_license_license_token() str[source]
get_license_status() str[source]
get_pod_by_address(address: str = None) dict | None[source]
get_pod_by_uid(uid=None) dict | None[source]
get_responsible_dcn_addresses(exchange: str = None, market: str = None) list[source]
get_worst_dcn(available_pods: dict | None = None, excluded_pods: list = None) str | None[source]
is_empty() bool[source]
manage_distribution() bool[source]
remove_orphaned_distribution_entries() bool[source]
replace_data(data: dict = None)[source]
revise() bool[source]
set(key: str = None, value: dict | str | float | list | set | tuple = None) bool[source]
set_license_status(status: str = None) bool[source]
submit_license(api_secret: str = None, license_token: str = None) bool[source]
update_depthcache(desired_quantity: int = None, exchange: str = None, refresh_interval: int = None, market: str = None, update_interval: int = None) bool[source]
update_depthcache_distribution(exchange: str = None, market: str = None, pod_uid: str = None, last_restart_time: float = None, status: str = None) bool[source]
update_nodes() bool[source]
update_pod(uid: str = None, node: str = None, ip: str = None, api_port_rest: int = None, status: str = None) bool[source]

lucit_ubdcc_shared_modules.LicensingExceptions module

exception lucit_ubdcc_shared_modules.LicensingExceptions.NoValidatedLucitLicense[source]

Bases: Exception

No valid LUCIT license verification.

lucit_ubdcc_shared_modules.LicensingManager module

class lucit_ubdcc_shared_modules.LicensingManager.LucitLicensingManager(api_secret: str | None = None, license_token: str | None = None, license_ini: str | None = None, license_profile: str | None = None, program_used: str | None = None, start: bool = True, parent_shutdown_function: Callable[[bool], bool] = None, needed_license_type: str | None = None)[source]

Bases: Thread

close(close_api_session: bool = True, key_value: str = None) dict[source]
get_info(api_secret: str = None, license_token: str = None) dict[source]
get_license_exception()[source]
get_module_version()[source]
get_quotas(api_secret: str = None, license_token: str = None) dict[source]
get_timestamp() dict[source]
get_version() dict[source]
is_verified() bool[source]
process_licensing_error(info: str = None)[source]
reset(api_secret: str = None, license_token: str = None) dict[source]
run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

set_license_exception(error)[source]
stop() dict[source]
sync_time() bool[source]
test() dict[source]
verify(api_secret: str = None, license_token: str = None, key_value: str = None) dict[source]

lucit_ubdcc_shared_modules.RestEndpointsBase module

class lucit_ubdcc_shared_modules.RestEndpointsBase.RestEndpointsBase(app=None)[source]

Bases: object

create_cluster_info_response() dict[source]
static create_debug_response(process_start_time: float = None, url: str = None, used_pods: list = None) dict[source]
create_depthcache_info_response(exchange: str = None, market: str = None) dict[source]
create_depthcache_list_response() dict[source]
get_error_response(event: str = None, error_id: str = None, message: str = None, params: dict = None, process_start_time: float = None, url: str = None, used_pods: list = None)[source]
get_fastapi_instance()[source]
get_ok_response(event: str = None, params: dict = None, process_start_time: float = None, url: str = None, used_pods: list = None)[source]
is_ready()[source]
register()[source]
async test(request: Request)[source]
throw_error_if_mgmt_not_ready(request: Request, event: str = None)[source]
async ubdcc_mgmt_backup(request: Request)[source]

lucit_ubdcc_shared_modules.RestServer module

class lucit_ubdcc_shared_modules.RestServer.RestServer(app=None, endpoints=None, port=None)[source]

Bases: Thread

run() None[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

stop() bool[source]

lucit_ubdcc_shared_modules.ServiceBase module

class lucit_ubdcc_shared_modules.ServiceBase.ServiceBase(app_name=None, cwd=None)[source]

Bases: object

db_init() bool[source]
static is_port_free(port, host='127.0.0.1')[source]
async main() None[source]
run() None[source]
async start_rest_server(endpoints=None) bool[source]
stop() bool[source]

Module contents