Package fusion_platform
This package contains the Python SDK used to interact with the Fusion Platform®. The Fusion Platform® provides enhanced remote monitoring services. By ingesting remotely sensed Earth Observation (EO) data, and data from other sources, the platform uses and fuses this data to execute algorithms which provide actionable knowledge to customers.
The Python SDK is designed to enable interaction with the Fusion Platform® via its API. As such, the SDK therefore allows software to login, upload files, create and execute processes, monitor their execution and then download the corresponding results. Additional functionality is available directly via the API, and this is defined within the corresponding OpenAPI 3.0 specification, which can be obtained via a support request.
Sub-modules
fusion_platform.models-
This sub-module contains the data models for the SDK …
fusion_platform.session-
Session class file …
Functions
def get_log_level()-
Expand source code
def get_log_level(): """ Gets the logging level for the SDK. Returns: The current log level, as specified by the logging package. """ logger = logging.getLogger(FUSION_PLATFORM_LOGGER) return logger.levelGets the logging level for the SDK.
Returns
The current log level, as specified by the logging package.
def login(email=None, user_id=None, password=None, api_url=None, session_options=None)-
Expand source code
def login(email=None, user_id=None, password=None, api_url=None, session_options=None): """ Attempts to log into the Fusion Platform<sup>®</sup> to return a user model for the active session. Args: email: The user account email address. Either an email address or a user id must be provided. user_id: The user account user id. Either an email address or a user id must be provided. password: The password for the user account. api_url: The optional custom API URL to use. Defaults to the production Fusion Platform<sup>®</sup>. session_options: The optional options to be passed to the session. Returns: The corresponding user model for the account on successful login. Raises: ValueError: on incorrect parameters. RequestError: on login failure. """ # Create the session and attempt to login. session = Session(options=session_options) session.login(email, user_id, password, api_url) # Now load the corresponding user model using the user id obtained from the session. return User._model_from_api_id(session, id=session.user_id)Attempts to log into the Fusion Platform® to return a user model for the active session.
Args
email- The user account email address. Either an email address or a user id must be provided.
user_id- The user account user id. Either an email address or a user id must be provided.
password- The password for the user account.
api_url- The optional custom API URL to use. Defaults to the production Fusion Platform®.
session_options- The optional options to be passed to the session.
Returns
The corresponding user model for the account on successful login.
Raises
ValueError- on incorrect parameters.
RequestError- on login failure.
def set_log_level(level)-
Expand source code
def set_log_level(level): """ Sets the logging level for the SDK. Args: level: The required log level, as specified by the logging package. For example, """ logger = logging.getLogger(FUSION_PLATFORM_LOGGER) logger.setLevel(level)Sets the logging level for the SDK.
Args
level- The required log level, as specified by the logging package. For example,