PCF8574 simulation
This is a Python library you can use when working with the pcf8574 library. It works exactly the same as the original library, but is intended for testing purposes when the I²C-Bus hardware is not connected.
Installation
pip install pcf8574_simulation
Usage
You have different options to use this as an alternative to the original library.
For example, you can import the correct library depending on which is installed on your system:
try:
from pcf8574 import PCF8574, IOPort
except ImportError:
print("No I2C bus package found. Starting simulation")
from pcf8574_simulation import PCF8574, IOPort
Then you can use the PCF8574 class as usual:
pcf = PCF8574(1, 0x20)
print(pcf.port) # [True, True, True, True, True, True, True, True]
pcf.port[0] = False
print(pcf.port[0]) # False
Metadata
Release files for pcf8574-simulation 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pcf8574_simulation-0.0.1.tar.gz | 2.5 kB | Without provenance | Details for pcf8574_simulation-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pcf8574_simulation-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for pcf8574_simulation-0.0.1-py3-none-any.whl |
Total release size: 5.9 kB
Release files / pcf8574_simulation-0.0.1.tar.gz
| Download URL | pcf8574_simulation-0.0.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fb8884fab6ab85a579b0f1be83b44670a6b9fe0ea6c7fe760f22f2201de25d5
|
|
BLAKE2b-256 checksum How to use checksums |
fb4685584767ab3c5fbb9ceadf89bb03ec172add63044ec8e45fa85e6c8ada0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / pcf8574_simulation-0.0.1-py3-none-any.whl
| Download URL | pcf8574_simulation-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3403bfd11462f110bd225515eb045743e9cdd792d8ebc3ba2153968e5fd4d480
|
|
BLAKE2b-256 checksum How to use checksums |
0664f1478fbb925fad8b63d3a53799d814f4dc53d48a21db016cf54b792171f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for pcf8574-simulation 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.