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.2.tar.gz (7.1 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.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyomnisense-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6d494f07b03aae532e142fe1c6a9c0c5d51b6ccde8f6f932d6a15198fc529821
MD5 b422afc4e71a7e64cb24a71942f38eed
BLAKE2b-256 d663ead7a41ec8b9e27cfb363f688510357c5898083d6c6f9553b5f64c1ec70f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyomnisense-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 460d35d3761995f0ac0a7e9b50c5e64c6484deab15427224a3e5ecc95327a077
MD5 766f1fef89af65a8f3473df2aa26a3f4
BLAKE2b-256 7b8fa79142540c10e07f31517f728ffe02a8ed23c813ae4064eca5fbc1b4e0ec

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