Metadata-Version: 2.1
Name: uscpi
Version: 0.0.1
Summary: An asynchronous SCPI instrumentation library.
Author-email: Michael Czigler <michaelczigler@icloud.com>
License: BSD 3-Clause License
        
        Copyright (c) 2023, Michael Czigler
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: homepage, https://github.com/mcpcpc/uscpi
Project-URL: repository, https://github.com/mcpcpc/uscpi
Keywords: instrumentation,SCPI,asynchronous
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: coverage; extra == "dev"
Requires-Dist: black; extra == "dev"

# &mu;SCPI

An asynchronous SCPI instrumentation library.

## Installation

Installing the latest release from [PyPI](https://pypi.org).

```console
pip install -U uscpi
```

Installing from the latest source using [git](https://git-scm.com).

```console
git clone http://github.com/mcpcpc/uscpi
cd uscpi/
pip install .
```

## Usage

A basic example using the *asyncio* library.

```python
from asyncio import run
from uscpi.protocol import TCP
from uscpi.instrument import Instrument

protocol = TCP(host="127.0.0.1", port=5025)
instrument = Instrument(protocol=protocol)

async def main():
    response = await instrument.idn()
    print(response)

if __name__ == "__main__":
     run(main())
```

## Features

The `uscpi` is fairly lightweight and leaves a majority of instrument function commands to be implemented by the user. Nonetheless, the following IEEE-488.2 commands have been implemented:

- Clear Status Command
- Event Status Enable Command and Query
- Standard Event Status Register Query
- Identification Query
- Reset Command
- Service Request Enable Command and Query
- Read Status Byte Query
- Trigger Command
- Self-Test Query
- Wait-to-Continue Command

## Credits

- [sockio](https://github.com/tiagocoutinho/sockio)
- [IEEE 488.2 Common Commands](https://rfmw.em.keysight.com/spdhelpfiles/truevolt/webhelp/US/Content/__I_SCPI/IEEE-488_Common_Commands.htm)
