Python library for interacting with the Neevo API
Project description
PyNeeVo
An unofficial asynchronous Python library for interacting with the Nee-Vo tank monitoring platform API.
PyNeeVo allows Python applications to authenticate with Nee-Vo and retrieve propane tank information and readings from connected devices.
Features
- Asynchronous API built with
aiohttp - Username and password authentication
- Retrieve all available tank information
- Refresh tank data from the Nee-Vo platform
Installation
pip install pyneevo
Quick Start
from pyneevo import NeeVoApiInterface
from pyneevo.errors import (
GenericHTTPError,
InvalidCredentialsError,
InvalidResponseFormat,
)
email = "user@example.com"
password = "your-password"
async def main():
# Login
try:
api = await NeeVoApiInterface.login(
email,
password=password,
)
except InvalidCredentialsError:
print("Invalid credentials")
return
# Retrieve tank information
try:
tanks = await api.get_tanks_info()
except (GenericHTTPError, InvalidResponseFormat) as err:
print(f"Failed to retrieve tank information: {err}")
return
# Display tank data
for tank in tanks:
print(
f"ID: {tank.id} "
f"Name: {tank.name} "
f"Level: {tank.level}%"
)
if __name__ == "__main__":
import asyncio
asyncio.run(main())
Refreshing Tank Data
Refreshing indevidual devices is not yet implemented. As a result, refreshing data updates all devices associated with the account.
await api.refresh_tanks()
tanks = await api.get_tanks_info()
for tank in tanks:
print(
f"ID: {tank.id} "
f"Name: {tank.name} "
f"Level: {tank.level}%"
)
Available Methods
Authentication
api = await NeeVoApiInterface.login(
email,
password=password,
)
Authenticates with the Nee-Vo platform and returns an authenticated API interface instance.
Get Tank Information
tanks = await api.get_tanks_info()
Returns a list of all tanks associated with the authenticated account.
Refresh Tank Data
await api.refresh_tanks()
Requests that Nee-Vo refresh all tank readings associated with the account.
Error Handling
PyNeeVo exposes several exceptions that can be used for handling API and authentication failures.
from pyneevo.errors import (
GenericHTTPError,
InvalidCredentialsError,
InvalidResponseFormat,
PyNeeVoError,
)
try:
tanks = await api.get_tanks_info()
except InvalidCredentialsError:
print("Invalid credentials")
except InvalidResponseFormat:
print("Unexpected response from Nee-Vo")
except GenericHTTPError:
print("HTTP error communicating with Nee-Vo")
except PyNeeVoError:
print("General PyNeeVo error")
Current API Coverage
PyNeeVo currently implements support for the Nee-Vo GetAllDisplayPropaneDevices endpoint.
Additional endpoints may be added in future releases.
If there is a endpoint you need please create an issue. Pull Requests are also welcome.
Intended Audience
PyNeeVo is intended for Python developers who want to integrate Nee-Vo tank data into:
- Home automation platforms
- Monitoring dashboards
- Notification systems
- Reporting tools
- Custom integrations
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyneevo-1.0.7.tar.gz.
File metadata
- Download URL: pyneevo-1.0.7.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8304ed79bc0790285765a7b2f37531fa58ddfaf3b158a39f55b8e377a29d6d09
|
|
| MD5 |
080e7c779c924ee706c7e1e4dfce6e3b
|
|
| BLAKE2b-256 |
d86c39befdcd22edd9c5fb3bc022bac377c1d301a8243f10b142707d6f4a342f
|
File details
Details for the file pyneevo-1.0.7-py3-none-any.whl.
File metadata
- Download URL: pyneevo-1.0.7-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a54b630c0ea1a1f6c74aec1934ee2195e6ff42cc2bc73aabff55a584097340f4
|
|
| MD5 |
e04f3803d37d3c4a71bcdc922453bdf5
|
|
| BLAKE2b-256 |
bddc087b8f44e097d89c128f397f4920497212b698cde1189d54ed258b8599cd
|