A gevent friendly serial line
Project description
gevent-serial
A python 3 gevent friendly access to the serial port.
Deeply inspired by pyserial. It tries to mimic its interface but it doesn't aim to garantee full API compatibility.
For now only Linux (and possibly any BSD or posix complient system) is supported.
Support for local serial port, RFC2217, and RS485 (untested).
Includes an optional serial to TCP bridge (experimental).
Installation
From within your favourite python environment:
$ pip install gevent-serial
Serial to TCP bridge
To be available, it requires you to install the optional server package with:
$ pip install gevent-serial[ser2tcp]
The ser2tcp server needs a configuration file written in YAML. It consists of a list of serial entries. Each entry describes the serial port address (url), the TCP port (listener) and optionally a TCP mode and other serial line options (baudrate, parity, byte size, etc.)
Here is an example:
- url: /dev/ttyS0
baudrate: 9600
listener: :2217 # listen on all network interfaces, TCP port 2217
mode: rfc2217
- url: /dev/ttyS1
baudrate: 115200
mode: raw
listener: :2218
- url: loop://
listener: :2219
baudrate: 115200
mode: raw
- url: loop://
listener: :2220
baudrate: 9600
mode: rfc2217
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file gevent-serial-0.2.4.tar.gz
.
File metadata
- Download URL: gevent-serial-0.2.4.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0.post20191030 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3913e4bb4f7c3cf68647956ad7e4da8da54ba909250dee525f2f157b5bd2bdb |
|
MD5 | f0fed9e411f140fcd53ab23b4e00d4d5 |
|
BLAKE2b-256 | 5d5ae27778671183ffaea88c8850c1d991c4ef565ab6798f54464fdb8855fba0 |