semvec/pypi-packages huggingface dataset:
ns-serial 1.3
Serial module for Python

# SerialIO
 * Python support for serial I/O
 
```
pip install ns-serial
```
```python
import ns-serial as serial
```

This module was originally created by novus-alex,
<br>https://github.com/novus-alex
<br>https://github.com/novus-alex/SerialIO
 
Copyright (c) 2021 by Alexandre Hachet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

## Quick Examples
```python
import ns-serial as serial

hComm = serial.Serial("YourPort", Baudrate, Timeout)
data = serial.read(hComm) # Wait until receive data from serial port
```
apply-defaults 0.1.6
Apply values to optional params

# apply_defaults

Apply default values to functions.

Makes configuration easy! Application settings come from a config file into
your code cleanly.

```sh
pip install apply_defaults
```

## @apply_config

This decorator applies options from a ConfigParser object.

```python
from apply_defaults import apply_config
from configparser import ConfigParser

config = ConfigParser()
config.read_dict({"general": {"option": True}})

@apply_config(config)
def func(option: bool = False) -> bool:
    return option
```

The `option` parameter takes the value from the configuration.

```python
>>> func()
True
```

Override the configuration by passing a value.

```python
>>> func(option=False)
False
```

If the option is not in the configuration, the default value from the parameter
list is used.

```python
>>> config.remove_option("general", "option")
>>> func()
False
```

_ConfigParser's options are strings. Type hints in the function signature allow
the apply_config decorator to cast options to the desired type.  Alternatively
cast the value yourself._

## @apply_self

This decorator applies attributes from the bound object.

```python
from apply_defaults import apply_self

class MyObject:
    def __init__(self):
        self.option = True

    @apply_self
    def func(self, option=False):
        return option
```

The parameter takes the value from the bound object, i.e. `self.option`.

```python
>>> obj = MyObject()
>>> obj.func()
True
```

Override by passing a value.

```python
>>> obj.func(option=False)
False
```

If the attribute is not in the bound object, the default value from the
parameter list is used.

```python
>>> del obj.option
>>> obj.func()
False
```