2019-04-16 23:12:21 +03:00
|
|
|
""" Azure IoT Device Library
|
|
|
|
|
|
|
|
This library provides clients and associated models for communicating with Azure IoT services
|
|
|
|
from an IoT device.
|
|
|
|
"""
|
|
|
|
|
2020-04-10 03:32:16 +03:00
|
|
|
# Import all exposed items in subpackages to expose them via this package
|
2022-04-14 22:56:33 +03:00
|
|
|
from .iothub import * # noqa: F401, F403
|
|
|
|
from .provisioning import * # noqa: F401, F403
|
|
|
|
from .common import * # noqa: F401, F403 TODO: do we really want to do this?
|
2020-04-10 03:32:16 +03:00
|
|
|
|
|
|
|
# Import the subpackages themselves in order to set the __all__
|
2019-04-16 23:12:21 +03:00
|
|
|
from . import iothub
|
2019-05-14 23:22:38 +03:00
|
|
|
from . import provisioning
|
2019-08-20 03:12:44 +03:00
|
|
|
from . import common
|
2019-05-14 23:22:38 +03:00
|
|
|
|
2020-04-10 03:32:16 +03:00
|
|
|
# Import the module to generate missing documentation
|
|
|
|
from . import patch_documentation
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: remove this chunk of commented code if we truly no longer want to take this approach
|
|
|
|
|
|
|
|
# Dynamically patch the clients to add shim implementations for all the inherited methods.
|
|
|
|
# This is necessary to generate accurate online docs.
|
|
|
|
# It SHOULD not impact the functionality of the methods themselves in any way.
|
2020-03-12 00:58:18 +03:00
|
|
|
|
2020-04-10 03:32:16 +03:00
|
|
|
# NOTE In the event of addition of new methods and generation of accurate documentation
|
|
|
|
# for those methods we have to append content to "patch_documentation.py" file.
|
|
|
|
# In order to do so please uncomment the "patch.add_shims" lines below,
|
|
|
|
# enable logging with level "DEBUG" in a python terminal and do
|
|
|
|
# "import azure.iot.device". The delta between the newly generated output
|
|
|
|
# and the existing content of "patch_documentation.py" should be appended to
|
|
|
|
# the function "execute_patch_for_sync" in "patch_documentation.py".
|
2022-02-11 01:27:22 +03:00
|
|
|
# Once done please again comment out the "patch.add_shims" lines below.
|
2020-03-12 00:58:18 +03:00
|
|
|
|
2022-02-11 01:27:22 +03:00
|
|
|
# from . import patch
|
2020-04-10 03:32:16 +03:00
|
|
|
# patch.add_shims_for_inherited_methods(IoTHubDeviceClient) # noqa: F405
|
|
|
|
# patch.add_shims_for_inherited_methods(IoTHubModuleClient) # noqa: F405
|
|
|
|
# patch.add_shims_for_inherited_methods(ProvisioningDeviceClient) # noqa: F405
|
|
|
|
patch_documentation.execute_patch_for_sync()
|
2019-04-16 23:12:21 +03:00
|
|
|
|
|
|
|
|
2019-08-20 03:12:44 +03:00
|
|
|
# iothub and common subpackages are still showing up in intellisense
|
2019-04-16 23:12:21 +03:00
|
|
|
|
2020-04-10 03:32:16 +03:00
|
|
|
__all__ = iothub.__all__ + provisioning.__all__ + common.__all__
|