fluke5440b-async


Namefluke5440b-async JSON
Version 1.0.2 PyPI version JSON
download
home_page
SummaryA Python asyncio library for the Fluke 5440B voltage calibrator.
upload_time2023-09-14 14:32:39
maintainer
docs_urlNone
author
requires_python>=3.7
licenseGNU General Public License v3 (GPLv3)
keywords fluke 5440b gpib api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![pylint](../../actions/workflows/pylint.yml/badge.svg)](../../actions/workflows/pylint.yml)
[![PyPI](https://img.shields.io/pypi/v/fluke5440b_async)](https://pypi.org/project/fluke5440b_async/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fluke5440b_async)
![PyPI - Status](https://img.shields.io/pypi/status/fluke5440b_async)
[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
# fluke5440b-async
Python3 asyncio Fluke 5440B driver. This library requires Python [asyncio](https://docs.python.org/3/library/asyncio.html) and asyncio library for the GPIB adapter.

The library is fully type-hinted.

> :warning: The following features are not supported (yet):
> - External calibration: I do not have the means to test this. If you want to help, open a ticket and we can get this done
> - Setting and retrieving DUUT tolerances and errors. I believe this is best done in software on the host computer and not done internally in the calibrator. If you really need that featuer open a ticket.

## Supported GPIB Hardware
| Device                                                                              |Supported|Tested|Comments|
|-------------------------------------------------------------------------------------|--|--|--|
| [asyncio Prologix GPIB library](https://github.com/PatrickBaus/pyAsyncPrologixGpib) |:heavy_check_mark:|:heavy_check_mark:|  |
| [asyncio linux-gpib wrapper](https://github.com/PatrickBaus/pyAsyncGpib)            |:heavy_check_mark:|:heavy_check_mark:|  |

Tested using Linux, but should work on Mac OSX, Windows or any OS with Python support.

## Documentation
The full documentation can be found on GitHub Pages:
[https://patrickbaus.github.io/pyAsyncFluke5440B/](https://patrickbaus.github.io/pyAsyncFluke5440B/). I use the
[Numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) style for documentation and
[Sphinx](https://www.sphinx-doc.org/en/master/index.html) for compiling it.

# Setup
To install the library in a virtual environment (always use venvs with every project):
```bash
python3 -m venv env  # virtual environment, optional
source env/bin/activate  # only if the virtual environment is used
pip install fluke5440b-async
```

All examples assume that a GPIB library is installed as well. Either run
```bash
pip install prologix-gpib-async    # or alternatively
# pip install async-gpib
```

# Usage
> :warning: The calibrator does not like excessive serial polling. So, when using the Prologix adapter, one might see warnings like this:
> *Got error during waiting: ErrorCode.GPIB_HANDSHAKE_ERROR. If you are using a Prologix adapter, this can be safely ignored at this point.*
> These are harmless and can be ignored.

The library uses an asynchronous context manager to make cleanup easier. You can use either the
context manager syntax or invoke the calls manually:

```python
async with Fluke_5440B(connection=gpib_device) as fluke5440b:
    # Add your code here
    ...
```

```python
try:
    fluke5440b = Fluke_5440B(connection=gpib_device)
    await fluke5440b.connect()
    # your code
finally:
    await fluke5440b.disconnect()
```


A simple example for setting the output voltage.
```python
from pyAsyncFluke5440B.Fluke_5440B import Fluke_5440B

from pyAsyncGpib.pyAsyncGpib.AsyncGpib import AsyncGpib


# This example will print voltage data to the console
async def main():
    # The default GPIB address is 7.
    async with Fluke_5440B(connection=AsyncGpib(name=0, pad=7)) as fluke5440b:
        # No need to explicitely bring up the GPIB connection. This will be done by the instrument.
        await fluke5440b.set_output(10.0)
        await fluke5440b.set_output_enabled(True)


try:
    asyncio.run(main(), debug=True)
except KeyboardInterrupt:
    # The loop will be canceled on a KeyboardInterrupt by the run() method, we just want to suppress the exception
    pass
```

See [examples/](examples/) for more working examples.

## Versioning

I use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](../../tags).

## Authors

* **Patrick Baus** - *Initial work* - [PatrickBaus](https://github.com/PatrickBaus)

## License


This project is licensed under the GPL v3 license - see the [LICENSE](LICENSE) file for details

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "fluke5440b-async",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "Fluke 5440B,GPIB,API",
    "author": "",
    "author_email": "Patrick Baus <patrick.baus@physik.tu-darmstadt.de>",
    "download_url": "https://files.pythonhosted.org/packages/5d/1f/59304330d72067dfcc1394a49c5f3276ab6efc9feeaad491678b696da8cf/fluke5440b_async-1.0.2.tar.gz",
    "platform": null,
    "description": "[![pylint](../../actions/workflows/pylint.yml/badge.svg)](../../actions/workflows/pylint.yml)\n[![PyPI](https://img.shields.io/pypi/v/fluke5440b_async)](https://pypi.org/project/fluke5440b_async/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/fluke5440b_async)\n![PyPI - Status](https://img.shields.io/pypi/status/fluke5440b_async)\n[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n# fluke5440b-async\nPython3 asyncio Fluke 5440B driver. This library requires Python [asyncio](https://docs.python.org/3/library/asyncio.html) and asyncio library for the GPIB adapter.\n\nThe library is fully type-hinted.\n\n> :warning: The following features are not supported (yet):\n> - External calibration: I do not have the means to test this. If you want to help, open a ticket and we can get this done\n> - Setting and retrieving DUUT tolerances and errors. I believe this is best done in software on the host computer and not done internally in the calibrator. If you really need that featuer open a ticket.\n\n## Supported GPIB Hardware\n| Device                                                                              |Supported|Tested|Comments|\n|-------------------------------------------------------------------------------------|--|--|--|\n| [asyncio Prologix GPIB library](https://github.com/PatrickBaus/pyAsyncPrologixGpib) |:heavy_check_mark:|:heavy_check_mark:|  |\n| [asyncio linux-gpib wrapper](https://github.com/PatrickBaus/pyAsyncGpib)            |:heavy_check_mark:|:heavy_check_mark:|  |\n\nTested using Linux, but should work on Mac OSX, Windows or any OS with Python support.\n\n## Documentation\nThe full documentation can be found on GitHub Pages:\n[https://patrickbaus.github.io/pyAsyncFluke5440B/](https://patrickbaus.github.io/pyAsyncFluke5440B/). I use the\n[Numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html) style for documentation and\n[Sphinx](https://www.sphinx-doc.org/en/master/index.html) for compiling it.\n\n# Setup\nTo install the library in a virtual environment (always use venvs with every project):\n```bash\npython3 -m venv env  # virtual environment, optional\nsource env/bin/activate  # only if the virtual environment is used\npip install fluke5440b-async\n```\n\nAll examples assume that a GPIB library is installed as well. Either run\n```bash\npip install prologix-gpib-async    # or alternatively\n# pip install async-gpib\n```\n\n# Usage\n> :warning: The calibrator does not like excessive serial polling. So, when using the Prologix adapter, one might see warnings like this:\n> *Got error during waiting: ErrorCode.GPIB_HANDSHAKE_ERROR. If you are using a Prologix adapter, this can be safely ignored at this point.*\n> These are harmless and can be ignored.\n\nThe library uses an asynchronous context manager to make cleanup easier. You can use either the\ncontext manager syntax or invoke the calls manually:\n\n```python\nasync with Fluke_5440B(connection=gpib_device) as fluke5440b:\n    # Add your code here\n    ...\n```\n\n```python\ntry:\n    fluke5440b = Fluke_5440B(connection=gpib_device)\n    await fluke5440b.connect()\n    # your code\nfinally:\n    await fluke5440b.disconnect()\n```\n\n\nA simple example for setting the output voltage.\n```python\nfrom pyAsyncFluke5440B.Fluke_5440B import Fluke_5440B\n\nfrom pyAsyncGpib.pyAsyncGpib.AsyncGpib import AsyncGpib\n\n\n# This example will print voltage data to the console\nasync def main():\n    # The default GPIB address is 7.\n    async with Fluke_5440B(connection=AsyncGpib(name=0, pad=7)) as fluke5440b:\n        # No need to explicitely bring up the GPIB connection. This will be done by the instrument.\n        await fluke5440b.set_output(10.0)\n        await fluke5440b.set_output_enabled(True)\n\n\ntry:\n    asyncio.run(main(), debug=True)\nexcept KeyboardInterrupt:\n    # The loop will be canceled on a KeyboardInterrupt by the run() method, we just want to suppress the exception\n    pass\n```\n\nSee [examples/](examples/) for more working examples.\n\n## Versioning\n\nI use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](../../tags).\n\n## Authors\n\n* **Patrick Baus** - *Initial work* - [PatrickBaus](https://github.com/PatrickBaus)\n\n## License\n\n\nThis project is licensed under the GPL v3 license - see the [LICENSE](LICENSE) file for details\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v3 (GPLv3)",
    "summary": "A Python asyncio library for the Fluke 5440B voltage calibrator.",
    "version": "1.0.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/PatrickBaus/pyAsyncFluke5440B/issues",
        "Download": "https://github.com/PatrickBaus/pyAsyncFluke5440B/releases",
        "Homepage": "https://github.com/PatrickBaus/pyAsyncFluke5440B"
    },
    "split_keywords": [
        "fluke 5440b",
        "gpib",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "723fa17db92540a1a778b5407c352583cc9d4a0040e9ece825a8b1e45c545deb",
                "md5": "c2c607134cab1fa786edc3c06ad242a0",
                "sha256": "62e989cc16c2848c5777c31d8c401d950d8400a03443e01952c5ee69c7430bc2"
            },
            "downloads": -1,
            "filename": "fluke5440b_async-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c2c607134cab1fa786edc3c06ad242a0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 28673,
            "upload_time": "2023-09-14T14:32:37",
            "upload_time_iso_8601": "2023-09-14T14:32:37.687116Z",
            "url": "https://files.pythonhosted.org/packages/72/3f/a17db92540a1a778b5407c352583cc9d4a0040e9ece825a8b1e45c545deb/fluke5440b_async-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d1f59304330d72067dfcc1394a49c5f3276ab6efc9feeaad491678b696da8cf",
                "md5": "5f91387afd988fc582ffb502e812702c",
                "sha256": "3546c68194c9d95eaa8f894c96f990a6e9f1ffc3d6405594a43b1953960a9d5a"
            },
            "downloads": -1,
            "filename": "fluke5440b_async-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5f91387afd988fc582ffb502e812702c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 29824,
            "upload_time": "2023-09-14T14:32:39",
            "upload_time_iso_8601": "2023-09-14T14:32:39.473179Z",
            "url": "https://files.pythonhosted.org/packages/5d/1f/59304330d72067dfcc1394a49c5f3276ab6efc9feeaad491678b696da8cf/fluke5440b_async-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-14 14:32:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PatrickBaus",
    "github_project": "pyAsyncFluke5440B",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fluke5440b-async"
}
        
Elapsed time: 0.20059s