pymodbus

A full modbus protocol written in python

https://github.com/pymodbus-dev/pymodbus

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 175 committers (1.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

modbus modbus-library modbus-master modbus-protocol modbus-rtu modbus-serial modbus-slave modbus-tcp python

Keywords from Contributors

asyncio closember packaging autograd tensors aiohttp http-client http-server gtk qt
Last synced: 6 months ago · JSON representation

Repository

A full modbus protocol written in python

Basic Info
  • Host: GitHub
  • Owner: pymodbus-dev
  • License: other
  • Language: Python
  • Default Branch: dev
  • Homepage:
  • Size: 22 MB
Statistics
  • Stars: 2,532
  • Watchers: 106
  • Forks: 1,000
  • Open Issues: 3
  • Releases: 90
Topics
modbus modbus-library modbus-master modbus-protocol modbus-rtu modbus-serial modbus-slave modbus-tcp python
Created about 14 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Authors

README.rst

PyModbus - A Python Modbus Stack
================================
.. image:: https://github.com/pymodbus-dev/pymodbus/actions/workflows/ci.yml/badge.svg?branch=dev
   :target: https://github.com/pymodbus-dev/pymodbus/actions/workflows/ci.yml
.. image:: https://readthedocs.org/projects/pymodbus/badge/?version=latest
   :target: https://pymodbus.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status
.. image:: https://pepy.tech/badge/pymodbus
   :target: https://pepy.tech/project/pymodbus
   :alt: Downloads
.. image:: https://img.shields.io/badge/Gurubase-Ask%20PyModbus%20Guru-006BFF
   :target: https://gurubase.io/g/pymodbus
   :alt: PyModbus Guru

Pymodbus is a full Modbus protocol implementation offering a client and server with synchronous/asynchronous API and simulators.

Our releases follow the pattern `X.Y.Z`. We have strict rules for what different version number updates mean:

- **Z**, No API changes! bug fixes and smaller enhancements.
- **Y**, API changes, bug fixes and bigger enhancements.
- **X**, Major changes in API and/or method to use pymodbus

Upgrade examples:

- 3.9.0 -> 3.9.2: just plugin the new version, no changes needed.
                  Remark fixing bugs, can lead to a different behaviors/returns
- 3.8.0 -> 3.9.0: Smaller changes to the pymodbus calls might be needed
- 2.5.4 -> 3.0.0: Major changes in the application might be needed

**REMARK**: As can be seen from the above Pymodbus do NOT follow the semver.org standard.

It is always recommended to read the
`CHANGELOG `_
as well as the
`API_changes `_
files.

Current release is `3.11.1 `_.

Bleeding edge (not released) is `dev `_.

All changes are described in `release notes `_
and all API changes are `documented `_

A big thanks to all the `volunteers `_ that helps make pymodbus a great project.

Source code on `github `_

Full documentation for newest releases as well as the bleeding edge (dev) `readthedocs `_


Pymodbus in a nutshell
----------------------
Pymodbus consist of 5 parts:

- **client**, connect to your favorite device(s)
- **server**, simulate your favorite device(s)
- **repl**, a commandline text based client/server simulator
- **simulator**, an html based server simulator
- **examples**, showing both simple and advances usage

Common features
^^^^^^^^^^^^^^^
* Full modbus standard protocol implementation
* Support for custom function codes
* Support serial (rs-485), tcp, tls and udp communication
* Support all standard frames: socket, rtu, rtu-over-tcp, tcp and ascii
* Does not have third party dependencies, apart from pyserial (optional)
* Very lightweight project
* Requires Python >= 3.10
* Thorough test suite, that test all corners of the library
* Automatically tested on Windows, Linux and MacOS combined with python 3.10 - 3.14
* Strongly typed API (py.typed present)

The modbus protocol specification: Modbus_Application_Protocol_V1_1b3.pdf can be found on
`modbus org `_


Client Features
^^^^^^^^^^^^^^^
* Asynchronous API and synchronous API for applications
* Very simple setup and call sequence (just 6 lines of code)
* Utilities to convert int/float to/from multiple registers
* Encoder/decoder to help with standard python data types

`Client documentation `_


Server Features
^^^^^^^^^^^^^^^
* Asynchronous implementation for high performance
* Synchronous API classes for convenience
* Simulate real life devices
* Full server control context (device information, counters, etc)
* Different backend datastores to manage register values
* Callback to intercept requests/responses
* Work on RS485 in parallel with other devices

`Server documentation `_


REPL Features
^^^^^^^^^^^^^
- Server/client commandline emulator
- Easy test of real device (client)
- Easy test of client app (server)
- Simulation of broken requests/responses
- Simulation of error responses (hard to provoke in real devices)

`REPL documentation `_


Simulator Features
^^^^^^^^^^^^^^^^^^
- Server simulator with WEB interface
- Configure the structure of a real device
- Monitor traffic online
- Allow distributed team members to work on a virtual device using internet
- Simulation of broken requests/responses
- Simulation of error responses (hard to provoke in real devices)

`Simulator documentation `_

Use Cases
---------
The client is the most typically used. It is embedded into applications,
where it abstract the modbus protocol from the application by providing an
easy to use API. The client is integrated into some well known projects like
`home-assistant `_.

Although most system administrators will find little need for a Modbus
server, the server is handy to verify the functionality of an application.

The simulator and/or server is often used to simulate real life devices testing
applications. The server is excellent to perform high volume testing (e.g.
hundreds of devices connected to the application). The advantage of the server is
that it runs not only on "normal" computers but also on small ones like a Raspberry PI.

Since the library is written in python, it allows for easy scripting and/or integration into existing
solutions.

For more information please browse the project documentation:

https://readthedocs.org/docs/pymodbus/en/latest/index.html



Install
-------
The library is available on pypi.org and github.com to install with

- :code:`pip` for those who just want to use the library
- :code:`git clone` for those who wants to help or just are curious

Be aware that there are a number of project, who have forked pymodbus and

- Seems just to provide a version frozen in time
- Extended pymodbus with extra functionality

The latter is not because we rejected the extra functionality (we welcome all changes),
but because the codeowners made that decision.

In both cases, please understand, we cannot offer support to users of these projects as we do not known
what have been changed nor what status the forked code have.

A growing number of Linux distributions include pymodbus in their standard installation.

You need to have python3 installed, preferable 3.11.

Install with pip
^^^^^^^^^^^^^^^^
You can install using pip by issuing the following
commands in a terminal window::

   pip install pymodbus

If you want to use the serial interface::

   pip install pymodbus[serial]

This will install pymodbus with the pyserial dependency.

Pymodbus offers a number of extra options:

- **repl**, needed by pymodbus.repl
- **serial**, needed for serial communication
- **simulator**, needed by pymodbus.simulator
- **documentation**, needed to generate documentation
- **development**, needed for development
- **all**, installs all of the above

which can be installed as::

   pip install pymodbus[

Owner

  • Name: pymodbus-dev
  • Login: pymodbus-dev
  • Kind: organization

GitHub Events

Total
  • Create event: 157
  • Commit comment event: 3
  • Release event: 11
  • Issues event: 186
  • Watch event: 247
  • Delete event: 154
  • Issue comment event: 690
  • Push event: 1,740
  • Pull request review comment event: 87
  • Pull request review event: 114
  • Pull request event: 336
  • Fork event: 91
Last Year
  • Create event: 157
  • Commit comment event: 3
  • Release event: 11
  • Issues event: 186
  • Watch event: 247
  • Delete event: 154
  • Issue comment event: 690
  • Push event: 1,740
  • Pull request review comment event: 87
  • Pull request review event: 114
  • Pull request event: 336
  • Fork event: 91

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 2,173
  • Total Committers: 175
  • Avg Commits per committer: 12.417
  • Development Distribution Score (DDS): 0.572
Past Year
  • Commits: 326
  • Committers: 36
  • Avg Commits per committer: 9.056
  • Development Distribution Score (DDS): 0.242
Top Committers
Name Email Commits
jan iversen j****r@g****m 929
Galen Collins b****k@g****m 352
dhoomakethu o****u@g****m 232
Alex 5****2 145
Kyle Altendorf s****a@f****t 107
Galen Collins g****n@a****m 31
James Hilliard j****1@g****m 10
Philip Couling c****g@g****m 10
James Braza j****a@g****m 10
jon mills j****s@m****m 8
Stuart Longland s****l@v****u 8
Michel F 8****o 8
Ilkka Ollakka 1****a 8
Mark M. Evans m****k@r****m 8
Bhagavan Nagaraju b****n@r****m 8
Rahul Raghunath r****4@g****m 7
Thor Michael Støre t****s@g****o 7
dices j****t@m****t 7
Karl Palsson k****p@r****s 7
Thijs W w****s 6
Perry Kundert p****y@h****m 6
Fredo70 f****l@f****h 6
Christian Bergmiller c****r@g****m 6
sanjay s****v@a****m 5
Alexandre CUER a****r@c****r 5
Christian Krause c****e 5
Claudio Catterina c****o@g****m 4
Pavel Kostromitinov c****k@g****m 4
Logan Gunthorpe l****g@d****m 4
James Cameron 9****o 4
and 145 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 311
  • Total pull requests: 1,112
  • Average time to close issues: 30 days
  • Average time to close pull requests: 10 days
  • Total issue authors: 238
  • Total pull request authors: 125
  • Average comments per issue: 4.43
  • Average comments per pull request: 1.21
  • Merged pull requests: 871
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 115
  • Pull requests: 415
  • Average time to close issues: 1 day
  • Average time to close pull requests: 1 day
  • Issue authors: 103
  • Pull request authors: 37
  • Average comments per issue: 3.56
  • Average comments per pull request: 0.7
  • Merged pull requests: 316
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • janiversen (25)
  • alexrudd2 (16)
  • MAKOMO (3)
  • wlcrs (3)
  • dkhawajafaithtechinc (3)
  • peufeu2 (3)
  • bsense-rius (3)
  • chkr-private (3)
  • pythcoiner (2)
  • sciunto (2)
  • jannikgoebel (2)
  • smurfix (2)
  • snorfalorpagus (2)
  • vfazio (2)
  • dhoomakethu (2)
Pull Request Authors
  • janiversen (647)
  • alexrudd2 (151)
  • jameshilliard (52)
  • dhoomakethu (16)
  • MrWaloo (15)
  • ilkka-ollakka (12)
  • MAKOMO (6)
  • smurfix (6)
  • jamesbraza (6)
  • pjkundert (6)
  • ahcm-dev (5)
  • lsgunth (5)
  • efdx (4)
  • matesh (4)
  • Cavaler (4)
Top Labels
Issue Labels
Bug (16) Enhancements (15) no-issue-activity (13) help wanted (6) More Information Required (4) Investigating (4) NewFeatureRequest (2) Documentation Update Required (1) in progress (1)
Pull Request Labels
no-pr-activity (25) Enhancements (2) dependencies (2) Bot (1) Dep (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 734,515 last-month
  • Total docker downloads: 757,223,927
  • Total dependent packages: 89
    (may contain duplicates)
  • Total dependent repositories: 1,121
    (may contain duplicates)
  • Total versions: 92
  • Total maintainers: 4
pypi.org: pymodbus

A fully featured modbus protocol stack in python

  • Versions: 87
  • Dependent Packages: 87
  • Dependent Repositories: 1,120
  • Downloads: 734,496 Last month
  • Docker Downloads: 757,223,927
Rankings
Docker downloads count: 0.1%
Dependent packages count: 0.2%
Dependent repos count: 0.3%
Downloads: 0.7%
Average: 0.7%
Forks count: 1.5%
Stargazers count: 1.6%
Maintainers (3)
Last synced: 6 months ago
conda-forge.org: pymodbus
  • Versions: 4
  • Dependent Packages: 2
  • Dependent Repositories: 1
Rankings
Forks count: 5.9%
Stargazers count: 9.2%
Average: 14.7%
Dependent packages count: 19.6%
Dependent repos count: 24.1%
Last synced: 6 months ago
pypi.org: cthingsco-pymodbus

A fully featured modbus protocol stack in python

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 19 Last month
Rankings
Dependent packages count: 9.5%
Average: 31.6%
Dependent repos count: 53.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • syphar/restore-virtualenv v1 composite
.github/workflows/clean_workflow_runs.yml actions
  • Mattraks/delete-workflow-runs v2 composite
.github/workflows/stale_lock.yml actions
  • actions/stale v3 composite
  • dessant/lock-threads v4 composite