semvec/pypi-packages huggingface dataset:
smtc 1.0.1
Library to control smtc Automation Card
License: MIT

# sm_tc

This is the python library to control the [Eight Thermocouples DAQ 8-Layer Stackable HAT for Raspberry Pi](https://sequentmicrosystems.com/products/eight-thermocouples-daq-8-layer-stackable-hat-for-raspberry-pi).

## Install

```bash
sudo pip install SMtc
```

## Usage

```bash
~$ python
Python 3.10.7 (main, Nov  7 2022, 22:59:03) [GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sm_tc
>>> tc = sm_tc.SMtc(0)
>>> tc.get_temp(1)
26.5
>>>
```

More usage example in the [examples](examples/) folder

## Functions prototype

### *class sm_tc.SMtc(stack = 0, i2c = 1)*
* Description
  * Init the SMtc object and check the card presence 
* Parameters
  * stack : Card stack level [0..7] set by the jumpers
  * i2c : I2C port number, 1 - Raspberry default , 7 - rock pi 4, etc.
* Returns 
  * card object

#### *set_sensor_type(channel, val)*
* Description
  * Set one channel thermocouple input type 
* Parameters
  * *channel*: The input channel number 1 to 8
  * *val*: The thermocouple type [0..7] -> [B, E, J, K, N, R, S, T]
* Returns
  * none
  
#### *get_sensor_type(channel)*
* Description
  * Get one channel thermocouple input type 
* Parameters
  * *channel*: The input channel number 1 to 8
* Returns
  * The thermocouple type [0..7] -> [B, E, J, K, N, R, S, T]
  
#### *print_sensor_type(channel)*
* Description
  * Print one channel thermocouple input type [B, E, J, K, N, R, S, T]
* Parameters
  * *channel*: The input channel number 1 to 8
* Returns
  * none
   
#### *get_temp(channel)*
* Description
  * Get one channel measured temperature in degee Celsious
* Parameters
  * *channel*: The input channel number 1 to 8
* Returns
  * Temperature in degree Celsious
sm8inputs 1.0.2
Library to control 8inputs Automation Card
License: MIT

[![8inputs-rpi](../readmeres/sequent.jpg)](https://sequentmicrosystems.com)

# lib8inputs

This is the python library to control the [Four Relays four Inputs 8-Layer Stackable Card for Raspberry Pi](https://sequentmicrosystems.com/collections/all-io-cards/products/raspberry-pi-relays-heavy-duty-hat).

## Install

```bash
sudo pip install SM8inputs
```

## Usage

Now you can import the megaio library and use its functions. To test, read relays status from the board with stack level 0:

```bash
~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lib8inputs
>>> lib8inputs.get_opto_all(0)
0
>>>
```

## Functions

### get_opto(stack, channel)
Get one input state.

stack - stack level of the 8-Inputs card (selectable from address jumpers [0..7])

channel - opto input channel number (id) [1..8]

return 0 == opto off; 1 - opto on

### get_opto_all(stack)
Return the state of all opto inputs.

stack - stack level of the 8-Inputs card (selectable from address jumpers [0..7])

return - [0..255]
[![8inputs-rpi](../../readmeres/sequent.jpg)](https://sequentmicrosystems.com)

# lib8inputs

This is the python library to control the [4-RELAYS Heavy Duty Stackable Card for Raspberry Pi](https://sequentmicrosystems.com/product/raspberry-pi-relays-heavy-duty-hat/).

## Install

```bash
sudo pip install SM8inputs
```

## Usage

Now you can import the megaio library and use its functions. To test, read relays status from the board with stack level 0:

```bash
~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lib8inputs
>>> lib8inputs.get_opto_all(0)
0
>>>
```

## Functions

### get_opto(stack, channel)
Get one input state.

stack - stack level of the 8-Inputs card (selectable from address jumpers [0..7])

channel - opto input channel number (id) [1..8]

return 0 == opto off; 1 - opto on

### get_opto_all(stack)
Return the state of all opto inputs.

stack - stack level of the 8-Inputs card (selectable from address jumpers [0..7])

return - [0..255]
sm8mosind 1.0.2
Library to control 8mosind Automation Card
License: MIT


[![8mosind-rpi](res/sequent.jpg)](https://sequentmicrosystems.com)

# lib8mosind

This is the python library to control the [8-MOSFETS V3 Solid State Stackable Card for Raspberry Pi](https://sequentmicrosystems.com/collections/industrial-automation/products/eight-mosfets-v3-br-8-layer-stackable-card-br-for-raspberry-pi).

## Install

```bash
sudo pip install SM8mosind
```

## Usage

Now you can import the lib8mosind library and use its functions. To test, read mosfets status from the board with stack level 0:

```bash
~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import lib8mosind
>>> lib8mosind.get_all(0)
0
>>>
```

## Functions

### set(stack, mosfet, value)
Set one mosfet state.

stack - stack level of the 8-Relay card (selectable from address jumpers [0..7])

mosfet - mosfet number (id) [1..8]

value - mosfet state 1: turn ON, 0: turn OFF[0..1]


### set_all(stack, value)
Set all mosfets state.

stack - stack level of the 8-Relay card (selectable from address jumpers [0..7])

value - 4 bit value of all mosfets (ex: 15: turn on all mosfets, 0: turn off all mosfets, 1:turn on mosfet #1 and off the rest)

### get(stack, mosfet)
Get one mosfet state.

stack - stack level of the 8-Relay card (selectable from address jumpers [0..7])

mosfet - mosfet number (id) [1..8]

return 0 == mosfet off; 1 - mosfet on

### get_all(stack)
Return the state of all mosfets.

stack - stack level of the 8-Relay card (selectable from address jumpers [0..7])

return - [0..255]

### set_pwm(stack, mosfet, value)
Set one mosfet pwm fill factor.

stack - stack level of the 8-Relay card (selectable from address jumpers [0..7])

mosfet - mosfet number (id) [1..8]

value - pwm fill factor [0..100]

### get_pwm(stack, mosfet)
Get one mosfet pwm fill factor.

stack - stack level of the 8-Relay card (selectable from address jumpers [0..7])

mosfet - mosfet number (id) [1..8]

return [0..100]
kognic-openlabel 2.0.5
Kognic OpenLABEL Datamodel
License: MIT
Requires Python: >=3.7
Keywords: Kognic, OpenLABEL

# Kognic OpenLABEL

## Installation
Install the Kognic OpenLABEL package from pip with

    pip install kognic-openlabel

## Serialization and deserialization

Since all models inherit from `pydantic`'s `BaseModel`, serialization and deserialization from dicts or json strings are relatively straight forward. 

```py
data = {
    "openlabel": {
        "metadata": {
            "schema_version": "1.0.0"
        }
    }
}

import kognic.openlabel.models as OLM

# Deserialize dict
openlabel_annotation = OLM.OpenLabelAnnotation.model_validate(data)

# Serialize to json
json_data = openlabel_annotation.model_dump_json(exclude_none=True)

# Deserialize json
openlabel_annotation = OLM.OpenLabelAnnotation.model_validate_json(json_data)

# Serialize to dict
dict_data = openlabel_annotation.model_dump(exclude_none=True)
```
    
## Further reading
https://www.asam.net/project-detail/asam-openlabel-v100/

# Changelog

## [2.0.3] - 2024-07-26
- Fix so that `model_dump` works correctly with ontologies

## [2.0.2] - 2024-07-26
...

## [2.0.1] - 2023-11-07
- Use `model_rebuild` instead of deprecated `update_forward_refs`

## [2.0.0] - 2023-11-06
- Bump pydantic to >2

## [1.0.1] - 2023-07-05
- Pin pydantic version to <2

## [1.0.0] - 2022-10-18
- Annotell becomes Kognic

## [0.1.4] - 2022-01-24
- Improved serializability for enum classes

## [0.1.3] - 2022-01-04
- Fixed issues with version 0.1.2

## [0.1.2] - 2021-12-29
- Updated several fields with multiple types to fix issues with serialization and deserialization.
For example, the coordinates on `Poly2d` objects were previously always parsed to strings.
  This update means that an attempt to parse them to floats is made. If this fails the they will be parsed to strings. 

## [0.1.1] - 2021-11-24
- Updated stream properties model generation to be nicer to work with

## [0.1.0] - 2021-11-18
- Updated json schema and model to be true to the 1.0.0 release of openlabel. Previously it was based on the release-candidate
smrtd 1.0.3
Library to control Sequent Microsystems rtd Card
License: MIT

[![librtd](res/sequent.jpg)](https://www.sequentmicrosystems.com)
# librtd

This is the python library to control the [RTD Data Acquisition Stackable Card for Raspberry Pi](https://sequentmicrosystems.com/product/rtd-data-acquisition-card-for-rpi/).

## Install

```bash
sudo pip install SMrtd
```

## Usage

Now you can import the megaio library and use its functions. To test, read relays status from the board with stack level 0:

```bash
~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import librtd
>>> librtd.get(0, 1)
26.654391
>>>
```

## Functions


### get(stack, channel)

- stack - stack level of the MEGA-RTD card (selectable from address jumpers [0..7]).
- channel - channel number (id) [1..8].

return tempetature in deg Celsius.

### getRes(stack, channel)

- stack - stack level of the MEGA-RTD card (selectable from address jumpers [0..7]).
- channel - channel number (id) [1..8].

return sensor resistance in ohms.

### get_poly5(stack: int, channel: int)

Convert RTD reading to Temperature, using 5th order polynomial fit of Temperature as a function of Resistance.
This fit provides much-improved accuracy through the temperature range of [-200C, 660C], particularly near the high
and low ranges, compared to the default linear fitting function baked into the Sequent RTD Data Acquisition
Stackable Card for Raspberry Pi.  The coefficients for this fit were developed in a project documented
in https://github.com/ewjax/max31865
```
        temp_C = (c5 * res^5) + (c4 * res^4) + (c3 * res^3) + (c2 * res^2) + (c1 * res) + c0
```
 - param stack: 0-7, which hat to read
 - param channel: 1-8, which RTD to read on indicated hat
 - return: temperature, in Celcius

Tanks to [ewjax](https://github.com/ewjax) for the polynomial fit contribution
sm16relind 1.0.4
Library to control Multi-IO Automation Card
License: MIT
Keywords: industrial, raspberry, power, 4-20mA, 0-10V, optoisolated

# SM16relind

This is the python library to control the [Sixteen Relays 8-Layer Stackable HAT for Raspberry Pi](https://sequentmicrosystems.com/collections/all-io-cards/products/sixteen-relays-8-layer-stackable-hat-for-raspberry-pi).

## Install

```bash
sudo pip install SM16relind
```

or (if using python3.x):

```bash
sudo pip3 install SM16relind
```

## Update

```bash
sudo pip install SM16relind -U
```

or (if using python3.x):

```bash
sudo pip3 install SM16relind -U
```

### Manual installation (without pip)

```bash
~$ sudo apt-get update
~$ sudo apt-get install build-essential python-pip python-dev python-smbus git
~$ git clone https://github.com/SequentMicrosystems/16relind-rpi.git
~$ cd 16relind-rpi/python/
~/16relind-rpi/python$ sudo python setup.py install
```
If you use python3.x repace the last line with:
```
~/16relind-rpi/python$ sudo python3 setup.py install
```

### Manual update (only if installed without pip)

```bash
~$ cd 16relind-rpi/
~/16relind-rpi$ git pull
~$ cd 16relind-rpi/python
~/16relind-rpi/python$ sudo python setup.py install
```
If you use python3.x repace the last line with:
```
~/16relind-rpi/python$ sudo python3 setup.py install
```

## Usage example

```bash
~$ python
Python 3.10.7 (main, Nov  7 2022, 22:59:03) [GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import SM16relind
>>> rel = SM16relind.SM16relind(0)
>>> rel.set(1, 1)
>>> rel.get_all()
1
>>>
```

More usage example in the [examples](examples/) folder

## Functions prototype

### *class SM16relind.SM16relind(stack = 0, i2c = 1)*
* Description
  * Init the SM16relind object and check the card presence 
* Parameters
  * stack : Card stack level [0..7] set by the jumpers
  * i2c : I2C port number, 1 - Raspberry default , 7 - rock pi 4, etc.
* Returns 
  * card object

#### *set(relay, val)*
* Description
  * Set one relay state
* Parameters
  * *relay*: The relay number 1 to 16
  * *val*: The new state of the relay 0 = turn off else turn on
* Returns
  * none
  
#### *set_all(val)*
* Description
  * Set the state of all relays as a 16 bits bit-map
* Parameters
  * *val*: The new state of all 16 relays, 0 => all off, 15 => all on
* Returns
  * none
  
#### *get(relay)*
* Description
  * Read one relay state
* Parameters
  * *relay* relay number [1..16]
* Returns
  * the state of the relay 0 or 1

#### *get_all()*
* Description
  * Read the state of all 16 relays 
* Parameters
  * none
* Returns
  * relays state as bitmap [0..65535]