prototwin 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prototwin
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: The official python client interface for ProtoTwin Connect.
5
5
  Home-page: https://prototwin.com
6
6
  Author: ProtoTwin
@@ -37,6 +37,7 @@ This package provides a simple client that can be used to interface with ProtoTw
37
37
  # STEP 1: Import the ProtoTwin client
38
38
  import prototwin
39
39
  import asyncio
40
+ import os
40
41
  import math
41
42
 
42
43
  # STEP 2: Define your signal addresses (obtain these from your ProtoTwin model)
@@ -44,8 +45,11 @@ simulation_time_address = 0
44
45
  motor_target_velocity_address = 3
45
46
 
46
47
  async def main():
47
- # STEP 3: Start ProtoTwin Connect
48
+ # STEP 3: Start ProtoTwin Connect, load and initialize the model
49
+ path = os.path.join(os.path.dirname(__file__), "example.ptm")
48
50
  client = await prototwin.start()
51
+ await client.load(path)
52
+ await client.initialize()
49
53
 
50
54
  # STEP 4: Create the simulation loop
51
55
  while True:
@@ -8,6 +8,7 @@ This package provides a simple client that can be used to interface with ProtoTw
8
8
  # STEP 1: Import the ProtoTwin client
9
9
  import prototwin
10
10
  import asyncio
11
+ import os
11
12
  import math
12
13
 
13
14
  # STEP 2: Define your signal addresses (obtain these from your ProtoTwin model)
@@ -15,8 +16,11 @@ simulation_time_address = 0
15
16
  motor_target_velocity_address = 3
16
17
 
17
18
  async def main():
18
- # STEP 3: Start ProtoTwin Connect
19
+ # STEP 3: Start ProtoTwin Connect, load and initialize the model
20
+ path = os.path.join(os.path.dirname(__file__), "example.ptm")
19
21
  client = await prototwin.start()
22
+ await client.load(path)
23
+ await client.initialize()
20
24
 
21
25
  # STEP 4: Create the simulation loop
22
26
  while True:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prototwin
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: The official python client interface for ProtoTwin Connect.
5
5
  Home-page: https://prototwin.com
6
6
  Author: ProtoTwin
@@ -37,6 +37,7 @@ This package provides a simple client that can be used to interface with ProtoTw
37
37
  # STEP 1: Import the ProtoTwin client
38
38
  import prototwin
39
39
  import asyncio
40
+ import os
40
41
  import math
41
42
 
42
43
  # STEP 2: Define your signal addresses (obtain these from your ProtoTwin model)
@@ -44,8 +45,11 @@ simulation_time_address = 0
44
45
  motor_target_velocity_address = 3
45
46
 
46
47
  async def main():
47
- # STEP 3: Start ProtoTwin Connect
48
+ # STEP 3: Start ProtoTwin Connect, load and initialize the model
49
+ path = os.path.join(os.path.dirname(__file__), "example.ptm")
48
50
  client = await prototwin.start()
51
+ await client.load(path)
52
+ await client.initialize()
49
53
 
50
54
  # STEP 4: Create the simulation loop
51
55
  while True:
@@ -9,7 +9,7 @@ with open("requirements.txt") as f:
9
9
  setup(
10
10
  name = "prototwin",
11
11
  packages = find_packages(include=["prototwin"]),
12
- version = "0.2.0",
12
+ version = "0.2.2",
13
13
  license = "MIT",
14
14
  description = "The official python client interface for ProtoTwin Connect.",
15
15
  long_description = long_description,
File without changes
File without changes
File without changes
File without changes
File without changes