semvec/pypi-packages huggingface dataset:
AEngineConsole 0.0.1
Console applications engine.
Keywords: console,terminal,engine

[СЃlass]: # (Р±Р»РѕРє РєР»Р°СЃСЃР°)
<p style="text-align: center">Argument parser</p>
===============

--------------

     file: ArgParser.py
     class: ArgumentParser

<p>РљР»Р°СЃСЃ РґР»СЏ РїР°СЂСЃРёРЅРіР° Р°СЂРіСѓРјРµРЅС‚РѕРІ РёР· РєРѕРјР°РЅРґРЅРѕР№ СЃС‚СЂРѕРєРё.</p>
<br>

[methods]: # (Р±Р»РѕРє РјРµС‚РѕРґРѕРІ)

## <p style="text-align: center">РњРµС‚РѕРґС‹</p>

--------------

#### <p style="text-align: center; font-weight: bolder">add_rule( )</p>

    ArgumentParse.add_rule(var_name, flag)
    
    ex: ArgumentParse.add_rule('MyKey', '-key'),
        ArgumentParse.add_rule('MyKey', ['-key1', '-key2'])

<div style="margin: 30px 0">
    <p><span style="color: green">var_name</span> - РёРјСЏ РїРµСЂРµРјРµРЅРЅРѕР№, РєРѕС‚РѕСЂР°СЏ Р±СѓРґРµС‚ СЃРѕРґРµСЂР¶Р°С‚СЊ Р·РЅР°С‡РµРЅРёРµ РїРѕСЃР»Рµ С„Р»Р°РіР°</p>
    <p><span style="color: green">flag</span> - С„Р»Р°Рі РґР»СЏ РѕР±РѕР·РЅР°С‡РµРЅРёСЏ Р°СЂРіСѓРјРµРЅС‚Р° (РґРѕР»Р¶РµРЅ РЅР°С‡РёРЅР°С‚СЊСЃСЏ СЃ "-" Рё СЃС‚РѕСЏС‚СЊ РїРµСЂРµРґ Р·РЅР°С‡РµРЅРёРµРј)</p>
</div>

--------------

#### <p style="text-align: center; font-weight: bolder">add_rules_dict( )</p>

    ArgumentParse.add_rules_dict(rules)
    
    ex: ArgumentParse.add_rules_dict({
        'key1': '-flag1',
        'key2': ['-flag2', '-flag3']
    })

<div style="margin: 30px 0">
    <p><span style="color: green">rules</span> - СЃР»РѕРІР°СЂСЊ СЃ РїСЂР°РІРёР»Р°РјРё { var_name: flags } </p>
</div>

--------------

#### <p style="text-align: center; font-weight: bolder">parse( )</p>

    ArgumentParse.parse(args_list = None)
    
    ex: ArgumentParse.parse()

<div style="margin: 30px 0">
    <p><span style="color: green">args_list</span> - СЃРїРёСЃРѕРє Р°СЂРіСѓРјРµРЅС‚РѕРІ. Р•СЃР»Рё None, С‚Рѕ РїР°СЂСЃРёРЅРі РїСЂРѕРёСЃС…РѕРґРёС‚ РёР· sys.argv </p>
</div>

--------------


[СЃlass]: # (Р±Р»РѕРє РєР»Р°СЃСЃР°)
<p style="text-align: center">Argument list</p>
===============

--------------

     file: ArgParser.py
     class: ArgumentList

<p>РљР»Р°СЃСЃ, СЃРѕРґРµСЂР¶Р°С‰РёР№ Р°СЂРіСѓРјРµРЅС‚С‹ РєРѕРЅСЃРѕР»Рё РїРѕСЃР»Рµ ArgumentParser.parse().</p>
<p>Singleton, СЃР»РµРґРѕРІР°С‚РµР»СЊРЅРѕ РєР°Р¶РґС‹Р№ СЃРѕР·РґР°РЅРЅС‹Р№ СЌРєР·РµРјРїР»СЏСЂ РєР»Р°СЃСЃР° Р±СѓРґРµС‚ СЃРѕРґРµСЂР¶Р°С‚СЊ, С‡С‚Рѕ Рё РґСЂСѓРіРёРµ С‚Рµ Р¶Рµ РїРµСЂРµРјРµРЅРЅС‹Рµ.</p>
<br>

--------------

[usage]: # (Р±Р»РѕРє РїСЂРёРјРµРЅРµРЅРёСЏ)

## <p style="text-align: center">РџСЂРёРјРµРЅРµРЅРёРµ</p>

--------------
    ex: python main.py --host smth.ru
<p>main.py:</p>

    from AEngine_console.ArgParser import ArgumentParser, ArgumentList
    
    ArgumentParser.add_rule('host', ['--host', '-h'])
    ArgumentParser.parse()
    args = ArgumentList()
    print(args.host)
<p></p>
    
    output: smth.ru
pyEmpatica 0.6.0
Communicate with your Empatica E4 in your Python scripts.
Requires Python: >=3.6

# pyEmpatica

### Parties Involved
Institution: Munroe Meyer Institute in the University of Nebraska Medical Center<br>
Laboratory: Virtual Reality Laboratory<br>
Advisor: Dr. James Gehringer<br>
Developer: Walker Arce<br>

### Motivation
This Python library was written to facilitate biometric data collection from an Empatica E4.  It also includes windowed sample collection, threaded error handling, and on-wrist detection.

### Installation
This library is available for installation over pip using:
`pip install pyEmpatica`

For developers, clone this repository, cd into the directory using either your virtual environment or your local environment, and run:
`python setup.py install`

To actually utilize this library the Empatica Streaming Server is required, meaning this library is only compatible with Windows systems.

### Usage
```
from pyempatica import EmpaticaClient, EmpaticaE4, EmpaticaDataStreams, EmpaticaServerConnectError
import time


try:
    client = EmpaticaClient()
    print("Connected to E4 Streaming Server...")
    client.list_connected_devices()
    print("Listing E4 devices...")
    time.sleep(1)
    if len(client.device_list) != 0:
        e4 = EmpaticaE4(client.device_list[0])
        if e4.connected:
            print("Connected to", str(client.device_list[0]), "device...")
            for stream in EmpaticaDataStreams.ALL_STREAMS:
                e4.subscribe_to_stream(stream)
            print("Subscribed to all streams, starting streaming...")
            e4.start_streaming()
            for i in range(0, 10):
                time.sleep(1)
                if not e4.on_wrist:
                    print("E4 is not on wrist, please put it on!")
                if e4.client.last_error:
                    print("Error encountered:", e4.client.last_error)
                    break
            e4.suspend_streaming()
            e4.disconnect()
            e4.close()
            print("E4 Errors")
            for key in e4.client.errors:
                print("\t", key, ":", e4.client.errors[key])
            print("E4 connection closed, saving readings...")
            e4.save_readings("readings.txt")
            print("Readings saved to readings.txt...")
        else:
            print("Could not connect to Empatica E4:", client.device_list[0])
    client.close()
    print("Cleaning up connections...")
except EmpaticaServerConnectError:
    print("Failed to connect to server, check that the E4 Streaming Server is open and connected to the BLE dongle.")

```

Before running this script, ensure the Empatica Streaming Server is up and running.  This library is currently only compatible with Windows due to the Streaming Server dependency.

### Citation
```
@misc{Arce_pyEmpatica_2021,
      author = {Arce, Walker and Gehringer, James},
      month = {8},
      title = {{pyEmpatica}},
      url = {https://github.com/Munroe-Meyer-Institute-VR-Laboratory/pyEmpatica},
      year = {2021}
}
```