helium-positioning-api


Namehelium-positioning-api JSON
Version 0.0.2.dev1675767695 PyPI version JSON
download
home_pagehttps://github.com/emergotechnologies/helium-positioning-api
SummaryHelium Positioning API
upload_time2023-02-07 11:01:40
maintainer
docs_urlNone
authorLukas Huber
requires_python>=3.8,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Helium Positioning API

[![PyPI](https://img.shields.io/pypi/v/helium-positioning-api.svg)][pypi_]
[![Status](https://img.shields.io/pypi/status/helium-positioning-api.svg)][status]
[![Python Version](https://img.shields.io/pypi/pyversions/helium-positioning-api)][python version]
[![License](https://img.shields.io/pypi/l/helium-positioning-api)][license]

[![Read the documentation at https://helium-positioning-api.readthedocs.io/](https://img.shields.io/readthedocs/helium-positioning-api-api-api-api-api-api/latest.svg?label=Read%20the%20Docs)][read the docs]
[![Tests](https://github.com/emergotechnologies/helium-positioning-api/workflows/Tests/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/emergotechnologies/helium-positioning-api/branch/main/graph/badge.svg)][codecov]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi_]: https://pypi.org/project/helium-positioning-api/
[status]: https://pypi.org/project/helium-positioning-api/
[python version]: https://pypi.org/project/helium-positioning-api
[read the docs]: https://helium-positioning-api.readthedocs.io/
[tests]: https://github.com/emergotechnologies/helium-positioning-api/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/emergotechnologies/helium-positioning-api
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black

## Features

Prediction of the location of devices belonging to an organization in the [Helium Console](https://console.helium.com/). 
Several different methods and models are available.

## Installation

### Developer install

The following allows a user to create a developer install of the positioning api.

```console
pip install -r requirements.txt
poetry install
poetry shell
pip install git+https://github.com/emergotechnologies/helium-api-wrapper
```

## Prerequisites

Before use, ensure that there is an `.env` file in the root directory of the repository where the `API_KEY` variable is entered (see `.env.sample`). You can generate and copy the `API_KEY` at https://console.helium.com/profile.

## Usage

The service allows usage via **command line interface** or locally hosted **REST interface**.

### CLI

**Get Device Position**

```
python -m helium_positioning_api predict --uuid 92f23793-6647-40aa-b255-fa1d4baec75d
```

Currently defaults to the "nearest_neighbor" model.

**Advanced Requests**

The location prediction command is

```
python -m helium_positioning_api predict --uuid 'your uuid' --model 'your model selection'
```

See the table below for a list of currently available models.

| **model**       | **position estimation explanation**                                   |
| ----------------- | ------------------------------------------------------------------- |
| nearest_neighbor  | location of hotspot with the best signal                            |
| midpoint          | point of equal distance from the two hotspots with the best signals |
| linear_regression | trilateration with an linear regression distance estimator          |
| gradient_boosting | trilateration with a gradient boosted regression distance estimator |

### REST-API

1. Start local REST-API (default)
   ```
   python -m helium_positioning_api serve
   ```
2. Open Browser and navigate to `127.0.0.1:8000/docs`
3. Click on `predict_tf` path to drop down the endpoint details
4. Click on the `Try it out` button.
5. Fill in the `uuid` of your device and click on the button `Execute` to get an estimation using the `nearest_neighbor` model
6. You can see the location prediction response in the `Responses` section below.

The mapping of available models to paths can be seen in the table below.

| **model**         | **path**                                                            |
| ----------------- | ------------------------------------------------------------------- |
| nearest_neighbor  | predict_tf                                                          |
| midpoint          | predict_mp                                                          |
| linear_regression | predict_tl_lin                                                      |
| gradient_boosting | predict_tl_grad                                                     |

## Contributing

Contributions are very welcome.
To learn more, see the [Contributor Guide].

## License

Distributed under the terms of the [MIT license][license],
_Helium Positioning API_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue] along with a detailed description.

## Credits

This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.

[@cjolowicz]: https://github.com/cjolowicz
[pypi]: https://pypi.org/
[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
[file an issue]: https://github.com/emergotechnologies/helium-positioning-api/issues
[pip]: https://pip.pypa.io/

<!-- github-only -->

[license]: https://github.com/emergotechnologies/helium-positioning-api/blob/main/LICENSE
[contributor guide]: https://github.com/emergotechnologies/helium-positioning-api/blob/main/CONTRIBUTING.md
[command-line reference]: https://helium-positioning-api.readthedocs.io/en/latest/usage.html


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/emergotechnologies/helium-positioning-api",
    "name": "helium-positioning-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Lukas Huber",
    "author_email": "lukas.huber@fh-kufstein.ac.at",
    "download_url": "https://files.pythonhosted.org/packages/e0/9a/a95e4c27f8fb0a661ee86ab3a1d6f9777d520fdce8eea4c8720c8925525c/helium_positioning_api-0.0.2.dev1675767695.tar.gz",
    "platform": null,
    "description": "# Helium Positioning API\n\n[![PyPI](https://img.shields.io/pypi/v/helium-positioning-api.svg)][pypi_]\n[![Status](https://img.shields.io/pypi/status/helium-positioning-api.svg)][status]\n[![Python Version](https://img.shields.io/pypi/pyversions/helium-positioning-api)][python version]\n[![License](https://img.shields.io/pypi/l/helium-positioning-api)][license]\n\n[![Read the documentation at https://helium-positioning-api.readthedocs.io/](https://img.shields.io/readthedocs/helium-positioning-api-api-api-api-api-api/latest.svg?label=Read%20the%20Docs)][read the docs]\n[![Tests](https://github.com/emergotechnologies/helium-positioning-api/workflows/Tests/badge.svg)][tests]\n[![Codecov](https://codecov.io/gh/emergotechnologies/helium-positioning-api/branch/main/graph/badge.svg)][codecov]\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]\n[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]\n\n[pypi_]: https://pypi.org/project/helium-positioning-api/\n[status]: https://pypi.org/project/helium-positioning-api/\n[python version]: https://pypi.org/project/helium-positioning-api\n[read the docs]: https://helium-positioning-api.readthedocs.io/\n[tests]: https://github.com/emergotechnologies/helium-positioning-api/actions?workflow=Tests\n[codecov]: https://app.codecov.io/gh/emergotechnologies/helium-positioning-api\n[pre-commit]: https://github.com/pre-commit/pre-commit\n[black]: https://github.com/psf/black\n\n## Features\n\nPrediction of the location of devices belonging to an organization in the [Helium Console](https://console.helium.com/). \nSeveral different methods and models are available.\n\n## Installation\n\n### Developer install\n\nThe following allows a user to create a developer install of the positioning api.\n\n```console\npip install -r requirements.txt\npoetry install\npoetry shell\npip install git+https://github.com/emergotechnologies/helium-api-wrapper\n```\n\n## Prerequisites\n\nBefore use, ensure that there is an `.env` file in the root directory of the repository where the `API_KEY` variable is entered (see `.env.sample`). You can generate and copy the `API_KEY` at https://console.helium.com/profile.\n\n## Usage\n\nThe service allows usage via **command line interface** or locally hosted **REST interface**.\n\n### CLI\n\n**Get Device Position**\n\n```\npython -m helium_positioning_api predict --uuid 92f23793-6647-40aa-b255-fa1d4baec75d\n```\n\nCurrently defaults to the \"nearest_neighbor\" model.\n\n**Advanced Requests**\n\nThe location prediction command is\n\n```\npython -m helium_positioning_api predict --uuid 'your uuid' --model 'your model selection'\n```\n\nSee the table below for a list of currently available models.\n\n| **model**       | **position estimation explanation**                                   |\n| ----------------- | ------------------------------------------------------------------- |\n| nearest_neighbor  | location of hotspot with the best signal                            |\n| midpoint          | point of equal distance from the two hotspots with the best signals |\n| linear_regression | trilateration with an linear regression distance estimator          |\n| gradient_boosting | trilateration with a gradient boosted regression distance estimator |\n\n### REST-API\n\n1. Start local REST-API (default)\n   ```\n   python -m helium_positioning_api serve\n   ```\n2. Open Browser and navigate to `127.0.0.1:8000/docs`\n3. Click on `predict_tf` path to drop down the endpoint details\n4. Click on the `Try it out` button.\n5. Fill in the `uuid` of your device and click on the button `Execute` to get an estimation using the `nearest_neighbor` model\n6. You can see the location prediction response in the `Responses` section below.\n\nThe mapping of available models to paths can be seen in the table below.\n\n| **model**         | **path**                                                            |\n| ----------------- | ------------------------------------------------------------------- |\n| nearest_neighbor  | predict_tf                                                          |\n| midpoint          | predict_mp                                                          |\n| linear_regression | predict_tl_lin                                                      |\n| gradient_boosting | predict_tl_grad                                                     |\n\n## Contributing\n\nContributions are very welcome.\nTo learn more, see the [Contributor Guide].\n\n## License\n\nDistributed under the terms of the [MIT license][license],\n_Helium Positioning API_ is free and open source software.\n\n## Issues\n\nIf you encounter any problems,\nplease [file an issue] along with a detailed description.\n\n## Credits\n\nThis project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.\n\n[@cjolowicz]: https://github.com/cjolowicz\n[pypi]: https://pypi.org/\n[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python\n[file an issue]: https://github.com/emergotechnologies/helium-positioning-api/issues\n[pip]: https://pip.pypa.io/\n\n<!-- github-only -->\n\n[license]: https://github.com/emergotechnologies/helium-positioning-api/blob/main/LICENSE\n[contributor guide]: https://github.com/emergotechnologies/helium-positioning-api/blob/main/CONTRIBUTING.md\n[command-line reference]: https://helium-positioning-api.readthedocs.io/en/latest/usage.html\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Helium Positioning API",
    "version": "0.0.2.dev1675767695",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0c282670c9ad2cb60cdf31225f534187a0889f65e955987dd765af9e77ee3453",
                "md5": "99caeb71cf405d3dbacab1b8445b0c3f",
                "sha256": "a64706b5280016e8ffaa0d9bd1c0adfdf56ba0f0f0929a08adfea52a08cd8e4d"
            },
            "downloads": -1,
            "filename": "helium_positioning_api-0.0.2.dev1675767695-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "99caeb71cf405d3dbacab1b8445b0c3f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 13676,
            "upload_time": "2023-02-07T11:01:38",
            "upload_time_iso_8601": "2023-02-07T11:01:38.880614Z",
            "url": "https://files.pythonhosted.org/packages/0c/28/2670c9ad2cb60cdf31225f534187a0889f65e955987dd765af9e77ee3453/helium_positioning_api-0.0.2.dev1675767695-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e09aa95e4c27f8fb0a661ee86ab3a1d6f9777d520fdce8eea4c8720c8925525c",
                "md5": "485882ad442246ef0b289ecb3a12d045",
                "sha256": "afc4705a6bf8a078af1f708ca789d8bd52700ab9dfb1e761749d25ce5c5f4d79"
            },
            "downloads": -1,
            "filename": "helium_positioning_api-0.0.2.dev1675767695.tar.gz",
            "has_sig": false,
            "md5_digest": "485882ad442246ef0b289ecb3a12d045",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 13174,
            "upload_time": "2023-02-07T11:01:40",
            "upload_time_iso_8601": "2023-02-07T11:01:40.018642Z",
            "url": "https://files.pythonhosted.org/packages/e0/9a/a95e4c27f8fb0a661ee86ab3a1d6f9777d520fdce8eea4c8720c8925525c/helium_positioning_api-0.0.2.dev1675767695.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-07 11:01:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "emergotechnologies",
    "github_project": "helium-positioning-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "helium-positioning-api"
}
        
Elapsed time: 0.05013s