roseau.load_flow.license#

Module Contents#

Classes#

License

A class to access the main data of the License.

Functions#

activate_license(→ None)

Activate a license in the current process.

deactivate_license(→ None)

Deactivate the currently active license.

get_license(→ License | None)

Get the currently active license or None if no license is activated.

class License(cy_license: roseau.load_flow_engine.cy_engine.CyLicense)#

A class to access the main data of the License.

Constructor for a License

Parameters:

cy_license – The Cython license object

property key: str#

The key of the license. Please do not share this key.

property expiry_datetime: datetime | None#

The expiry date of the license or None if the license has no expiry date.

property valid: bool#

Is the license valid?

property max_nb_buses: int | None#

The maximum allowed number of buses for a network. If None, the license has no limitation.

property machine_fingerprint: str#

The anonymized machine fingerprint for license validation.

static get_hostname() str#

This method retrieves the hostname of your computer.

static get_username() str#

This method retrieves your username.

activate_license(key: str | None = None) None#

Activate a license in the current process.

Parameters:

key – The key of the license to activate. If None is provided (default), the environment variable ROSEAU_LOAD_FLOW_LICENSE_KEY is used. If this variable is not set, an error is raised.

deactivate_license() None#

Deactivate the currently active license.

get_license() License | None#

Get the currently active license or None if no license is activated.