{"id":13627466,"url":"https://github.com/ottowayi/pycomm3","last_synced_at":"2026-02-20T16:01:52.809Z","repository":{"id":43408296,"uuid":"193241356","full_name":"ottowayi/pycomm3","owner":"ottowayi","description":"A Python Ethernet/IP library for communicating with Allen-Bradley PLCs.","archived":false,"fork":false,"pushed_at":"2025-12-22T17:36:39.000Z","size":19802,"stargazers_count":472,"open_issues_count":35,"forks_count":100,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-12-24T04:46:30.533Z","etag":null,"topics":["allen-bradley","cip","eip","ethernet-ip","hmi","industrial-automation","industrial-controllers","plc","programmable-logic-controller","protocol","python","python3","rockwell","rslinx","scada"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ottowayi.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-06-22T14:11:55.000Z","updated_at":"2025-12-22T17:32:31.000Z","dependencies_parsed_at":"2023-02-15T18:46:15.807Z","dependency_job_id":"b80ef922-c916-4521-b100-1365348c5139","html_url":"https://github.com/ottowayi/pycomm3","commit_stats":{"total_commits":666,"total_committers":27,"mean_commits":"24.666666666666668","dds":0.5885885885885886,"last_synced_commit":"682cb3412966e1aafe5df05963398daf13908e1e"},"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/ottowayi/pycomm3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottowayi%2Fpycomm3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottowayi%2Fpycomm3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottowayi%2Fpycomm3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottowayi%2Fpycomm3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ottowayi","download_url":"https://codeload.github.com/ottowayi/pycomm3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ottowayi%2Fpycomm3/sbom","scorecard":{"id":714578,"data":{"date":"2025-08-11","repo":{"name":"github.com/ottowayi/pycomm3","commit":"4a458aade712a54cc2e9feeb4e129d2e71f581ab"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":3,"reason":"Found 6/16 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.2.13 not signed: https://api.github.com/repos/ottowayi/pycomm3/releases/113193093","Warn: release artifact v1.2.10 not signed: https://api.github.com/repos/ottowayi/pycomm3/releases/77347689","Warn: release artifact v1.2.13 does not have provenance: https://api.github.com/repos/ottowayi/pycomm3/releases/113193093","Warn: release artifact v1.2.10 does not have provenance: https://api.github.com/repos/ottowayi/pycomm3/releases/77347689"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T09:11:31.524Z","repository_id":43408296,"created_at":"2025-08-22T09:11:31.524Z","updated_at":"2025-08-22T09:11:31.524Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29656589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allen-bradley","cip","eip","ethernet-ip","hmi","industrial-automation","industrial-controllers","plc","programmable-logic-controller","protocol","python","python3","rockwell","rslinx","scada"],"created_at":"2024-08-01T22:00:34.373Z","updated_at":"2026-02-20T16:01:52.802Z","avatar_url":"https://github.com/ottowayi.png","language":"Python","readme":"=======\npycomm3\n=======\n\n.. \u003c\u003cstart\u003e\u003e\n\n.. image:: https://img.shields.io/pypi/v/pycomm3.svg?style=for-the-badge\n   :target: https://pypi.python.org/pypi/pycomm3\n   :alt: PyPI Version\n\n.. image:: https://img.shields.io/pypi/l/pycomm3.svg?style=for-the-badge\n   :target: https://pypi.python.org/pypi/pycomm3\n   :alt: License\n\n.. image:: https://img.shields.io/pypi/pyversions/pycomm3.svg?style=for-the-badge\n   :target: https://pypi.python.org/pypi/pycomm3\n   :alt: Python Versions\n\n|\n\n.. image:: https://img.shields.io/pypi/dm/pycomm3?style=social\n   :target: https://pypi.python.org/pypi/pycomm3\n   :alt: Downloads\n\n.. image:: https://img.shields.io/github/watchers/ottowayi/pycomm3?style=social\n    :target: https://github.com/ottowayi/pycomm3\n    :alt: Watchers\n\n.. image:: https://img.shields.io/github/stars/ottowayi/pycomm3?style=social\n    :target: https://github.com/ottowayi/pycomm3\n    :alt: Stars\n\n.. image:: https://img.shields.io/github/forks/ottowayi/pycomm3?style=social\n    :target: https://github.com/ottowayi/pycomm3\n    :alt: Forks\n\n|\n\n**⚠️ NOTE:** ``pycomm3`` is no longer actively developed\n\n\nIntroduction\n============\n\n``pycomm3`` started as a Python 3 fork of `pycomm`_, which is a Python 2 library for\ncommunicating with Allen-Bradley PLCs using Ethernet/IP.  The initial Python 3 port was done\nin this `fork`_ and was used as the base for ``pycomm3``.  Since then, the library has been\nalmost entirely rewritten and the API is no longer compatible with ``pycomm``.  Without the\nhard work done by the original ``pycomm`` developers, ``pycomm3`` would not exist.  This\nlibrary seeks to expand upon their great work.\n\n\n.. _pycomm: https://github.com/ruscito/pycomm\n\n.. _fork: https://github.com/bpaterni/pycomm/tree/pycomm3\n\n\nDrivers\n=======\n\n``pycomm3`` includes 3 drivers:\n\n- `CIPDriver`_\n    This driver is the base driver for the library, it handles common CIP services used\n    by the other drivers.  Things like opening/closing a connection, register/unregister sessions,\n    forward open/close services, device discovery, and generic messaging.  It can be used to connect to\n    any Ethernet/IP device, like: drives, switches, meters, and other non-PLC devices.\n\n- `LogixDriver`_\n    This driver supports services specific to ControlLogix, CompactLogix, and Micro800 PLCs.\n    Services like reading/writing tags, uploading the tag list, and getting/setting the PLC time.\n\n- `SLCDriver`_\n    This driver supports basic reading/writing data files in a SLC500 or MicroLogix PLCs.  It is\n    a port of the ``SlcDriver`` from ``pycomm`` with minimal changes to make the API similar to the\n    other drivers. Currently this driver is considered legacy and it's development will be on\n    a limited basis.\n\n.. _CIPDriver: https://docs.pycomm3.dev/en/latest/usage/cipdriver.html\n\n.. _LogixDriver: https://docs.pycomm3.dev/en/latest/usage/logixdriver.html\n\n.. _SLCDriver: https://docs.pycomm3.dev/en/latest/usage/slcdriver.html\n\nDisclaimer\n==========\n\nPLCs can be used to control heavy or dangerous equipment, this library is provided \"as is\" and makes no guarantees on\nits reliability in a production environment.  This library makes no promises in the completeness or correctness of the\nprotocol implementations and should not be solely relied upon for critical systems.  The development for this library\nis aimed at providing quick and convenient access for reading/writing data inside Allen-Bradley PLCs.\n\n\nSetup\n=====\n\nThe package can be installed from `PyPI`_ using ``pip``: ``pip install pycomm3`` or ``python -m pip install pycomm3``.\n\n.. _PyPI: https://pypi.org/project/pycomm3/\n\nOptionally, you may configure logging using the Python standard `logging`_ library.  A convenience method is provided\nto help configure basic logging, see the `Logging Section`_ in the docs for more information.\n\n.. _logging: https://docs.python.org/3/library/logging.html\n\n.. _Logging Section: https://docs.pycomm3.dev/en/latest/getting_started.html#logging\n\n\nPython and OS Support\n=====================\n\n``pycomm3`` is a Python 3-only library and is supported on Python versions from 3.6.1 up to 3.10.\nThere should be no OS-specific requirements and should be able to run on any OS that Python is supported on.\nDevelopment and testing is done primarily on Windows 10.  If you encounter an OS-related problem, please open an issue\nin the `GitHub repository`_ and it will be investigated.\n\n.. attention::\n\n    Python 3.6.0 is not supported due to ``NamedTuple`` not supporting\n    `default values and methods \u003chttps://docs.python.org/3/library/typing.html#typing.NamedTuple\u003e`_ until 3.6.1\n\n.. _GitHub repository:  https://github.com/ottowayi/pycomm3\n\n.. \u003c\u003cend\u003e\u003e\n\nDocumentation\n=============\n\nThis README covers a basic overview of the library, full documentation can be found on\n`Read the Docs`_ or by visiting `https://pycomm3.dev \u003chttps://pycomm3.dev\u003e`_.\n\n.. _Read the Docs: https://pycomm3.readthedocs.io/en/latest/\n\nContributions\n=============\n\nIf you'd like to contribute or are having an issue, please read the `Contributing`_ guidelines.\n\n.. _Contributing: CONTRIBUTING.md\n\n\nHighlighted Features\n====================\n\n- ``generic_message`` for extra functionality not directly implemented\n    - working similar to the MSG instruction in Logix, arguments similar to the MESSAGE properties\n    - See the examples section for things like getting/setting drive parameters, IP configuration, or uploading an EDS file\n    - used internally to implement some of the other methods (get/set_plc_time, forward open/close, etc)\n- simplified data types\n    - allows use of standard Python types by abstracting CIP implementation details away from the user\n    - strings use normal Python ``str`` objects, does not require handling of the ``LEN`` and ``DATA`` attributes separately\n    - custom string types are also identified automatically and not limited to just the builtin one\n    - BOOL arrays use normal Python ``bool`` objects, does not require complicated bit shifting of the DWORD value\n    - powerful type system to allow types to represent any CIP object and handle encoding/decoding the object\n\nLogixDriver\n-----------\n\n- simple API, only 1 ``read`` method and 1 ``write`` method for tags.\n    - does not require using different methods for different data types\n    - requires the tag name only, no other information required from the user\n    - automatically manages request/response size to pack as many requests into a single packet\n    - automatically handles fragmented requests for large tags that can't fit in a single packet\n    - both support full structure reading/writing (UDTs, AOIs, etc)\n        - for ``read`` the ``Tag.value`` will be a ``dict`` of ``{attribute: value}``\n        - for ``write`` the value should be a dict of ``{attribute: value}`` , nesting as needed\n            - does not do partial writes, the value must match the complete structure\n            - not recommended for builtin type (TIMER, CONTROL, COUNTER, etc)\n        - both require no attributes to have an External Access of None\n- uploads the tag list and data type definitions from the PLC\n    - no requirement for user to determine tags available (like from an L5X export)\n    - definitions are required for ``read``/``write`` methods\n- automatically enables/disables different features based on the target PLC\n    - Extended Forward Open (EN2T or newer and v20+)\n    - Symbol Instance Addressing (Logix v21+)\n    - detection of Micro800 and disables unsupported features (CIP Path, Ex. Forward Open, Instance Addressing, etc)\n\nLogixDriver Overview\n====================\n\nCreating a driver is simple, only a ``path`` argument is required.  The ``path`` can be the IP address, IP and slot,\nor a full CIP route, refer to the documentation for more details.  The example below shows how to create a simple\ndriver and print some of the information collected about the device.\n\n::\n\n    from pycomm3 import LogixDriver\n\n    with LogixDriver('10.20.30.100/1') as plc:\n        print(plc)\n        # OUTPUT:\n        # Program Name: PLCA, Device: 1756-L83E/B, Revision: 28.13\n\n        print(plc.info)\n        # OUTPUT:\n        # {'vendor': 'Rockwell Automation/Allen-Bradley', 'product_type': 'Programmable Logic Controller',\n        #  'product_code': 166, 'version_major': 28, 'version_minor': 13, 'revision': '28.13', 'serial': 'FFFFFFFF',\n        #  'device_type': '1756-L83E/B', 'keyswitch': 'REMOTE RUN', 'name': 'PLCA'}\n\n\nReading/Writing Tags\n--------------------\n\nReading or writing tags is as simple as calling the ``read`` and ``write`` methods. Both methods accept any number of tags,\nand will automatically pack multiple tags into a *Multiple Service Packet Service (0x0A)* while making sure to stay below the connection size.\nIf there is a tag value that cannot fit within the request/reply packet, it will automatically handle that tag independently\nusing the *Read Tag Fragmented (0x52)* or *Write Tag Fragmented (0x53)* requests.\n\nBoth methods will return ``Tag`` objects to reflect the success or failure of the operation.\n\n::\n\n    class Tag(NamedTuple):\n        tag: str  # the name of the tag, does not include ``{\u003c# elements\u003e}`` from request\n        value: Any  # value read or written, may be ``None`` if an error occurred\n        type: Optional[str] = None  # data type of tag, including ``[\u003c# elements\u003e]`` from request\n        error: Optional[str] = None  # ``None`` if successful, else the CIP error or exception thrown\n\n``Tag`` objects are considered successful (truthy) if the ``value`` is not ``None`` and the ``error`` is ``None``.\n\n\nExamples::\n\n    with LogixDriver('10.20.30.100') as plc:\n        plc.read('tag1', 'tag2', 'tag3')  # read multiple tags\n        plc.read('array{10}') # read 10 elements starting at 0 from an array\n        plc.read('array[5]{20}) # read 20 elements starting at elements 5 from an array\n        plc.read('string_tag')  # read a string tag and get a string\n        plc.read('a_udt_tag') # the response .value will be a dict like: {'attr1`: 1, 'attr2': 'a string', ...}\n\n        # writes require a sequence of tuples of [(tag name, value), ... ]\n        plc.write('tag1', 0)  # single writes do not need to be passed as a tuple\n        plc.write(('tag1', 0), ('tag2', 1), ('tag3', 2))  # write multiple tags\n        plc.write(('array{5}', [1, 2, 3, 4, 5]))  # write 5 elements to an array starting at the 0 element\n        plc.write('array[10]{5}', [1, 2, 3, 4, 5])  # write 5 elements to an array starting at element 10\n        plc.write('string_tag', 'Hello World!')  # write to a string tag with a string\n        plc.write('string_array[2]{5}', 'Write an array of strings'.split())  # write an array of 5 strings starting at element 2\n        plc.write('a_udt_tag', {'attr1': 1, 'attr2': 'a string', ...})  # can also use a dict to write a struct\n\n        # Check the results\n        results = plc.read('tag1', 'tag2', 'tag3')\n        if all(results):\n            print('They all worked!')\n        else:\n            for result in results:\n                if not result:\n                    print(f'Reading tag {result.tag} failed with error: {result.error}')\n\n.. Note::\n\n    Tag names for both ``read`` and ``write`` are case-sensitive and are required to be the same as they are named in\n    the controller.  This may change in the future.\n\n\nUnit Testing\n============\n\n``pytest`` is used for unit testing. The ``tests`` directory contains an L5X export of the testing program\nthat contains all tags necessary for testing.  The only requirement for testing (besides a running PLC with the testing\nprogram) is the environment variable ``PLCPATH`` for the PLC defined.\n\nUser Tests\n----------\n\nThese tests are for users to run.  There are a few tests that are specific to a demo\nplc, those are excluded. To run them you have the following options:\n\nwith `tox`:\n\n    - modify the ``PLCPATH`` variable in ``tox.ini``\n    - then run this command: ``tox -e user``\n\nor with ``pytest``:\n\n.. code-block::\n\n    set PLCPATH=192.168.1.100\n    pytest --ignore tests/online/test_demo_plc.py\n\n*(or the equivalent in your shell)*\n\n\n.. Note::\n    Test coverage is not complete, pull requests are welcome to help improve coverage.\n\n\nLicense\n=======\n``pycomm3`` is distributed under the MIT License\n","funding_links":[],"categories":["Ethernet/IP","Controls"],"sub_categories":["Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fottowayi%2Fpycomm3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fottowayi%2Fpycomm3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fottowayi%2Fpycomm3/lists"}