Skip to main content

A framework for sensor metrics

Project description

Snsary

A framework for sensor metrics.

Installation

pip3 install snsary

Getting started

Create a new file called example.py and paste:

from snsary import system
from snsary.outputs import MockOutput
from snsary.sources import MockSensor
from snsary.utils import logging

MockSensor().subscribe(MockOutput())
logging.configure_logging()
system.start_and_wait()

This is a minimal Snsary program. To run it:

python3 example.py

At this point you should see some INFO logs e.g.

2021-11-13 19:07:17,144 - INFO - [mocksensor-4382645216] Collected 1 readings.
2021-11-13 19:07:17,144 - INFO - [mockoutput-4383959840] Reading: <zero 1636830437 0>

Use Ctrl+C to quit the program.

Building an app

Snsary makes it easy to build large sensing apps:

docs/examples/contrib.py shows many of them working together.

How to deploy it

See the tutorial for how to setup and run a Snsary app as a service on a Raspberry Pi.

Contributing

See CONTRIBUTING.md.

Licence

See LICENCE.

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

snsary-0.1.1.tar.gz (29.5 kB view hashes)

Uploaded Source

Built Distribution

snsary-0.1.1-py3-none-any.whl (43.3 kB view hashes)

Uploaded Python 3

Supported by

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