# ProtoTwin Connect Client
This package provides a simple client that can be used to interface with ProtoTwin Connect.
## Basic Example
```
# STEP 1: Import the ProtoTwin client
import prototwin
import asyncio
import math
# STEP 2: Define your signal addresses (obtain these from your ProtoTwin model)
simulation_time_address = 0
motor_target_velocity_address = 3
async def main():
# STEP 3: Start ProtoTwin Connect
client = await prototwin.start()
# STEP 4: Create the simulation loop
while True:
t = client.get(simulation_time_address) # Read signal values
client.set(motor_target_velocity_address, math.sin(t)) # Write signal values
await client.step() # Step the simulation forward in time
asyncio.run(main()) # Run the simulation loop
```
Raw data
{
"_id": null,
"home_page": "https://prototwin.com",
"name": "prototwin",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Industrial Simulation, Physics, Machine Learning, Robotics",
"author": "ProtoTwin",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e1/ec/afb66bc969796c57f54669b912a0b0e4b0e703f28d2f8ee9c6b840361379/prototwin-0.2.0.tar.gz",
"platform": null,
"description": "# ProtoTwin Connect Client\n\nThis package provides a simple client that can be used to interface with ProtoTwin Connect.\n\n## Basic Example\n\n```\n# STEP 1: Import the ProtoTwin client\nimport prototwin\nimport asyncio\nimport math\n\n# STEP 2: Define your signal addresses (obtain these from your ProtoTwin model)\nsimulation_time_address = 0\nmotor_target_velocity_address = 3\n\nasync def main():\n # STEP 3: Start ProtoTwin Connect\n client = await prototwin.start()\n\n # STEP 4: Create the simulation loop\n while True:\n t = client.get(simulation_time_address) # Read signal values\n client.set(motor_target_velocity_address, math.sin(t)) # Write signal values\n await client.step() # Step the simulation forward in time\n\nasyncio.run(main()) # Run the simulation loop\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The official python client interface for ProtoTwin Connect.",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://prototwin.com"
},
"split_keywords": [
"industrial simulation",
" physics",
" machine learning",
" robotics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e1ecafb66bc969796c57f54669b912a0b0e4b0e703f28d2f8ee9c6b840361379",
"md5": "301a7abb030f4bb106f7218b3df420d2",
"sha256": "505153f95177d443264ed1efd3b159a3c28bdf5fda2e14585d90c979f8bd01ff"
},
"downloads": -1,
"filename": "prototwin-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "301a7abb030f4bb106f7218b3df420d2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5027,
"upload_time": "2025-07-18T16:12:16",
"upload_time_iso_8601": "2025-07-18T16:12:16.582724Z",
"url": "https://files.pythonhosted.org/packages/e1/ec/afb66bc969796c57f54669b912a0b0e4b0e703f28d2f8ee9c6b840361379/prototwin-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-18 16:12:16",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "prototwin"
}