{"id":24714230,"url":"https://github.com/vinklat/laporte","last_synced_at":"2025-10-09T12:31:32.453Z","repository":{"id":62575104,"uuid":"155746567","full_name":"vinklat/laporte","owner":"vinklat","description":"Push gateway for processing metrics with automation and states. Compatible with Prometheus.","archived":false,"fork":false,"pushed_at":"2022-01-09T23:25:45.000Z","size":511,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T15:03:58.001Z","etag":null,"topics":["prometheus","python","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinklat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-01T16:50:19.000Z","updated_at":"2024-06-20T10:23:43.000Z","dependencies_parsed_at":"2022-11-03T18:37:04.046Z","dependency_job_id":null,"html_url":"https://github.com/vinklat/laporte","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinklat%2Flaporte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinklat%2Flaporte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinklat%2Flaporte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinklat%2Flaporte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinklat","download_url":"https://codeload.github.com/vinklat/laporte/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235820062,"owners_count":19050101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prometheus","python","rest-api"],"created_at":"2025-01-27T08:16:04.794Z","updated_at":"2025-10-09T12:31:27.006Z","avatar_url":"https://github.com/vinklat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laporte\n\n- a gateway for processing metrics with automation and states\n- acceptor for sensors, batch jobs or messages\n- with the ability to set actuators\n- compatible with Prometheus for metric alerting, collecting and data visualization\n \n## Schema:\n\n![laporte schema](doc/laporte_schema.svg)\n\n## Features:\n\n - can evaluate, recalculate or correct metric\n - calculate new metric or state from other metrics\n - automation using a true algorithmization + data structures (python expression code)\n - can set TTL for metrics (obsolete metric disappears when time is over)\n - communicates via:\n    * RESTful API \n    * realtime, bidirectionally using Socket.IO\n    * exporting data as Prometheus metrics\n    * live www status page\n - optional bridges (extensions):\n    * [laporte-mqtt](https://github.com/vinklat/laporte-mqtt) to connect a large family of devices using MQTT protocol\n    * [laporte-journal](https://github.com/vinklat/laporte-journal) to store all events into other database\n\n## Installation:\nTo install Laporte from PyPI:\n\n`pip install laporte`\n\nOr using container image from Docker Hub:\n\n`docker pull vinklat/laporte`\n\n\n## Quick HOWTO:\n### Example: push gateway for weather sensor\n\n - manually simulate a weather sensor and send temperature and relative humidity data to this gateway using REST API\n - in this example the temperature will be corrected (slope +1% and shift + 0.5). Can be used in case of calibrate sensor, unit conversion, ...\n - other two new metrics will be calculated (dew point temperature and absolute humidity)\n - in the case of an inactive sensor, the data expires in 10 minutes\n\n#### a) run the docker image\n\n`docker run -p 9128:9128 vinklat/laporte -c conf/example_weatherstation.yml`\n\n(the content of this built-in config file can be seen here: [example_weatherstation.yml](conf/example_weatherstation.yml))\n\n#### b) send metrics from sensor via REST API\n\nTry sending data several times using curl:\n\n`curl http://localhost:9128/api/metrics/weather1 -d temp_celsius=37.5 -d hum_ratio=0.8 -X PUT`\n\n#### c) watch status\n - Laporte status page: [http://localhost:9128](http://localhost:9128)\n - JSON response of REST API: [http://localhost:9128/api/metrics/by_node](http://localhost:9128/api/metrics/by_node)\n - Prometheus metrics: [http://localhost:9128/prom](http://localhost:9128/status/metrics)\n\n...more info on the [wiki](https://github.com/vinklat/laporte/wiki)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinklat%2Flaporte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinklat%2Flaporte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinklat%2Flaporte/lists"}