{
"info": {
"author": "Lightstreamer Srl",
"author_email": "support@lightstreamer.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Communications",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks"
],
"description": "=====================================\nLightstreamer SDK for Python Adapters\n=====================================\n\nA Python library to write Data Adapters and Metadata Adapters for `Lightstreamer Server`_.\nThe adapters will run in a separate process, communicating with the Server through the Adapter Remoting Infrastructure.\n\n.. _Lightstreamer Server: http://www.lightstreamer.com\n\n.. image:: architecture.png\n\nUse\n===\nInstall the package:\n\n.. code-block:: bash\n\n $ pip install lightstreamer-adapter\n\nConfigure Lightstreamer\n-----------------------\n\n1) Download and install Lightstreamer\n2) Go to the ``adapters`` folder of your Lightstreamer Server installation. Create a new folder to deploy the remote adapters in, let's call it ``PythonAdapter``\n3) Create an ``adapters.xml`` file inside the ``PythonAdapter`` folder and use the following contents (this is an example configuration, you can modify it to your liking by using the generic template, `DOCS-SDKs/adapter_remoting_infrastructure/doc/adapter_conf_template/adapters.xml` or `DOCS-SDKs/adapter_remoting_infrastructure/doc/adapter_robust_conf_template/adapters.xml`, as a reference):\n\n .. code-block:: xml\n\n \n \n \n ROBUST_PROXY_FOR_REMOTE_ADAPTER\n log-enabled\n 8003\n 36000000\n \n \n ROBUST_PROXY_FOR_REMOTE_ADAPTER\n log-enabled\n 8001\n 8002\n 36000000\n \n \n \n4) Take note of the ports configured in the adapters.xml file as those are needed to write the remote part of the adapters.\n\nWrite the Adapters\n------------------\n\nCreate a new python module, let's call it ``adapters.py``, where we will put the minimal logic required to write a basic Adapter Set.\n\n1) Import the sever classes needed to setup the connection to the Lightstreamer server, and the adapter classes to be extended to write your own Remote Adapters:\n\n .. code-block:: python\n \n from lightstreamer_adapter.server import (DataProviderServer, MetadataProviderServer)\n from lightstreamer_adapter.interfaces.data import DataProvider\n from lightstreamer_adapter.interfaces.metadata import MetadataProvider\n \n2) Create a new Remote Data Adapter by subclassing the DataProvider abstract class:\n\n .. code-block:: python\n \n class MyDataAdapter(DataProvider):\n \"\"\"This Remote Data Adapter sample class shows a simple implementation of\n the DataProvider abstract class.\"\"\"\n \n def __init__(self):\n # Reference to the provided ItemEventListener instance\n self._listener = None\n\n def issnapshot_available(self, item_name):\n \"\"\"Returns True if Snapshot information will be sent for the item_name\n item before the updates.\"\"\"\n snapshot = False # May be based on the item_name item\n return snapshot\n \n def set_listener(self, event_listener):\n \"\"\"Caches the reference to the provided ItemEventListener instance.\"\"\"\n self._listener = event_listener\n \n def subscribe(self, item_name):\n \"\"\"Invoked to request data for an item. From now on you can start\n sending real time updates for item_name item, through invocations like\n the following:\n \n self._listener.update(item_name, {'field1': valField1,\n 'field2': valField2}, False)\n \"\"\"\n \n def unsubscribe(self, item_name):\n \"\"\"Invoked to end a previous request of data for an item. From now on,\n you should stop sending updates for item_name item.\"\"\"\n\n\n3) Create a new Remote Metadata Adapter by subclassing the MetadataProvider class, if the latter's default behaviour does not meet your requirements, and override the methods for which you want to supply a custom implementation:\n\n .. code-block:: python\n \n class MyMetadataAdapter(MetadataProvider):\n \"\"\"This Remote Metadata Adapter sample class shows a minimal custom\n implementation of the notify_user_message method.\n \"\"\"\n \n def notify_user_message(self, user, session_id, message):\n \"\"\"Invoked to forward a message received by a User\"\"\"\n print(\"Message {} arrived for user {} in the session {}\"\n .format(user, session_id, message))\n \n4) Run the adapters, by creating, configuring and starting the server class instances:\n\n .. code-block:: python\n \n if __name__ == \"__main__\":\n # The host of the Lightstreamer server, to be changed as required.\n LS_SERVER_HOST = 'localhost'\n \n # Creates a new MetadataProviderServer instance, passing a new\n # MyMetadataAdpater object and the remote address.\n metadata_provider_server = MetadataProviderServer(MyMetadataAdapter(),\n (LS_SERVER_HOST, 8003))\n \n # Starts the server instance.\n metadata_provider_server.start()\n \n # Creates a new DataProviderServer instance, passing a new MyDataAdpater\n # object and the remote address\n data_provider_sever = DataProviderServer(MyDataAdapter(),\n (LS_SERVER_HOST, 8001, 8002))\n # Starts the server instance.\n data_provider_sever.start()\n\nRun\n---\n\nFrom the command line, execute:\n\n.. code-block:: bash\n\n $ python adapters.py\n\nConnect a Client\n----------------\n\n.. code-block:: javascript\n\n var lsClient = new LightstreamerClient(LS_SERVER_HOST, \"PROXY_PYTHON\");\n lsClient.connect();\n // To be completed with other client side activities, like registration of subscriptions and handling of \n // real time updates.\n // ...\n \nwhere ``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.\n \nAPI Reference\n-------------\n\nAPI Reference is available at ``_.\n\nYou can generate it by executing the following command from the ``doc`` folder:\n\n.. code-block:: bash\n\n $ make html\n \nThe generated documentation will be available under the ``doc\\_build\\html`` folder. \n\n\nSee Also\n=================================\n\n- `Adapter Remoting Infrastructure Network Protocol Specification`_\n- `Lightstreamer Chat Demo adapter for Python`_\n\n.. _Adapter Remoting Infrastructure Network Protocol Specification: http://www.lightstreamer.com/latest/Lightstreamer_Allegro-Presto-Vivace_7_0/Lightstreamer/DOCS-SDKs/sdk_adapter_generic/doc/ARI%20Protocol.pdf\n.. _Lightstreamer Chat Demo adapter for Python: https://github.com/Lightstreamer/Lightstreamer-example-Chat-adapter-python\n\n\nLightstreamer Compatibility Notes\n=================================\n\nCompatible with Adapter Remoting Infrastructure since 1.8\n- For a version of this library compatible with Adapter Remoting Infrastructure version 1.7, please refer to `this tag`_.\n\n.. _this tag: https://github.com/Lightstreamer/Lightstreamer-lib-python-adapter/tree/version-1.0.0post1-27\n\n\n.. :changelog:\n\nRelease History\n---------------\n\n\n1.1.4 (2019-03-29)\n+++++++++++++++++++\n\n**Bug Fixes**\n\n- Fixed a bug that caused requests sent from Lightstreamer instances running on\n non-Windows platform not to be parsed correctly (see #2).\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.8.\n\n\n1.1.3 (2019-03-28)\n+++++++++++++++++++\n\n**Bug Fixes**\n\n- Fixed parsing issue when subscribing to more than two items.\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.8.\n\n\n1.1.2 (2018-02-22)\n+++++++++++++++++++\n\n**Improvements**\n\n- Added clarifications on licensing matters in the docs.\n\n**Bug Fixes**\n\n- Fixed edition note in the documentation of notify_user_with_principal.\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.8.\n\n\n1.1.1 (2017-12-22)\n+++++++++++++++++++\n\n**Improvements**\n\n- Moved API documentation to ``_.\n\n- Fixed few source code fragments to make them PEP 8 compliant.\n\n**Bug Fixes**\n\n- Fixed Lightstreamer Compatibility Notes in the README file.\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.8.\n\n\n1.1.0 (2017-12-19)\n+++++++++++++++++++\n\n**Improvements**\n\n- Modified the signature of the notify_mpn_device_access and\n notify_mpn_device_token_change methods of the MetadataProvider class,\n to add a session ID argument.\n Existing Remote Metadata Adapters leveraging notify_mpn_device_access\n and/or notify_mpn_device_token_change have to be ported to the new signature.\n\n- Revised the public constants defined in the MpnPlatformType class.\n The constants referring to the supported platforms have got new names,\n whereas the constants for platforms not yet supported have been removed.\n Existing Remote Metadata Adapters explicitly referring to the constants\n have to be aligned.\n\n- Removed the subclasses of MpnSubscriptionInfo (namely\n MpnApnsSubscriptionInfo and MpnGcmSubscriptionInfo) that were used\n by the SDK library to supply the attributes of the MPN subscriptions\n in notify_mpn_subscription_activation. Now, simple instances of\n MpnSubscriptionInfo will be supplied and attribute information can be\n obtained through the new \"notification_format\" property.\n See the MPN chapter on the General Concepts document for details on the\n characteristics of the Notification Format.\n Existing Remote Metadata Adapters\n leveraging notify_mpn_subscription_activation and inspecting the supplied\n MpnSubscriptionInfo have to be ported to the new class contract.\n\n- Improved the interface documentation of MPN-related methods.\n\n- Clarified in the docs for notifySessionClose which race conditions with other\n methods can be expected.\n\n- Aligned the documentation to comply with current licensing policies.\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.8.\n\n\n1.0.0.post1 (2016-11-22)\n++++++++++++++++++++++++\n\n- Finishing touches on the package documentation visible from the PyPi repository\n\n\n1.0.0 (2016-11-22)\n+++++++++++++++++++\n\n**Improvements**\n\n- Updated logging messages.\n\n**Bug Fixes**\n\n- Fixed notification of End Of Snaphsot in case of not availability of the snapshot.\n\n- Fixed docstrings in modules *lightstreamer_adapter/server.py* and *lightstreamer_adapter/subscription.py*.\n\n- Fixed unit tests.\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.7.\n\n\n1.0.0b1 (2016-04-15)\n+++++++++++++++++++++\n\n**Bug Fixes**\n\n- Fixed docstrings.\n\n- Fixed typo in some Exceptions' message.\n\n- Fixed unit tests.\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.7.\n\n\n1.0.0a2 (2016-04-08)\n+++++++++++++++++++++\n\n**Bug Fixes**\n\n- Fixed return values in *lightstreamer_adapter.interfaces.metadata.MetadataProvider* class.\n\n- Fixed default handling of I/O related errors.\n\n- Fixed docstrings in modules *lightstreamer_adapter/data_protocol.py* and *lightstreamer_adapter/metadata_protocol.py*.\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.7.\n\n\n1.0.0a1 (2016-04-08)\n+++++++++++++++++++++\n\n**Initial release**\n\n**Lightstreamer Compatibility Notes**\n\n- Compatible with Adapter Remoting Infrastructure since 1.7.",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/Lightstreamer/Lightstreamer-lib-python-adapter",
"keywords": "lightstreamer push realtime real-time",
"license": "Apache License 2.0",
"maintainer": "",
"maintainer_email": "",
"name": "lightstreamer-adapter",
"package_url": "https://pypi.org/project/lightstreamer-adapter/",
"platform": "",
"project_url": "https://pypi.org/project/lightstreamer-adapter/",
"project_urls": {
"Homepage": "https://github.com/Lightstreamer/Lightstreamer-lib-python-adapter"
},
"release_url": "https://pypi.org/project/lightstreamer-adapter/1.1.4/",
"requires_dist": null,
"requires_python": "",
"summary": "Lightstreamer SDK for Python Adapters",
"version": "1.1.4"
},
"last_serial": 5004354,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "5b66f8166be40045aa9e2f8c49734d64",
"sha256": "de842cf1316b9909659bf480234c8f5287fc12a979493ccc290d4b58c31adfb9"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.0.0.zip",
"has_sig": false,
"md5_digest": "5b66f8166be40045aa9e2f8c49734d64",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 97128,
"upload_time": "2016-11-22T09:19:16",
"url": "https://files.pythonhosted.org/packages/73/7a/7d8ccf752844b3e66cee08f8a73b193c3e0c1b1946fd89036d087b0e7d27/lightstreamer_adapter-1.0.0.zip"
}
],
"1.0.0a1": [
{
"comment_text": "",
"digests": {
"md5": "b768d652620eb597f844061772f68e24",
"sha256": "a67b0d54dcbf4d6e653a4d2e7cfd3186b100aadfb747c164cbd290e7b566c7a1"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.0.0a1.zip",
"has_sig": false,
"md5_digest": "b768d652620eb597f844061772f68e24",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 48038,
"upload_time": "2016-04-08T09:36:44",
"url": "https://files.pythonhosted.org/packages/0f/75/d549fa9b79363db68ac6d215f33b7b1af8551b68d93cd937b76f2b5ca45e/lightstreamer_adapter-1.0.0a1.zip"
}
],
"1.0.0a2": [
{
"comment_text": "",
"digests": {
"md5": "49183527c8f756f1a2be2a8cb94e1951",
"sha256": "96dac6218181d66c1d8e5af42ee6ec52bf0f3460da2d247eeaa17ea8bbecd6de"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.0.0a2.zip",
"has_sig": false,
"md5_digest": "49183527c8f756f1a2be2a8cb94e1951",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 48434,
"upload_time": "2016-04-08T17:28:29",
"url": "https://files.pythonhosted.org/packages/03/ac/79e3da4a5595d9f54bf6999bd5700362b2d8d94d83345ae340afd22e0558/lightstreamer_adapter-1.0.0a2.zip"
}
],
"1.0.0b1": [
{
"comment_text": "",
"digests": {
"md5": "53ce12e9a772f5960a837b16699d591d",
"sha256": "d19e36792aa89e3022fb8ff2498099787b76a4d657bed565ca18fa1b6e09a2ce"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.0.0b1.zip",
"has_sig": false,
"md5_digest": "53ce12e9a772f5960a837b16699d591d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 49067,
"upload_time": "2016-04-15T15:48:05",
"url": "https://files.pythonhosted.org/packages/72/2b/0db5bd776cfb3920c625d455d97456eb4bd4b35564a0a7a73f6190bb6a06/lightstreamer_adapter-1.0.0b1.zip"
}
],
"1.0.0post1": [
{
"comment_text": "",
"digests": {
"md5": "e23311e7bfdf77c6c3be145c62d0e709",
"sha256": "bbfb04cd4f68a51588d2d1da2858d82a25c0f674020368a73d23b2b4eb20455a"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.0.0post1.zip",
"has_sig": false,
"md5_digest": "e23311e7bfdf77c6c3be145c62d0e709",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 97441,
"upload_time": "2016-11-22T11:52:40",
"url": "https://files.pythonhosted.org/packages/09/4c/a9369140fb79cc0e98a2ba162688b79647262a274ee72ebb8e74fa5b3da7/lightstreamer_adapter-1.0.0post1.zip"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "83dadf58c95cde5cbc7979f8c1ca9edd",
"sha256": "768bee5e486394fb0606b579be51597c186c49022ea10f024fae50cf98a50ce2"
},
"downloads": -1,
"filename": "lightstreamer_adapter.zip",
"has_sig": false,
"md5_digest": "83dadf58c95cde5cbc7979f8c1ca9edd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 127741,
"upload_time": "2017-12-20T11:43:35",
"url": "https://files.pythonhosted.org/packages/6c/5d/20dfa4bfc9211becd425ada0a9a8300c2b270cafdb90f929a1d9eda9c068/lightstreamer_adapter.zip"
}
],
"1.1.1": [
{
"comment_text": "",
"digests": {
"md5": "3bd3d06ae6fd4b864371a9539e62089b",
"sha256": "a1f005efb21a32b36e92a5a3d78669b812c4cb9ba9a267981212b2040b0443cd"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.1.1.zip",
"has_sig": false,
"md5_digest": "3bd3d06ae6fd4b864371a9539e62089b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 128002,
"upload_time": "2017-12-22T10:57:20",
"url": "https://files.pythonhosted.org/packages/c4/13/aa9b4c6c0b20250e8fe29844cdae5bda51e7d026a70e54fa05cb780aff0f/lightstreamer_adapter-1.1.1.zip"
}
],
"1.1.2": [
{
"comment_text": "",
"digests": {
"md5": "3b7013f2f5c68b9dba722a3d026a1a3b",
"sha256": "101c95aba4c59c9169a7ab80c7e1d1c4043cd9c1b5ebb0b9856a373bf2dc474e"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.1.2.zip",
"has_sig": false,
"md5_digest": "3b7013f2f5c68b9dba722a3d026a1a3b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 128267,
"upload_time": "2018-02-22T15:59:06",
"url": "https://files.pythonhosted.org/packages/47/9e/32cbdb48e62e5006a4d95d3d8610489550301ea0d27283e0ac563b8687fe/lightstreamer_adapter-1.1.2.zip"
}
],
"1.1.3": [
{
"comment_text": "",
"digests": {
"md5": "ce1442cbefbcd08620be943e079d089e",
"sha256": "55772f709ac7fc7a5fdd45883b7547531e5fbe3ad366fe5c8a3c44073383e414"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.1.3.zip",
"has_sig": false,
"md5_digest": "ce1442cbefbcd08620be943e079d089e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 128881,
"upload_time": "2019-03-28T17:03:52",
"url": "https://files.pythonhosted.org/packages/73/4c/fd9ad4a8d85130c035bb1f00b9299cbee70b4ae6173376e0ed9cb81c3383/lightstreamer_adapter-1.1.3.zip"
}
],
"1.1.4": [
{
"comment_text": "",
"digests": {
"md5": "6c95cefac4f0d04d761fbcdfb4e337c5",
"sha256": "c957b11ff9e4adfab04dcba4b2c8b0ce370abc28c672283ee8a2f7e60611c1a6"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.1.4.zip",
"has_sig": false,
"md5_digest": "6c95cefac4f0d04d761fbcdfb4e337c5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 129136,
"upload_time": "2019-03-29T17:34:46",
"url": "https://files.pythonhosted.org/packages/30/b9/edbb6dbf2edeeba48b49612857e3b8bf7cde22d78c84a80dffb414f52736/lightstreamer_adapter-1.1.4.zip"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "6c95cefac4f0d04d761fbcdfb4e337c5",
"sha256": "c957b11ff9e4adfab04dcba4b2c8b0ce370abc28c672283ee8a2f7e60611c1a6"
},
"downloads": -1,
"filename": "lightstreamer_adapter-1.1.4.zip",
"has_sig": false,
"md5_digest": "6c95cefac4f0d04d761fbcdfb4e337c5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 129136,
"upload_time": "2019-03-29T17:34:46",
"url": "https://files.pythonhosted.org/packages/30/b9/edbb6dbf2edeeba48b49612857e3b8bf7cde22d78c84a80dffb414f52736/lightstreamer_adapter-1.1.4.zip"
}
]
}