Skip to main content

Python library for accessing Omnisense sensor data from omnisense.com

Project description

pyomnisense

pyomnisense is a Python library for accessing Omnisense sensor data directly from the omnisense.com website. It supports logging into the service, retrieving site lists, and fetching sensor data.

Features

  • Login to the Omnisense website
  • Retrieve a list of sites with sensor data
  • Fetch detailed sensor data for a selected site
  • Asynchronous methods using aiohttp

Install this repo

Clone the repository and install in editable mode:

git clone https://github.com/your_username/pyomnisense.git
cd pyomnisense
pip install -e .

Install from pypi.org

pip install pyomnisense

Usage

from pyomnisense import Omnisense

async def main():
    omnisense = Omnisense()
    # Login with your credentials
    await omnisense.login("your_username", "your_password")
    
    # Get list of sites
    sites = await omnisense.get_site_list()
    print("Available sites:", sites)

    sensor_data = await omnisense.get_sensor_data(sites)

    print("Sensor Data for Site:", sensor_data)
    
    # When done, close the session
    await omnisense.close()

import asyncio
asyncio.run(main())

Replace "your_username" and "your_password" with your actual Omnisense credentials. For more details, refer to the documentation or explore the source code.

Testing

Tests are written using pytest and pytest-asyncio. You can run tests as follows:

pytest

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

pyomnisense-0.1.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyomnisense-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pyomnisense-0.1.1.tar.gz.

File metadata

  • Download URL: pyomnisense-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pyomnisense-0.1.1.tar.gz
Algorithm Hash digest
SHA256 60eac424616b6a43363cf2bcfbd05c28ba06a42c0ff7c68216a44cc58ccaa095
MD5 ab06ca1a6a3d4f9c39d8be754ed9bf01
BLAKE2b-256 92e3bca075736bc9ee179148f0c6e70e0db7d06c175f7fc465509410fe888dce

See more details on using hashes here.

File details

Details for the file pyomnisense-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyomnisense-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for pyomnisense-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8221a742b4d09eee0ae11b6593758c4f3f44b1101c823468aefaca1181746a2d
MD5 2aad02ce9fddeeb05ae134557d0b75ea
BLAKE2b-256 74b7ad4e186e9fa4c154ade405309f0710d9ed6535f267f97b2bc11a6719a649

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page