Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

CounterFit Shims - PySerial

PySerial Shim PyPI

Shims for the PySerial to read sensors that use a virtual serial port

See the PySerial Docs for the API documentation.

Getting started

To use these shims, you will need to install CounterFit and have it running, with the appropriate hardware created.

  • Install this package from pip:

    pip install telegen-shims-serial
    
  • Import PySerial using the counterfit_shims_serial package instead of the serial package, as well as importing the TeleGenConnection from the counterfit_shims_grove.counterfit_connection module:

    from counterfit_connection import TeleGenConnection
    import counterfit_shims_serial
    
  • Configure the connection to the CounterFit app. Change the hostname and port to where you are running it:

    TeleGenConnection.init('127.0.0.1', 5000)
    
  • Write your PySerial code as usual, setting the port to match the one you set in the CounterFit app.

    For example, create a UART sensor on port /dev/ttyAMA0:

    serial = counterfit_shims_serial.Serial('/dev/ttyAMA0', 9600, timeout=1)
    

    The baud and timeout settings are ignored.

Metadata

Release files for telegen-shims-serial 0.1.0.dev4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for telegen-shims-serial 0.1.0.dev4
File Size Uploaded
telegen_shims_serial-0.1.0.dev4.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for telegen-shims-serial 0.1.0.dev4
File Interpreter ABI Platform
telegen_shims_serial-0.1.0.dev4-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / telegen_shims_serial-0.1.0.dev4.tar.gz

Download URL telegen_shims_serial-0.1.0.dev4.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
594a4fdc307c37986b003a8fbf7429750d2dad56b20fe6c1f7502a7d7372c7cb
BLAKE2b-256 checksum
How to use checksums
a57de0409434a3a191255630ac4cf4f205c51dbe62f1f91ddb387493faa09c30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / telegen_shims_serial-0.1.0.dev4-py3-none-any.whl

Download URL telegen_shims_serial-0.1.0.dev4-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
60d7afe6dd8e195e92cc67631ccf75712aa7061f27bf546a28ec06f69126cd6f
BLAKE2b-256 checksum
How to use checksums
5a40683588b5c3327bbca522ee5133d2f2d5ed7e0cf32da50b764ee7f4fbc27a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.0.dev4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page