docs(README): Add usage_example in README - #46
Merged
Merged
Conversation
mirzak
requested changes
Oct 31, 2025
mirzak
left a comment
Contributor
There was a problem hiding this comment.
Since we intend to publish to PyPi, we need to keep in mind that the README.md will be displayed on the front page. This means that it should be user facing.
See https://pypi.org/project/python-can/ for reference.
Dexter9532
force-pushed
the
usage_example
branch
3 times, most recently
from
November 4, 2025 08:53
1ef5480 to
83daabc
Compare
mirzak
requested changes
Nov 4, 2025
Contributor
There was a problem hiding this comment.
This has a "generated by AI" smell to it (with all the icons and the superfluous text).
Lets keep it simple, and do the following:
in DEVELOPMENT.MD put the existing README (as-is).
In README.md write,
## python-em511 python-em511 provides a simple, Pythonic interface for reading and writing data from Carlo Gavazzi EM511 series energy meters over Modbus RTU. It builds on top of [pymodbus](https://pypi.org/project/pymodbus/). ## Example usage: ```python from em511 import Em511 from pymodbus.client import ModbusSerialClient # Configure the Modbus client client = ModbusSerialClient( port="COM3", # or "/dev/ttyUSB0" on Linux baudrate=9600, parity="E", stopbits=1, bytesize=8, # datasheet specifies maximum response timeout of 500ms (typical 40ms) timeout=0.5, ) # Device Modbus address device_address = 1 # Initialize the EM511 driver meter = Em511(device_address=device_address, client=client) # Read voltage voltage = meter.V print(f"Voltage: {voltage} V") # Example of writing a password-protected parameter meter.password = 1234 ``` ## Report issues If you run into problems, you can ask for help in our [issue tracker](https://github.com/id8-engineering/python-em511/issues) on GitHub. ## Contributing See [CONTRIBUTING.MD](https://github.com/id8-engineering/python-em511/blob/main/CONTRIBUTING.MD) and >[DEVELOPMENT.MD](https://github.com/id8-engineering/python-em511/blob/main/DEVELOPMENT.MD).
Contributor
Author
|
this is AI who helped us, when i watch other READMEs this is how they do it |
mirzak
requested changes
Nov 4, 2025
Dexter9532
force-pushed
the
usage_example
branch
from
November 4, 2025 15:46
84ed043 to
fe5d73e
Compare
Dexter9532
force-pushed
the
usage_example
branch
from
November 5, 2025 07:24
fe5d73e to
350683f
Compare
Signed-off-by: Bobo Bäck Engström <bobo@id8-engineering.io> docs(DEVELOPMENT): add DEVELOPMENT Signed-off-by: Bobo Bäck Engström <bobo@id8-engineering.io>
Dexter9532
force-pushed
the
usage_example
branch
from
November 5, 2025 15:34
350683f to
e6221b6
Compare
mirzak
approved these changes
Nov 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #40