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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: snsary-0.1.1.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for snsary-0.1.1.tar.gz
Algorithm Hash digest
SHA256 282844b7bd05d5b30d66314dd1a29e584b594aaed288bb5da73ef3ac0eca077f
MD5 b64d782f31914ddb48f1875b1b9c6bdf
BLAKE2b-256 029571f135ac20d55052a8d96ce12cdd28a8fd0612905564e4ead25d3dcd96a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: snsary-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 43.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for snsary-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 67a801129e42f4ebedcd67765278bac7e83ff45effc36581dad3fbc3f02c641a
MD5 03fe750a18cf227cc685d581a4bd93f6
BLAKE2b-256 97331fb0093b7c0b8d25d7a5069080dbcd2c8dcf95321c860220b4e10bf12fc1

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