{"id":19525705,"url":"https://github.com/aavision/api-tasks-flask","last_synced_at":"2026-05-13T18:40:24.908Z","repository":{"id":185289814,"uuid":"673141497","full_name":"AAVision/api-tasks-flask","owner":"AAVision","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-01T08:52:45.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T01:43:56.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AAVision.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}},"created_at":"2023-08-01T01:10:32.000Z","updated_at":"2023-08-01T09:03:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e45e422-37c9-4f78-89d5-27016a8a9581","html_url":"https://github.com/AAVision/api-tasks-flask","commit_stats":null,"previous_names":["aavision/api-tasks-flask"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AAVision/api-tasks-flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAVision%2Fapi-tasks-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAVision%2Fapi-tasks-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAVision%2Fapi-tasks-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAVision%2Fapi-tasks-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AAVision","download_url":"https://codeload.github.com/AAVision/api-tasks-flask/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AAVision%2Fapi-tasks-flask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32995915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"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":[],"created_at":"2024-11-11T01:06:37.058Z","updated_at":"2026-05-13T18:40:24.885Z","avatar_url":"https://github.com/AAVision.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# api-tasks-flask\n\n## Introduction\nThis project is a simple CRUD task API implemented using Flask, SQL Alchemy, and PostgreSQL.\n\n## Database\nIt consists of 2 tables: `tasks` and `priority` where in `priority` we have 3 types `High-Medium-Low` and there is a relation between the task and its priority.\n\n## Installation\n\n1. Clone the repository to your local machine:\n    ```bash\n    git clone https://github.com/AAVision/api-tasks-flask.git\n    ```\n2. Install all the dependencies from `requirements.txt` file:\n    ```bash\n    pip install -r requirements.txt\n    ```\n3. Create your database in `pgadmin` and edit the configuration of `SQLALCHEMY_DATABASE_URI` in `app.py` file.\n4. Run the migrations commands:\n    ```bash\n    flask db init \n    flask db migrate\n    flask db upgrade\n    ```\n5. Run the application locally using:\n    ```bash\n    flask run\n    ```\n    and head to localhost:5000\n\n## Endpoints\n1. GET /tasks:\n   ```bash\n    GET localhost:5000/tasks\n    {\n        \"count\": 2, \u003c-- for pagination\n        \"tasks\": [\n            {\n                \"completed\": true,\n                \"description\": \"Implement DB\",\n                \"id\": 5,\n                \"priority\": \"Medium\",\n                \"title\": \"database\"\n            },\n            {\n                \"completed\": true,\n                \"description\": \"Exam\",\n                \"id\": 3,\n                \"priority\": \"High\",\n                \"title\": \"test 1\"\n            }\n        ]\n    }\n   ```\n2. POST /tasks:\n   ```bash\n    POST localhost:5000/tasks JSON \n    {\n        \"title\":\"Code\",\n        \"description\":\"Add code\",\n        \"completed\":0,\n        \"priority_id\":2\n    }\n\n    --\u003e\n\n    {\n        \"message\": \"task Code was added successfully.\"\n    }\n   ```\n3. GET /tasks/{task_id}:\n   ```bash\n    GET localhost:5000/tasks/3\n    {\n        \"completed\": true,\n        \"description\": \"Exam\",\n        \"id\": 3,\n        \"priority\": \"High\",\n        \"title\": \"test 1\"\n    }\n   ```\n4. PUT /tasks/{task_id}:\n    ```bash\n    PUT localhost:5000/tasks/3 JSON \n    {\n        \"title\":\"New Code\",\n        \"description\":\"New code update\",\n        \"completed\":1,\n        \"priority_id\":2\n    }\n\n    --\u003e\n\n    {\n        \"message\": \"task New Code was updated successfully.\"\n    }\n   ```\n5. DELETE /tasks/{task_id}:\n    ```bash\n    DELETE localhost:5000/tasks/3\n    {\n        \"message\": \"task New Code was deleted successfully.\"\n    }\n   ```\n6. GET /priorities:\n    ```bash\n    [\n        {\n            \"id\": 1,\n            \"name\": \"High\"\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Medium\"\n        },\n        {\n            \"id\": 3,\n            \"name\": \"Low\"\n        }\n    ]\n   ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faavision%2Fapi-tasks-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faavision%2Fapi-tasks-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faavision%2Fapi-tasks-flask/lists"}