{"id":38283228,"url":"https://github.com/zmoooooritz/stapy","last_synced_at":"2026-01-17T02:00:55.023Z","repository":{"id":43155813,"uuid":"397929916","full_name":"zMoooooritz/stapy","owner":"zMoooooritz","description":"An easy to use SensorThings API Client written in Python","archived":false,"fork":false,"pushed_at":"2023-11-30T18:21:50.000Z","size":151,"stargazers_count":6,"open_issues_count":7,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T23:39:41.983Z","etag":null,"topics":["api","cli","data-science","database","ogc","python","sensor","sensor-data","sensorthings","sensorthings-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/zMoooooritz.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-08-19T12:07:55.000Z","updated_at":"2025-02-06T09:27:54.000Z","dependencies_parsed_at":"2023-12-17T08:09:35.064Z","dependency_job_id":"d1fb7007-9249-49fb-9cc4-a23c1b5db810","html_url":"https://github.com/zMoooooritz/stapy","commit_stats":{"total_commits":96,"total_committers":3,"mean_commits":32.0,"dds":"0.20833333333333337","last_synced_commit":"b284d401f96dac676fac9ab4dbd1b33dc7a986d2"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/zMoooooritz/stapy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zMoooooritz%2Fstapy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zMoooooritz%2Fstapy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zMoooooritz%2Fstapy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zMoooooritz%2Fstapy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zMoooooritz","download_url":"https://codeload.github.com/zMoooooritz/stapy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zMoooooritz%2Fstapy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28492047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"online","status_checked_at":"2026-01-17T02:00:07.808Z","response_time":85,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","cli","data-science","database","ogc","python","sensor","sensor-data","sensorthings","sensorthings-api"],"created_at":"2026-01-17T02:00:32.521Z","updated_at":"2026-01-17T02:00:54.962Z","avatar_url":"https://github.com/zMoooooritz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stapy\n[![Latest Release](https://img.shields.io/github/release/zMoooooritz/stapy.svg)](https://github.com/zMoooooritz/stapy/releases)\n[![Build Status](https://github.com/zMoooooritz/stapy/workflows/build/badge.svg)](https://github.com/zMoooooritz/stapy/actions)\n[![Python Version](https://img.shields.io/pypi/pyversions/stapy.svg)](https://pypi.org/project/stapy/)\n[![Codecov](https://codecov.io/gh/zMoooooritz/stapy/branch/master/graph/badge.svg?token=04D52OK2H4)](https://codecov.io/github/zMoooooritz/stapy?branch=master)\n\nThis is an easy to use SensorThings API Client written in Python\n\n\u003e [!IMPORTANT]\n\u003e This project is no longer being actively maintained.\n\u003e Since the STA standard keeps evolving, the feature set of this client implementation will keep falling behind.\n\u003e However the project [Frost-Python-Client](https://github.com/FraunhoferIOSB/FROST-Python-Client) is actively maintained and provides a seemingly complete API.\n\nThe SensorThings API (STA) is an [OGC](https://www.osgeo.org/partners/ogc/) standard for IoT device sensing data.\\\nA server implementation of the STA can be found here [FROST](https://github.com/FraunhoferIOSB/FROST-Server).\\\nFor more (advanced) information about the SensorThings API see the official OGC [documentation](http://developers.sensorup.com/docs).\n\n## Installation\n\n`stapy` is compatible with Python 3.7+ and the recommended way to install is via [pip](https://pip.pypa.io/en/stable/)\n```bash\npip install stapy\n```\n\n## Usage\n\n`stapy` can be used both form the command line (in two different ways) and as a Python library.\n\n### STA_URL\n\nAt first it is necessary to set the URL of the STA.\nOptionally it is also possible to set credentials for a basic authentication.\nWithin the CLI this can be achieved as follows:\n```bash\nstapy -u {URL}\nstapy -c {USR} {PWD}\n```\n`stapy` can of course be also run as a Python module(`python -m stapy`)\n\\\n\\\nThe URL and credentials can also be set from within a Python script:\n```python\n\u003e\u003e\u003e import stapy\n\n\u003e\u003e\u003e stapy.set_sta_url({URL})\n\u003e\u003e\u003e stapy.set_credentials({USR}, {PWD})\n```\n\n### CLI - Interactive\n\nThe interactive mode is the easiest one to use but can **not** be used programmatically.\nTherefore it is probably a good starting point to get familiar with the STA.\nThe interactive mode can be invoked in the following way.\n```bash\nstapy -i\n```\nCurrently it does support `POST`, `PATCH` and `DELETE` requests.\n\n### CLI - Normal\n\nThe *normal* command line mode is a bit more difficult to use but can be automated.\n```bash\nstapy --help\n```\nShould give sufficient information on how two use it properly.\nAs the interactive mode it does support `POST`, `PATCH` and `DELETE` requests.\n\n### Library\n\nThis is the Python interface to the SensorThings API (stapy is meant to be used as Python library).\nTherefore it supports all requests (`POST`, `PATCH`, `DELETE` and `GET`).\n\nThe relevant classes can be found within the files `entity.py`, `delete.py`, `post.py`, `patch.py` and `query.py` in the [sta](https://github.com/zMoooooritz/stapy/tree/master/stapy/sta) sub-module.\n\nThe following syntax can be used to create new entities:\n```python\n\u003e\u003e\u003e from stapy import Post\n\n\u003e\u003e\u003e Post.observed_property(\"TestProp\", \"TestProp-Desc\", \"TestProp-Def\")\n```\nTo understand which arguments are available and mandatory it is advisable to have a look at the [STA-Docs](https://developers.sensorup.com/docs/) and/or use the interactive mode of stapy.\n\nFollowing is one example of a `GET` request:\n```python\n\u003e\u003e\u003e from stapy import Query, Entity\n\n\u003e\u003e\u003e results, times = Query(Entity.Observation).select(\"result\", \"phenomenonTime\").order(\"result\").get_data_sets()\n```\n`results` afterwards contains **all** results of the present Observations in ascending order.\\\n`times` contains the respective times for the results.\n\nstapy does support all `GET` query options that are available for the [STA](https://developers.sensorup.com/docs/#queryparameters).\nSome examples are select, filter, orderby and skip. These can be chained together as seen in the example above.\n\\\n\\\nFurther use-cases and applications can be found in the [examples](https://github.com/zMoooooritz/stapy/tree/master/examples).\n\n## Development\nTo build this project, run `python setup.py build`. To execute the unit tests, run `python setup.py test`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmoooooritz%2Fstapy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmoooooritz%2Fstapy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmoooooritz%2Fstapy/lists"}