{"id":13829233,"url":"https://github.com/marcosvbras/todo-list-python","last_synced_at":"2025-07-31T23:31:06.222Z","repository":{"id":50206952,"uuid":"129513558","full_name":"marcosvbras/todo-list-python","owner":"marcosvbras","description":"A simple To Do List with Python and Flask Framework","archived":false,"fork":false,"pushed_at":"2022-12-08T01:03:42.000Z","size":168,"stargazers_count":14,"open_issues_count":6,"forks_count":116,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-20T11:17:01.185Z","etag":null,"topics":["flask","flask-api","heroku","pipenv","pytest","python","rest-api","tdd","travis-ci","web"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcosvbras.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-04-14T12:09:09.000Z","updated_at":"2024-11-19T12:15:06.000Z","dependencies_parsed_at":"2023-01-24T02:05:16.596Z","dependency_job_id":null,"html_url":"https://github.com/marcosvbras/todo-list-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvbras%2Ftodo-list-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvbras%2Ftodo-list-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvbras%2Ftodo-list-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosvbras%2Ftodo-list-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcosvbras","download_url":"https://codeload.github.com/marcosvbras/todo-list-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228312168,"owners_count":17900218,"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":["flask","flask-api","heroku","pipenv","pytest","python","rest-api","tdd","travis-ci","web"],"created_at":"2024-08-04T10:00:28.962Z","updated_at":"2024-12-05T14:11:24.919Z","avatar_url":"https://github.com/marcosvbras.png","language":"Python","readme":"# TODO List in Python\n\n[![Build Status](https://travis-ci.org/marcosvbras/todo-list-python.svg?branch=master)](https://travis-ci.org/marcosvbras/todo-list-python)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.github.com/marcosvbras/todo-list-python/master/images/to-do-list.jpg\" alt=\"Custom image\"/\u003e\n\u003c/p\u003e\n\n## What is this?\n\n**TO DO List** is a simple API project created with everything that I learned on course [Do Zero ao Deploy](https://github.com/cassiobotaro/do_zero_ao_deploy) by [Cássio Botaro](https://github.com/cassiobotaro/).\n\nThis project covers the following concepts:\n- Python environments with [Pipenv](https://github.com/pypa/pipenv)\n- Test Driven Development with [PyTest](https://docs.pytest.org/en/latest/)\n- Starting with [Flask](http://flask.pocoo.org/) framework\n- Continuous Integration with [Travis](https://travis-ci.org/)\n- Continuous Deployment with [Heroku](https://www.heroku.com/)\n\nStarting from what has been taught, I improved the API with **MongoDB** persistence.\n\n## Environment\n### API\nAll code was written with **Python 3.6**, so, for a correct running, it is recommended to install this one.\n\nAfter Python installed, it is required to install all dependencies. You can use [Pipenv](https://github.com/pypa/pipenv) or [Virtualenv](https://virtualenv.pypa.io/en/stable/). If you are using **Pipenv**, use the following command to install from **Pipfile**:\n\n```bash\n$ pipenv install\n```\n\n...and active the environment:\n```bash\n$ pipenv shell\n```\n\nHowever, if you are using **Virtualenv**, you need to activate the environment and install from **requirements.pip** file:\n\n```bash\n$ source YOUR_ENVIRONMENT_DIRECTORY/bin/activate\n$ pip install -r requirements.pip\n```\n\n### Database\nInstall [MongoDB](https://www.mongodb.com/) in your machine and be sure **MongoDB** process is running.\n\n## How to run\n\n```bash\n$ python todo.py\n* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n```\n\nAPI Endpoints:\n- `GET /tasks`: Return all tasks available\n- `POST /tasks`: Create a new task\n\n## Testing (Optional)\n\nYou can test the application using the development dependencies.\n\nInstall all development dependencies from **Pipfile**:\n```bash\n$ pipenv install --dev\n```\n\nOr from **dev-requirements.pip** file if you are using **VirtualEnv**:\n```bash\n$ pip install -r dev-requirements.pip\n```\n\nTo debug endpoints, you can use [HTTPie](https://httpie.org/) as following:\n```bash\n$ http http://127.0.0.1:5000/tasks\n[\n  {\n    \"_id\": {\n      \"$oid\": \"5ad3d924e3bdea6ccf9d9d3e\"\n    },\n    \"description\": \"The Best Description\",\n    \"done\": false,\n    \"title\": \"The Best Title\"\n  },\n  {\n    \"_id\": {\n      \"$oid\": \"5ad3d8fae3bdea6c41d571f4\"\n    },\n    \"description\": \"The Incredible Description\",\n    \"done\": false,\n    \"title\": \"The Incredible Title\"\n  }\n]\n```\n\n```bash\n$ http POST http://127.0.0.1:5000/tasks title=Test description=Test\nHTTP/1.0 201 CREATED\nContent-Length: 123\nContent-Type: application/json\nDate: Mon, 16 Apr 2018 00:23:45 GMT\nServer: Werkzeug/0.14.1 Python/3.6.2\n\n{\n  \"_id\": {\n    \"$oid\": \"5ad3ed11e3bdea06aa7afa06\"\n  },\n  \"description\": \"Test\",\n  \"done\": false,\n  \"title\": \"Test\"\n}\n```\n\nTo run the tests, you can use [PyTest](https://docs.pytest.org/en/latest/) as following:\n```bash\n$ python -m pytest\n...\ncollected 7 items\n\ntest_todo.py .......                                                    [100%]\n========================== 7 passed in 1.32 seconds ==========================\n```\n","funding_links":[],"categories":["Available Apps"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosvbras%2Ftodo-list-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcosvbras%2Ftodo-list-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosvbras%2Ftodo-list-python/lists"}