{"id":20485732,"url":"https://github.com/alpha74/airvd","last_synced_at":"2026-04-10T12:05:27.175Z","repository":{"id":102838057,"uuid":"293130754","full_name":"alpha74/airvd","owner":"alpha74","description":"REST APIs for CRUD operations created using Django and Django REST Framework, for IoT devices.","archived":false,"fork":false,"pushed_at":"2020-09-07T19:09:00.000Z","size":92,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T22:03:42.368Z","etag":null,"topics":["django","django-application","django-project","django-rest-framework","iot","iot-api","json","mvc","rest-api","restful-api","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alpha74.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-05T18:16:42.000Z","updated_at":"2020-09-07T19:09:02.000Z","dependencies_parsed_at":"2023-03-13T15:14:27.330Z","dependency_job_id":null,"html_url":"https://github.com/alpha74/airvd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alpha74/airvd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2Fairvd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2Fairvd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2Fairvd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2Fairvd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alpha74","download_url":"https://codeload.github.com/alpha74/airvd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alpha74%2Fairvd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31641493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["django","django-application","django-project","django-rest-framework","iot","iot-api","json","mvc","rest-api","restful-api","sqlite"],"created_at":"2024-11-15T16:33:04.818Z","updated_at":"2026-04-10T12:05:27.154Z","avatar_url":"https://github.com/alpha74.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airvd\n### Basic CRUD REST demo using Django REST Framework.\n\n\n### Used:\n- Python\n    - Django + SQLite\n    - Django REST Framework\n\n-----\n\n### Run:\n- Create `virtualenv` using `requirements.txt`\n- Run `python manage.py runserver` in commandline. \n- By default, server runs on port `5000`.\n\n-----\n\n### Models/Classes:\n\n#### Device\n- An IoT device with properties:\n    - `uid` : unique id of device\n    - `name` : name of device\n\n- A device measures humidity and temperature:\n    - `HumidityReading` : one-to-many\n    - `TemperatureReading` : one-to-many\n    \n#### HumidityReading\n- `device` : owner device\n- `humidity` : reading\n- `timestamp` : timestamp when reading was stored in db\n\n\n#### TemperatureReading\n- `device` : owner device\n- `temperature` : reading\n- `timestamp` : timestamp when reading was stored in db\n\n-----\n\n\n### APIs\n\n#### API to create a device\n- Endpoint: `POST /api/devices/`\n- Content-Type: `application/json`\n- Request Payload\n    - `uid`\n    - `name`\n\n\n#### API to delete a device\n- Endpoint: `DELETE /api/devices/{device-uid}`\n    - `device-uid` : uid of device to be deleted\n    \n\n#### API to retrieve a device\n- Endpoint: `GET /api/devices/{device-uid}`\n    - `device-uid` : uid of device\n    \n    \n#### API to list all devices\n- Endpoint: `GET /api/devices/`\n- Response: `json`\n\n\n#### API to return readings for a device in given period\n- Endpoint: `GET /api/devices/{device-uid}/readings/{parameter}/?start_on=yyyy-mmddTHH:MM:SS\u0026end_on=yyyy-mm-ddTHH:MM:SS`\n    - `device-uid` : uid of device\n    - `parameter` : **temperature** or **humidity**\n    - `start_on` and `end_on` :  query parameters which are compulsary and should be used to filter the result to only include data between `start_on` and `end_on`.\n        - `yyyy-mm-ddTHH:MM:SS` : year-monthdateThour:minute:second\n        \n- Response: `json`\n\n-----\n\n#### To Improve\nApp can be improved on following:\n- Payload cleaning.\n- Date range matching using timezones.\n\n\n#### Commit History Graph\n[Commit History Graph](https://github.com/alpha74/airvd/blob/master/FORREADME/img/commit_history.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha74%2Fairvd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falpha74%2Fairvd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falpha74%2Fairvd/lists"}