semvec/pypi-packages huggingface dataset:
pyplanemono-minimal 1.0
X-ray tracing for plane grating monochromator. Minimal version with no interface to SHADOW.
Requires Python: >=3.8.0

# pyplanemono-minimal

This is a minimised version of the PyPlaneMono project, which is a calculation suite for the geometry of the plane grating monochromator. This repository contains only only the core calculation and visualisation functionalities and no GUI components
and is not capable of interacting with SHADOW as a pre-processor. For full functionality, refer to pyplanemono. This is meant to be distributed with the online interface of the PyPlaneMono project with maximum portability.
coppeliasim-zmqremoteapi-client 2.0.4
Client for the CoppeliaSim's zmqRemoteApi (protocol version 2)
Requires Python: >=3.8

# CoppeliaSim zmqRemoteApi Python client

Python client for the zmqRemoteApi, [protocol verison 2](https://github.com/CoppeliaRobotics/zmqRemoteApi/blob/master/PROTOCOL.md#versions) (note: starting from pip package version 2.x, the major version number (e.g. 2) matches with the protocol version used by CoppeliaSim).

## Installing:

```sh
python3 -m pip install coppeliasim-zmqremoteapi-client
```

## Usage

```python
from coppeliasim_zmqremoteapi_client import *

# create a client to connect to zmqRemoteApi server:
# (creation arguments can specify different host/port,
# defaults are host='localhost', port=23000)
client = RemoteAPIClient()

# get a remote object:
sim = client.require('sim')

# call API function:
h = sim.getObject('/Floor')
print(h)
```

There is also an `asyncio` version of the client. Normal `asyncio` principles apply, and all methods are async:

```python
from coppeliasim_zmqremoteapi_client.asyncio import *

client = RemoteAPIClient()

async def main():
    async with RemoteAPIClient() as client:
        sim = await client.require('sim')
        h = await sim.getObject('/Floor')
        print(h)

asyncio.run(main())
```

on Windows, if it doesn't work properly, before calling `asyncio.run(...)` call:

```python
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
```

A note about performance of sequential requests: if performing many commands in one shot, and results will be used later, consider using `asyncio.gather` for improved throughput.

E.g. getting the handles of 100 objects:

```python
handles = await asyncio.gather(*[sim.getObject(f'/Object{i+1}') for i in range(100)])
```

Also check out the examples in [`clients/python`](https://github.com/CoppeliaRobotics/zmqRemoteApi/blob/master/clients/python).