Floating Server
The user has the ability to utilize either a Floating Client or a Floating Manager:
Floating Client:
Floating Manager:
- This object is responsible for managing operations with the Floating Server, while also integrating the Local License File
To initialize a Floating Client, the user must specify the API protocol and domain.
- api_protocol: Defines the communication protocol between the client and the server (e.g., "http").
- api_domain: Specifies the domain or IP address and port of the Floating Server (e.g., "localhost:8080").
- hardware_id_provider (optional): Provides the client's hardware ID, which can be used to uniquely identify the client machine.
Authenticate
Parameters:
- username (str): username
- password (str): password
Return(dict): Response
Register user
Parameters:
- product (str): product short code.
- user (str,optional): user. Defaults uses hardware id.
- os_hostname (str, optional): os hostname. Defaults to None.
- ip_local (str, optional): ip local. Defaults to None.
- user_info (str, optional): user info. Defaults to None.
- license_id (int, optional):license id. Defaults to None.
Return(dict): Response
Unregister user
Parameters
- product (str): product short code.
- user (str,optional): user. Defaults uses hardware id.
- license_id (int, optional): license id. Defaults to None.
Return(str): "user_unregistered"
Unregister all users
Borrow license
Parameters
- product (str): product short code.
- user (str,optional): user. Defaults uses hardware id.
- borrowed_until (str): borrow until date
- os_hostname (str, optional): os hostname. Defaults to None.
- ip_local (str, optional): ip local. Defaults to None.
- user_info (str, optional): user info. Defaults to None.
- license_id(int, optional):license id. Defaults to None.
Return(dict): Response
Add license consumption
Parameters
- product (str): product short code
- consumptions (int, optional): consumptions. Defaults to 1.
- max_overages (int, optional): max overages. Defaults to None.
- allow_overages (bool, optional): allow overages. Defaults to None.
- user (str, optional): user (default uses hardware id)
- license_id (int, optional): license id. Defaults to None.
Return(dict): Response
Add feature consumption
Parameters
- product (str): product short code
- feature_code (str): feature code
- user (str, optional): user (default uses hardware id)
- consumptions (int, optional): consumptions. Defaults to 1.
- license_id (int, optional): license id. Defaults to None.
Return(dict): Response
Register feature
Parameters
- product (str): product short code
- feature_code (str): feature short code
- user (str, optional): user (default uses hardware id)
- license_id (int, optional): license id. Defaults to None.
- borrowed_until (str): borrow until (e.g. 2029-05-06T00:00:00Z)
- os_hostname (str, optional): os hostname. Defaults to None.
- ip_local (str, optional): ip local. Defaults to None.
- user_info (str, optional): user info. Defaults to None.
Return(dict): Response
Feature release
Parameters
- product (str): product short code
- feature_code (str): feature short code
- user (str, optional): user (default uses hardware id)
- license_id (int, optional): license id. Defaults to None.
Return(str): "feature_released"
To intialize Floating Manager Python SDK Configuration needs to be created. For Floating server you can set arbitrary values for shared_key and api_key keys.
Authenticate
Parameters:
- username (str): username
- password (str): password
Return(dict): Response
Register license
Parameters:
- os_hostname (str, optional): os hostname. Defaults to None.
- ip_local (str, optional): ip local. Defaults to None.
- user_info (str, optional): user info. Defaults to None.
- license_id (int, optional):license id. Defaults to None.
Return(License): License object
Unregister license
Parameters
- license_id (int, optional): license id. Defaults to None.
Return(str): "user_unregistered"
Unregister all users
Borrow license
Parameters
- borrowed_until (str): borrow until date
- os_hostname (str, optional): os hostname. Defaults to None.
- ip_local (str, optional): ip local. Defaults to None.
- user_info (str, optional): user info. Defaults to None.
- license_id(int, optional):license id. Defaults to None.
Return(License): License object
Checks if floating server is online
Parameters
- throw_e (bool, optional): True if you want to raise an exception. Defaults to False.
Raises:
- ex: Exception
Return(bool): True if server is online, otherwise False
License consumptions, feature consumptions, register feature, release feature are supported with License object for Floating Server.