nexgraphpy


Namenexgraphpy JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
SummaryPython library for connecting with Nextech force gauges over USB Serial
upload_time2024-11-19 14:33:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseGPL-3.0-only WITH Classpath-exception-2.0 OR BSD-3-Clause
keywords nexgraph nextech
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # nexgraphpy module
# Nexgraph Python

## Description:
NexGraph Python is a Python library implementation of the NexGraph software which works with Nextech brand force gauges.  It provides an easy way to connect to Nextech force gauges using Python.  Despite it's name it does not create graphs as of yet, but does retrieve data from the device to be graphed.

This library is under development and more features will be added later.

## Requirements:
Tested on Python versions 3.10+

## Installation:

`pip install nexgraphpy`

## Examples:

### Import the library:

`from nexgraph import NexGraph`

### Create a new instance:

`dft_force_gauge = NexGraph()`

### Find and connect to a Nextech force gauge over USB serial port:

```
if dft_force_gauge.find():
    if dft_force_gauge.connect():
        print(dft_force_gauge.get_info())
        dft_force_gauge.disconnect()
        dft_force_gauge = None
    else:
        print("Unable to connect")
        exit()
else:
    print("No device found.")
    exit()
```

### Connect to a Nextech force gauge directly:

```
# Initialize with device the path
dft_force_gauge = NexGraph("COM3")

# Or set the device path after initializing
dft_force_gauge.device_path = "COM3"

# Connect to device after setting the path
if dft_force_gauge.connect():
    ...
```

### Basic device serial operations:

#### Returns boolean value
```
# Change device modes, peak and tracking
dft_force_gauge.mode()

# Change the units on device
dft_force_gauge.unit()

# Reset the current device value
dft_force_gauge.reset()

# Zero (Tare) the value on device
dft_force_gauge.zero()
```

#### Returns string value
```
# Download data from device memory
dft_force_gauge.download()

# Print current value
dft_force_gauge.print_value()

# Print peak compression value
dft_force_gauge.peak_compression()

# Print peak tension value
dft_force_gauge.peak_tension()

# Print different formatted outputs
dft_force_gauge.long_output()
dft_force_gauge.short_output()
dft_force_gauge.mini_output()
```

### Output live data of 100 rows:

*Note: 
The output rate is roughly 10 data points per second.
100 data points is approximately 10 seconds of testing.*

```
i = 0
while True:
    print(dft_force_gauge.long_output())
    i += 1
    if i >= 100:
        break
```
## Documentation

[Nexgraph Python Docs](https://python.nexgraphapp.com/)
<https://python.nexgraphapp.com/>
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nexgraphpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "nexgraph, nextech",
    "author": null,
    "author_email": "Shawn Myratchapon <info@nexgraphapp.com>",
    "download_url": "https://files.pythonhosted.org/packages/41/71/0808dee94a8a9508cfe62ca02c6bc3a12e1a78c71a201a75623bf6673b2f/nexgraphpy-1.0.3.tar.gz",
    "platform": null,
    "description": "# nexgraphpy module\n# Nexgraph Python\n\n## Description:\nNexGraph Python is a Python library implementation of the NexGraph software which works with Nextech brand force gauges.  It provides an easy way to connect to Nextech force gauges using Python.  Despite it's name it does not create graphs as of yet, but does retrieve data from the device to be graphed.\n\nThis library is under development and more features will be added later.\n\n## Requirements:\nTested on Python versions 3.10+\n\n## Installation:\n\n`pip install nexgraphpy`\n\n## Examples:\n\n### Import the library:\n\n`from nexgraph import NexGraph`\n\n### Create a new instance:\n\n`dft_force_gauge = NexGraph()`\n\n### Find and connect to a Nextech force gauge over USB serial port:\n\n```\nif dft_force_gauge.find():\n    if dft_force_gauge.connect():\n        print(dft_force_gauge.get_info())\n        dft_force_gauge.disconnect()\n        dft_force_gauge = None\n    else:\n        print(\"Unable to connect\")\n        exit()\nelse:\n    print(\"No device found.\")\n    exit()\n```\n\n### Connect to a Nextech force gauge directly:\n\n```\n# Initialize with device the path\ndft_force_gauge = NexGraph(\"COM3\")\n\n# Or set the device path after initializing\ndft_force_gauge.device_path = \"COM3\"\n\n# Connect to device after setting the path\nif dft_force_gauge.connect():\n    ...\n```\n\n### Basic device serial operations:\n\n#### Returns boolean value\n```\n# Change device modes, peak and tracking\ndft_force_gauge.mode()\n\n# Change the units on device\ndft_force_gauge.unit()\n\n# Reset the current device value\ndft_force_gauge.reset()\n\n# Zero (Tare) the value on device\ndft_force_gauge.zero()\n```\n\n#### Returns string value\n```\n# Download data from device memory\ndft_force_gauge.download()\n\n# Print current value\ndft_force_gauge.print_value()\n\n# Print peak compression value\ndft_force_gauge.peak_compression()\n\n# Print peak tension value\ndft_force_gauge.peak_tension()\n\n# Print different formatted outputs\ndft_force_gauge.long_output()\ndft_force_gauge.short_output()\ndft_force_gauge.mini_output()\n```\n\n### Output live data of 100 rows:\n\n*Note: \nThe output rate is roughly 10 data points per second.\n100 data points is approximately 10 seconds of testing.*\n\n```\ni = 0\nwhile True:\n    print(dft_force_gauge.long_output())\n    i += 1\n    if i >= 100:\n        break\n```\n## Documentation\n\n[Nexgraph Python Docs](https://python.nexgraphapp.com/)\n<https://python.nexgraphapp.com/>",
    "bugtrack_url": null,
    "license": "GPL-3.0-only WITH Classpath-exception-2.0 OR BSD-3-Clause",
    "summary": "Python library for connecting with Nextech force gauges over USB Serial",
    "version": "1.0.3",
    "project_urls": {
        "Documentation": "https://python.nexgraphapp.com/",
        "Homepage": "https://github.com/simply-shawn/nexgraphpy",
        "Source": "https://github.com/simply-shawn/nexgraphpy",
        "Tracker": "https://github.com/simply-shawn/nexgraphpy/issues"
    },
    "split_keywords": [
        "nexgraph",
        " nextech"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fabd113f8aec350640b47922d3b1cdddb4abcb1f2e7f60d752a388064bb12d05",
                "md5": "2c174590c79e0328177f34e7b78998ca",
                "sha256": "b9d3938ee3dcc0bf402cfafac04347dde2447a15a207852aa61cc8d60938dc6d"
            },
            "downloads": -1,
            "filename": "nexgraphpy-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2c174590c79e0328177f34e7b78998ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 17071,
            "upload_time": "2024-11-19T14:33:54",
            "upload_time_iso_8601": "2024-11-19T14:33:54.487232Z",
            "url": "https://files.pythonhosted.org/packages/fa/bd/113f8aec350640b47922d3b1cdddb4abcb1f2e7f60d752a388064bb12d05/nexgraphpy-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "41710808dee94a8a9508cfe62ca02c6bc3a12e1a78c71a201a75623bf6673b2f",
                "md5": "6214bc2b4311b72e4833bbdcdfcda4ef",
                "sha256": "af2a9da0b153127bd79ea56f4dfd26e2c5faa73d2278dd1e084c3f2e57b32391"
            },
            "downloads": -1,
            "filename": "nexgraphpy-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "6214bc2b4311b72e4833bbdcdfcda4ef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 19681,
            "upload_time": "2024-11-19T14:33:55",
            "upload_time_iso_8601": "2024-11-19T14:33:55.953832Z",
            "url": "https://files.pythonhosted.org/packages/41/71/0808dee94a8a9508cfe62ca02c6bc3a12e1a78c71a201a75623bf6673b2f/nexgraphpy-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-19 14:33:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "simply-shawn",
    "github_project": "nexgraphpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nexgraphpy"
}
        
Elapsed time: 0.36562s