{"id":20763051,"url":"https://github.com/deep-1704/todo-api-python","last_synced_at":"2026-04-08T18:01:41.561Z","repository":{"id":229130545,"uuid":"775836972","full_name":"deep-1704/Todo-Api-python","owner":"deep-1704","description":"CRUD api to manage todo's","archived":false,"fork":false,"pushed_at":"2024-04-05T17:50:52.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T16:06:20.824Z","etag":null,"topics":["fastapi","jwt-authentication","mysql","python"],"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/deep-1704.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":"2024-03-22T06:22:26.000Z","updated_at":"2024-03-22T20:40:15.000Z","dependencies_parsed_at":"2024-04-05T18:51:55.304Z","dependency_job_id":null,"html_url":"https://github.com/deep-1704/Todo-Api-python","commit_stats":null,"previous_names":["deep-1704/todo-api-python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deep-1704/Todo-Api-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-1704%2FTodo-Api-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-1704%2FTodo-Api-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-1704%2FTodo-Api-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-1704%2FTodo-Api-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deep-1704","download_url":"https://codeload.github.com/deep-1704/Todo-Api-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep-1704%2FTodo-Api-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["fastapi","jwt-authentication","mysql","python"],"created_at":"2024-11-17T10:42:20.859Z","updated_at":"2026-04-08T18:01:41.534Z","avatar_url":"https://github.com/deep-1704.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Todo API\n\n* This application features a todo API which makes it easy to create and manage daily tasks.\n\n## Features\n\n- Register/login\n- Create, read, update, and delete tasks\n\n## Authors\n\n- [@deep-1704](https://github.com/deep-1704)\n\n## Tech Stack\n\n**Server:** Fast-Api\n\n**Database:** MySql\n\n**Authentication:** JWT\n\n## Environment Variables\n\nTo run this project, you will need to add the following environment variables to your .env file\n\n`DB_HOST` -- Database host (= localhost)\n\n`DB_DATABASE` -- Name of the database\n\n`DB_USERNAME` -- Username\n\n`DB_PASSWORD` -- Password\n\n`JWT_SECRET` -- Secret key for JWT algorithm (You can add any random string)\n\n## Run Locally\n\n#### Before you start:\n\n- Make sure to have Python and MySql-DB preinstalled in your system.\n\n#### Steps:\n\nClone the project\n\n```bash\n  git clone https://github.com/deep-1704/Todo-Api-python.git\n```\n\nGo to the project directory\n\n```bash\n  cd Todo-Api-python\n```\n\nInstall dependencies\n\n```bash\n  pip install -r requirements.txt\n```\n\n- Please ensure the `.env` file in root folder\n\nDatabase setup:\n\n- In order to setup database tables, execute `script.sql` file present in `/SQL` directory.\n- (Optional) Execute `sample_data.sql` file to populate sample data.\n\nRun app\n\n```bash\n  uvicorn main:app --reload\n```\n\nAPI is now up and running on port 8000.\n\n## API Reference\n\n#### 1. Register new user\n\n```http\n  POST /api/auth/register\n```\n\n**Request:**\n\nBody: {username, password}\n\n**Response:**\n\nIf user already exists -- `400_BAD_REQUEST` {\"message\": \"User already exists\"}\n\nFor new user -- `201_CREATED`{\"token\": JWT-token}\n\n#### 2. User login\n\n```http\n  POST /api/auth/login\n```\n\n**Request:**\n\nBody: {username, password}\n\n**Response:**\n\nIf user not found -- `404_NOT_FOUND` {\"message\": \"User not found\"}\n\nIf incorrect password -- `401_UNAUTHORIZED`{\"message\": \"Invalid password\"}\n\nSuccessful login -- `201_CREATED`{\"token\": JWT-token}\n\n#### 3. Get all tasks\n\n```http\n  GET /api/task\n```\n\n**Request:**\n\nHeader: {Authorization: \"Bearer [JWT-token]\"}\n\n**Response:**\n\n`200_OK` [array of tasks]\n\n#### 4. Get task by id\n\n```http\n  GET /api/task/{task_id}\n```\n\n**Request:**\n\nHeader: {Authorization: \"Bearer [JWT-token]\"}\n\n**Response:**\n\n`200_OK` {id, username, description, status}\n\n#### 5. Create new task\n\n```http\n  POST /api/task\n```\n\n**Request:**\n\nHeader: {Authorization: \"Bearer [JWT-token]\"}\n\nBody: {id: null, username, description, status}\n\n**Response:**\n\n`201_CREATED` {\"message\": \"Task created\"}\n\n#### 6. Update task description\n\n```http\n  PUT /api/task/update_description/{task_id}\n```\n\n**Request:**\n\nHeader: {Authorization: \"Bearer [JWT-token]\"}\n\nBody: {id, username, description, status}\n\n**Response:**\n\n`200_OK` {\"message\": \"Task description updated\"}\n\n#### 7. Update task status\n\n```http\n  PUT /api/task/update_status/{task_id}\n```\n\n**Request:**\n\nHeader: {Authorization: \"Bearer [JWT-token]\"}\n\nBody: {id, username, description, status}\n\n**Response:**\n\n`200_OK` {\"message\": \"Task status updated\"}\n\n#### 8. Delete task\n\n```http\n  DELETE /api/task/{task_id}\n```\n\n**Request:**\n\nHeader: {Authorization: \"Bearer [JWT-token]\"}\n\n**Response:**\n\n`200_OK` {\"message\": \"Task deleted\"}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep-1704%2Ftodo-api-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeep-1704%2Ftodo-api-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep-1704%2Ftodo-api-python/lists"}