{ "info": { "author": "Simone Fardella", "author_email": "fardella.simone@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Embedded Systems" ], "description": "uModbus\n=======\n\nThis is a fork with some additional features of the original uModbus library, more specifically:\n\n- Add the features of reading/writing on devices/systems with values bigger than 16 Bit data\n- Add the flush_on_write parameter to disable the auto flush after writing (some hardware drivers auto manage the flush on write)\n\n\nuModbus or (\u03bcModbus) is a pure Python implementation of the Modbus protocol as\ndescribed in the `MODBUS Application Protocol Specification V1.1b3`_. uModbus\nimplements both a Modbus client (both TCP and RTU) and a Modbus server (both\nTCP and RTU). The \"u\" or \"\u03bc\" in the name comes from the the SI prefix \"micro-\".\nuModbus is very small and lightweight. The source can be found on GitHub_.\nDocumentation is available at `Read the Docs`_.\n\nQuickstart\n----------\n\nCreating a Modbus TCP server is easy:\n\n..\n Because GitHub doesn't support the include directive the source of\n scripts/examples/simple_tcp_server.py has been copied to this file.\n\n.. code:: python\n\n #!/usr/bin/env python\n # scripts/examples/simple_tcp_server.py\n import logging\n from socketserver import TCPServer\n from collections import defaultdict\n\n from umodbus import conf\n from umodbus.server.tcp import RequestHandler, get_server\n from umodbus.utils import log_to_stream\n\n # Add stream handler to logger 'uModbus'.\n log_to_stream(level=logging.DEBUG)\n\n # A very simple data store which maps addresss against their values.\n data_store = defaultdict(int)\n\n # Enable values to be signed (default is False).\n conf.SIGNED_VALUES = True\n\n TCPServer.allow_reuse_address = True\n app = get_server(TCPServer, ('localhost', 502), RequestHandler)\n\n\n @app.route(slave_ids=[1], function_codes=[3, 4], addresses=list(range(0, 10)))\n def read_data_store(slave_id, function_code, address):\n \"\"\"\" Return value of address. \"\"\"\n return data_store[address]\n\n\n @app.route(slave_ids=[1], function_codes=[6, 16], addresses=list(range(0, 10)))\n def write_data_store(slave_id, function_code, address, value):\n \"\"\"\" Set value for address. \"\"\"\n data_store[address] = value\n\n if __name__ == '__main__':\n try:\n app.serve_forever()\n finally:\n app.shutdown()\n app.server_close()\n\nDoing a Modbus request requires even less code:\n\n..\n Because GitHub doesn't support the include directive the source of\n scripts/examples/simple_data_store.py has been copied to this file.\n\n.. code:: python\n\n #!/usr/bin/env python\n # scripts/examples/simple_tcp_client.py\n import socket\n\n from umodbus import conf\n from umodbus.client import tcp\n\n # Enable values to be signed (default is False).\n conf.SIGNED_VALUES = True\n\n sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n sock.connect(('localhost', 502))\n\n # Returns a message or Application Data Unit (ADU) specific for doing\n # Modbus TCP/IP.\n message = tcp.write_multiple_coils(slave_id=1, starting_address=1, values=[1, 0, 1, 1])\n\n # Response depends on Modbus function code. This particular returns the\n # amount of coils written, in this case it is.\n response = tcp.send_message(message, sock)\n\n sock.close()\n\nFeatures\n--------\n\nThe following functions have been implemented for Modbus TCP and Modbus RTU:\n\n* 01: Read Coils\n* 02: Read Discrete Inputs\n* 03: Read Holding Registers\n* 04: Read Input Registers\n* 05: Write Single Coil\n* 06: Write Single Register\n* 15: Write Multiple Coils\n* 16: Write Multiple Registers\n\nOther featues:\n\n* Support for signed and unsigned register values.\n* Easy data packing and unpacking (Write and Read) with the methods data_packer & data_unpacker\n\nLicense\n-------\n\nuModbus software is licensed under `Mozilla Public License`_. \u00a9 2018.\n\n.. External References:\n.. _GitHub: https://github.com/AdvancedClimateSystems/uModbus/\n.. _MODBUS Application Protocol Specification V1.1b3: http://modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf\n.. _Mozilla Public License: https://github.com/AdvancedClimateSystems/uModbus/blob/develop/LICENSE\n.. _Read the Docs: http://umodbus.readthedocs.org/en/latest/", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Simonefardella/uModbus", "keywords": "", "license": "MPL", "maintainer": "", "maintainer_email": "", "name": "uModbus-extended", "package_url": "https://pypi.org/project/uModbus-extended/", "platform": "", "project_url": "https://pypi.org/project/uModbus-extended/", "project_urls": { "Homepage": "https://github.com/Simonefardella/uModbus" }, "release_url": "https://pypi.org/project/uModbus-extended/1.0.5/", "requires_dist": null, "requires_python": "", "summary": "Implementation of the Modbus protocol in pure Python.", "version": "1.0.5" }, "last_serial": 5777512, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "0e3df0f2e6b8019ef5f35a479517323d", "sha256": "2b10c441bf3f06ada9aa624ec5179142b93056cce31cb9a778e8afee9fc8100b" }, "downloads": -1, "filename": "uModbus_extended-1.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0e3df0f2e6b8019ef5f35a479517323d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 29214, "upload_time": "2019-02-18T08:01:51", "url": "https://files.pythonhosted.org/packages/61/49/377348a0e07afcc21c6a097436c8e23a6d05773a56b6e14daca81d05bec2/uModbus_extended-1.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a825a81d8a7aff28195ad66001210d1e", "sha256": "9e27f156c54b3be66787f2db4e41d8847c8b5799e4e8d9c58d4069db54c205f3" }, "downloads": -1, "filename": "uModbus-extended-1.0.3.tar.gz", "has_sig": false, "md5_digest": "a825a81d8a7aff28195ad66001210d1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20087, "upload_time": "2019-02-18T08:01:53", "url": "https://files.pythonhosted.org/packages/db/a2/c40db273eb51ebb55eef95d72561f432b8efff550e4ac53ad167ace57d14/uModbus-extended-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "db2d8399cfdb0ce1b70787d37a7c8cd1", "sha256": "8d5a74a7a644f926fc60db829f9249aa5dce999dcfa5acb5b454ada5aa550540" }, "downloads": -1, "filename": "uModbus_extended-1.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "db2d8399cfdb0ce1b70787d37a7c8cd1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26587, "upload_time": "2019-03-27T07:59:50", "url": "https://files.pythonhosted.org/packages/a0/3e/30173819d83e0dbc8829ae67313d3d5cdd39ee5628e56063a049b3df41ed/uModbus_extended-1.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2afa7ff284a2af4010e8e764be093848", "sha256": "b31c8d2df02be1f8d6b9335944b11bf9b28a865b8923f2ea83c46a2fddb99b80" }, "downloads": -1, "filename": "uModbus-extended-1.0.4.tar.gz", "has_sig": false, "md5_digest": "2afa7ff284a2af4010e8e764be093848", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20122, "upload_time": "2019-03-27T07:59:52", "url": "https://files.pythonhosted.org/packages/0a/22/333989c4043e3247d8c5347d314cac6a1c3df7be1f4a7cd462af2de73036/uModbus-extended-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "e8ae9a265178cceb0b0e87795c29b2c0", "sha256": "d9a4ab3c3e319230101aa5201fd59b18efbb2123278d2e63e131e172ac027541" }, "downloads": -1, "filename": "uModbus-extended-1.0.5.tar.gz", "has_sig": false, "md5_digest": "e8ae9a265178cceb0b0e87795c29b2c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20284, "upload_time": "2019-09-03T19:10:53", "url": "https://files.pythonhosted.org/packages/ed/95/b538594bc814be60a400cbb9ec4a9b77c1b4c9eeccc583fd44edb9d84e49/uModbus-extended-1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e8ae9a265178cceb0b0e87795c29b2c0", "sha256": "d9a4ab3c3e319230101aa5201fd59b18efbb2123278d2e63e131e172ac027541" }, "downloads": -1, "filename": "uModbus-extended-1.0.5.tar.gz", "has_sig": false, "md5_digest": "e8ae9a265178cceb0b0e87795c29b2c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20284, "upload_time": "2019-09-03T19:10:53", "url": "https://files.pythonhosted.org/packages/ed/95/b538594bc814be60a400cbb9ec4a9b77c1b4c9eeccc583fd44edb9d84e49/uModbus-extended-1.0.5.tar.gz" } ] }