pyModbusTCP-cli 0.4.0a1__tar.gz → 0.4.0a2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ # Also read by hatchling (the build backend): these files never go in the sdist or the wheel.
2
+
3
+ # bytecode
4
+ __pycache__/
5
+ *.py[cod]
6
+
7
+ # build outputs
8
+ build/
9
+ dist/
10
+ *.egg-info/
11
+
12
+ # virtual environments
13
+ /venv/
14
+ /.venv/
15
+
16
+ # editors and OS
17
+ /.idea/
18
+ /.vscode/
19
+ .DS_Store
20
+
21
+ # local experiments
22
+ /lab/
23
+
24
+ # Sphinx documentation (built pages and generated help of the tools)
25
+ /docs/_build/
26
+ /docs/_generated/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pyModbusTCP-cli
3
- Version: 0.4.0a1
3
+ Version: 0.4.0a2
4
4
  Summary: Command line tools for pyModbusTCP: Modbus/TCP server, client and Modbus TCP/RTU gateways
5
5
  Project-URL: Source, https://github.com/sourceperl/pyModbusTCP
6
6
  Project-URL: Issues, https://github.com/sourceperl/pyModbusTCP/issues
@@ -14,7 +14,7 @@ Classifier: Operating System :: OS Independent
14
14
  Classifier: Programming Language :: Python :: 3 :: Only
15
15
  Classifier: Topic :: System :: Networking
16
16
  Requires-Python: >=3.10
17
- Requires-Dist: pymodbustcp[serial]==0.4.0a1
17
+ Requires-Dist: pymodbustcp[serial]==0.4.0a2
18
18
  Description-Content-Type: text/markdown
19
19
 
20
20
  # pyModbusTCP-cli
@@ -39,19 +39,19 @@ command in the PATH and installs no dependency.
39
39
  pipx install pyModbusTCP-cli
40
40
 
41
41
  # or in a virtual environment, with the library
42
- pip install "pyModbusTCP[tools]==0.4.0a1"
42
+ pip install "pyModbusTCP[cli]==0.4.0a2"
43
43
  ```
44
44
 
45
45
  **Alpha**: pyModbusTCP-cli is new with pyModbusTCP 0.4.0, only pre-releases exist for now. The commands, their
46
46
  options and their output may still change before the final release. Without a version or `--pre`,
47
- `pip install "pyModbusTCP[tools]"` installs the stable pyModbusTCP 0.3.1, without the tools.
47
+ `pip install "pyModbusTCP[cli]"` installs the stable pyModbusTCP 0.3.1, without the tools.
48
48
 
49
49
  Without this package, the tools can still be run from the library alone:
50
50
 
51
51
  ```bash
52
52
  python -m pyModbusTCP.tools server --help
53
53
  python -m pyModbusTCP.tools client --help
54
- pip install "pyModbusTCP[serial]==0.4.0a1" # pyserial, only needed by the gateways
54
+ pip install "pyModbusTCP[serial]==0.4.0a2" # pyserial, only needed by the gateways
55
55
  python -m pyModbusTCP.tools tcp2rtu --help
56
56
  python -m pyModbusTCP.tools rtu2tcp --help
57
57
  ```
@@ -70,7 +70,7 @@ mbtcp-client -p 5020 write-coil 10 on
70
70
  # TCP clients of the 192.168.1.0/24 network can read (only) the RTU slaves of /dev/ttyUSB0
71
71
  mbtcp-tcp2rtu -H 0.0.0.0 -A 192.168.1.0/24 --read-only -b 19200 --parity E /dev/ttyUSB0
72
72
 
73
- # a RTU master on /dev/ttyUSB0 reads the Modbus/TCP server 192.168.1.10 (gateway is RTU slave 30)
73
+ # an RTU master on /dev/ttyUSB0 reads the Modbus/TCP server 192.168.1.10 (the gateway is the RTU slave 30)
74
74
  mbtcp-rtu2tcp -a 30 -H 192.168.1.10 /dev/ttyUSB0
75
75
  ```
76
76
 
@@ -84,7 +84,9 @@ The server and the TCP to RTU gateway are designed to be safe by default:
84
84
  - they listen on `localhost` and on port 5020 by default: use `-H` with the address of the network interface that
85
85
  needs it (`0.0.0.0` only if every network of the host is trusted);
86
86
  - `-A/--allow` restricts the clients to some IP addresses or networks, `--read-only` refuses every write;
87
- - the TCP to RTU gateway refuses broadcast requests (unit id 0) unless `--allow-broadcast` is set.
87
+ - the TCP to RTU gateway refuses broadcast requests (unit id 0) unless `--allow-broadcast` is set;
88
+ - `--max-connections-per-host` (default 16) keeps a single client host from taking every connection, and the TCP
89
+ to RTU gateway shares the serial line between the client hosts (at most 2 pending requests per host).
88
90
 
89
91
  Port 502 (the standard Modbus/TCP port) is a privileged port on Unix systems. **Never run these commands as root (or
90
92
  with sudo) to listen on it.** Give the `CAP_NET_BIND_SERVICE` capability to the Python interpreter of a virtual
@@ -20,19 +20,19 @@ command in the PATH and installs no dependency.
20
20
  pipx install pyModbusTCP-cli
21
21
 
22
22
  # or in a virtual environment, with the library
23
- pip install "pyModbusTCP[tools]==0.4.0a1"
23
+ pip install "pyModbusTCP[cli]==0.4.0a2"
24
24
  ```
25
25
 
26
26
  **Alpha**: pyModbusTCP-cli is new with pyModbusTCP 0.4.0, only pre-releases exist for now. The commands, their
27
27
  options and their output may still change before the final release. Without a version or `--pre`,
28
- `pip install "pyModbusTCP[tools]"` installs the stable pyModbusTCP 0.3.1, without the tools.
28
+ `pip install "pyModbusTCP[cli]"` installs the stable pyModbusTCP 0.3.1, without the tools.
29
29
 
30
30
  Without this package, the tools can still be run from the library alone:
31
31
 
32
32
  ```bash
33
33
  python -m pyModbusTCP.tools server --help
34
34
  python -m pyModbusTCP.tools client --help
35
- pip install "pyModbusTCP[serial]==0.4.0a1" # pyserial, only needed by the gateways
35
+ pip install "pyModbusTCP[serial]==0.4.0a2" # pyserial, only needed by the gateways
36
36
  python -m pyModbusTCP.tools tcp2rtu --help
37
37
  python -m pyModbusTCP.tools rtu2tcp --help
38
38
  ```
@@ -51,7 +51,7 @@ mbtcp-client -p 5020 write-coil 10 on
51
51
  # TCP clients of the 192.168.1.0/24 network can read (only) the RTU slaves of /dev/ttyUSB0
52
52
  mbtcp-tcp2rtu -H 0.0.0.0 -A 192.168.1.0/24 --read-only -b 19200 --parity E /dev/ttyUSB0
53
53
 
54
- # a RTU master on /dev/ttyUSB0 reads the Modbus/TCP server 192.168.1.10 (gateway is RTU slave 30)
54
+ # an RTU master on /dev/ttyUSB0 reads the Modbus/TCP server 192.168.1.10 (the gateway is the RTU slave 30)
55
55
  mbtcp-rtu2tcp -a 30 -H 192.168.1.10 /dev/ttyUSB0
56
56
  ```
57
57
 
@@ -65,7 +65,9 @@ The server and the TCP to RTU gateway are designed to be safe by default:
65
65
  - they listen on `localhost` and on port 5020 by default: use `-H` with the address of the network interface that
66
66
  needs it (`0.0.0.0` only if every network of the host is trusted);
67
67
  - `-A/--allow` restricts the clients to some IP addresses or networks, `--read-only` refuses every write;
68
- - the TCP to RTU gateway refuses broadcast requests (unit id 0) unless `--allow-broadcast` is set.
68
+ - the TCP to RTU gateway refuses broadcast requests (unit id 0) unless `--allow-broadcast` is set;
69
+ - `--max-connections-per-host` (default 16) keeps a single client host from taking every connection, and the TCP
70
+ to RTU gateway shares the serial line between the client hosts (at most 2 pending requests per host).
69
71
 
70
72
  Port 502 (the standard Modbus/TCP port) is a privileged port on Unix systems. **Never run these commands as root (or
71
73
  with sudo) to listen on it.** Give the `CAP_NET_BIND_SERVICE` capability to the Python interpreter of a virtual
@@ -13,4 +13,4 @@ from hatchling.metadata.plugin.interface import MetadataHookInterface
13
13
  class CustomMetadataHook(MetadataHookInterface):
14
14
  def update(self, metadata: dict[str, Any]) -> None:
15
15
  # the code of the commands is in the library: exactly the same release
16
- metadata['dependencies'] = ['pyModbusTCP[serial]==%s' % metadata['version']]
16
+ metadata['dependencies'] = [f"pyModbusTCP[serial]=={metadata['version']}"]
@@ -1,14 +0,0 @@
1
- build/
2
- dist/
3
- *.pyc
4
- *.egg-info/
5
-
6
- /.idea/
7
- /.vscode/
8
-
9
- /venv/
10
- /lab/
11
-
12
- # Sphinx documentation (built pages and generated help of the tools)
13
- /docs/_build/
14
- /docs/_generated/