## Project description

A Python library to write Data Adapters and Metadata Adapters for Lightstreamer Server. The adapters will run in a separate process, communicating with the Server through the Adapter Remoting Infrastructure.

## Use

Install the package:

### Connect a Client

var lsClient = new LightstreamerClient(LS_SERVER_HOST, "PROXY_PYTHON");
lsClient.connect();
// To be completed with other client side activities, like registration of subscriptions and handling of
// ...

where LS_SERVER_HOST is the host of the Lightstreamer Server, and "PROXY_PYTHON" is the Adapter Set ID as specified in the adapters.xml file.

### API Reference

You can generate it by executing the following command from the doc folder:

\$ make html

The generated documentation will be available under the doc\_build\html folder.

## Lightstreamer Compatibility Notes

Compatible with Adapter Remoting Infrastructure since Server version 7.0 (corresponding to Adapter Remoting Infrastructure 1.8).

• For a version of this library compatible with Adapter Remoting Infrastructure for Server version 6.0 (corresponding to Adapter Remoting Infrastructure 1.7), please refer to this tag.

### Release History

#### 1.2.2 (2021-08-30)

Improvements

• Introduced full support for Server version 7.2. Now the library can log any message sent by the Proxy Adapter when forcibly closing the connection.

• Modified the behavior when incomplete credentials are configured: now they are sent to the Proxy Adapter, whereas previously they were not sent. Note that, if the Proxy Adapter has credentials configured, they cannot be incomplete; hence the Proxy Adapter is expected to refuse the connection in all cases.

Bug Fixes

• Fixed a bug on the handling of keepalives on the notification channel of the Data Adapter, which may have caused the Proxy Adapter to close the connection due to a keepalive timeout, if configured. This had the highest probability to happen in case of a reduced overall data flow, or during the startup phase.

#### 1.2.1 (2021-05-25)

Improvements

• Reformulated the compatibility constraint with respect to the Server version, instead of the Adapter Remoting Infrastructure version.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since Server version 7.0.

#### 1.2.0 (2020-01-24)

Improvements

• Extended DataProviderServer and MetadataProviderServer (through the Server superclass) with settings of credentials, to be sent to the Proxy Adapter upon each connection. Credential check is an optional configuration of the Proxy Adapter; if not leveraged, the credentials will be ignored.

• Modified the handling of the keepalives when connected to a Proxy Adapter (i.e. Adapter Remoting Infrastructure) version 1.9 (corresponding to Server 7.1) or higher: the preferred keepalive interval requested by the Proxy Adapter, when stricter than the configured one, is now obeyed (with a safety minimun of 1 second). Moreover, in that case, the default interval configuration is now 10 seconds instead of 1. If an existing installation relies on a very short keepalive interval to keep the connection alive due to intermediate nodes, the time should now be explicitly configured.

• Added full support for ARI Protocol extensions introduced in Adapter Remoting Infrastructure version 1.9 (corresponding to Server 7.1).

• Added clarifications in the documentation of the exception handlers and fix a few obsolete notes.

• Improved code layout as per pylint/pycodestyle outputs.

• Remove useless “pass” statement from classes of the interfaces package.

• Updated unit tests according to new features

Bug Fixes

• Removed useless optional client_principal parameter from the MetadataProvider.notify_user method.

• Fixed documentation of the DataProvider class, where “Lightstreamer Kernel” was erroneously referred as “Lightstreamer1”.

• Fixed broken links in the documentation of the DataProviderServer class.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.8 (corresponding to Server 7.0).

#### 1.1.4 (2019-03-29)

Bug Fixes

• Fixed a bug that caused requests sent from Lightstreamer instances running on non-Windows platform not to be parsed correctly (see #2).

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.8 (corresponding to Server 7.0).

#### 1.1.3 (2019-03-28)

Bug Fixes

• Fixed parsing issue when subscribing to more than two items.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.8 (corresponding to Server 7.0).

#### 1.1.2 (2018-02-22)

Improvements

• Added clarifications on licensing matters in the docs.

Bug Fixes

• Fixed edition note in the documentation of notify_user_with_principal.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.8 (corresponding to Server 7.0).

#### 1.1.1 (2017-12-22)

Improvements

Bug Fixes

• Fixed Lightstreamer Compatibility Notes in the README file.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.8 (corresponding to Server 7.0).

#### 1.1.0 (2017-12-19)

Improvements

• Modified the signature of the notify_mpn_device_access and notify_mpn_device_token_change methods of the MetadataProvider class, to add a session ID argument. Existing Remote Metadata Adapters leveraging notify_mpn_device_access and/or notify_mpn_device_token_change have to be ported to the new signature.

• Revised the public constants defined in the MpnPlatformType class. The constants referring to the supported platforms have got new names, whereas the constants for platforms not yet supported have been removed. Existing Remote Metadata Adapters explicitly referring to the constants have to be aligned.

• Removed the subclasses of MpnSubscriptionInfo (namely MpnApnsSubscriptionInfo and MpnGcmSubscriptionInfo) that were used by the SDK library to supply the attributes of the MPN subscriptions in notify_mpn_subscription_activation. Now, simple instances of MpnSubscriptionInfo will be supplied and attribute information can be obtained through the new “notification_format” property. See the MPN chapter on the General Concepts document for details on the characteristics of the Notification Format. Existing Remote Metadata Adapters leveraging notify_mpn_subscription_activation and inspecting the supplied MpnSubscriptionInfo have to be ported to the new class contract.

• Improved the interface documentation of MPN-related methods.

• Clarified in the docs for notifySessionClose which race conditions with other methods can be expected.

• Aligned the documentation to comply with current licensing policies.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.8 (corresponding to Server 7.0).

#### 1.0.0.post1 (2016-11-22)

• Finishing touches on the package documentation visible from the PyPi repository

#### 1.0.0 (2016-11-22)

Improvements

• Updated logging messages.

Bug Fixes

• Fixed notification of End Of Snaphsot in case of not availability of the snapshot.

• Fixed unit tests.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.7 (corresponding to Server 6.0).

#### 1.0.0b1 (2016-04-15)

Bug Fixes

• Fixed docstrings.

• Fixed typo in some Exceptions’ message.

• Fixed unit tests.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.7 (corresponding to Server 6.0).

#### 1.0.0a2 (2016-04-08)

Bug Fixes

• Fixed default handling of I/O related errors.

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.7 (corresponding to Server 6.0).

#### 1.0.0a1 (2016-04-08)

Initial release

Lightstreamer Compatibility Notes

• Compatible with Adapter Remoting Infrastructure since 1.7 (corresponding to Server 6.0).

## Project details

Uploaded source