{"id":29958310,"url":"https://github.com/pyfunc/modbusim","last_synced_at":"2025-08-03T20:11:18.595Z","repository":{"id":307635812,"uuid":"1030186734","full_name":"pyfunc/modbusim","owner":"pyfunc","description":"MODBUS PORT SIMULATOR ","archived":false,"fork":false,"pushed_at":"2025-08-01T09:41:35.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-01T10:49:48.914Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyfunc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-01T08:17:24.000Z","updated_at":"2025-08-01T09:41:38.000Z","dependencies_parsed_at":"2025-08-01T10:59:56.164Z","dependency_job_id":null,"html_url":"https://github.com/pyfunc/modbusim","commit_stats":null,"previous_names":["pyfunc/modbusim"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pyfunc/modbusim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fmodbusim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fmodbusim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fmodbusim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fmodbusim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyfunc","download_url":"https://codeload.github.com/pyfunc/modbusim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyfunc%2Fmodbusim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268604282,"owners_count":24276998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-03T20:11:01.116Z","updated_at":"2025-08-03T20:11:18.587Z","avatar_url":"https://github.com/pyfunc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ModbusIM - Modbus Device Simulator\n\nA Python package for simulating Modbus RTU/ASCII/TCP devices for testing and development purposes.\n\n[![PyPI version](https://badge.fury.io/py/modbusim.svg)](https://badge.fury.io/py/modbusim)\n[![Python Version](https://img.shields.io/badge/python-3.8.1+-blue.svg)](https://www.python.org/downloads/)\n[![License: Apache 2.0 ](https://img.shields.io/badge/License-Apache 2.0 -yellow.svg)](https://opensource.org/licenses/Apache 2.0 )\n\n## Features\n\n- Simulate Modbus RTU/ASCII/TCP devices\n- Support for all standard Modbus function codes\n- Easy-to-use CLI interface\n- Programmatic API for integration with tests\n- Configurable device behavior\n- Docker support for easy deployment\n\n## Installation\n\n### Using pip\n\n```bash\npip install modbusim\n```\n\n### Using Poetry (for development)\n\n```bash\ngit clone https://github.com/yourusername/modbusim.git\ncd modbusim\npoetry install\n```\n\n### Using Docker\n\n```bash\n# Build the image\ndocker build -t modbusim .\n\n# Run the Modbus TCP simulator\ndocker run -p 5020:5020 modbusim\n```\n\nOr using Docker Compose:\n\n```bash\ndocker-compose up -d\n```\n\n## Usage\n\n### Command Line Interface\n\nStart a Modbus RTU simulator:\n\n```bash\nmodbusim rtu --port /tmp/ptyp0 --baudrate 9600\n```\n\nStart a Modbus TCP simulator:\n\n```bash\nmodbusim tcp --host 0.0.0.0 --port 5020\n```\n\n### Python API\n\n```python\nfrom modbusim import ModbusSimulator\n\n# Create a simulator instance\nsimulator = ModbusSimulator(\n    mode=\"rtu\",  # or \"tcp\"\n    port=\"/tmp/ptyp0\",  # or host=\"0.0.0.0\" for TCP\n    baudrate=9600\n)\n\n# Start the simulator\nsimulator.start()\n\ntry:\n    # Your test code here\n    while True:\n        # Keep the simulator running\n        pass\nexcept KeyboardInterrupt:\n    # Stop the simulator\n    simulator.stop()\n```\n\n## Development\n\n### Running Tests\n\n```bash\nmake test\n```\n\n### Linting and Formatting\n\n```bash\nmake lint    # Run linters\nmake format  # Format code\n```\n\n### Building and Publishing\n\n```bash\nmake build    # Build the package\nmake publish  # Publish to PyPI\n```\n\n## Docker Development\n\n### Build the development image\n\n```bash\ndocker-compose -f docker-compose.dev.yml build\n```\n\n### Run tests in Docker\n\n```bash\ndocker-compose -f docker-compose.dev.yml run --rm modbusim make test\n```\n\n### Start a development shell\n\n```bash\ndocker-compose -f docker-compose.dev.yml run --rm --service-ports modbusim bash\n```\n\n## License\n\nApache 2.0  - See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyfunc%2Fmodbusim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyfunc%2Fmodbusim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyfunc%2Fmodbusim/lists"}