{"id":22819946,"url":"https://github.com/devdhera/tdd-with-django-rest","last_synced_at":"2026-04-27T18:32:10.557Z","repository":{"id":101418253,"uuid":"226112524","full_name":"DevDHera/TDD-With-Django-REST","owner":"DevDHera","description":"Guide to REST API development with Django (The TDD Way 😎)","archived":false,"fork":false,"pushed_at":"2020-03-30T12:55:45.000Z","size":3348,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-19T00:02:08.074Z","etag":null,"topics":["django","rest-api","tdd"],"latest_commit_sha":null,"homepage":null,"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/DevDHera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-12-05T13:48:38.000Z","updated_at":"2020-03-30T12:55:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e92dd5b-bceb-43e4-ba57-3e40332820bc","html_url":"https://github.com/DevDHera/TDD-With-Django-REST","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DevDHera/TDD-With-Django-REST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FTDD-With-Django-REST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FTDD-With-Django-REST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FTDD-With-Django-REST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FTDD-With-Django-REST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DevDHera","download_url":"https://codeload.github.com/DevDHera/TDD-With-Django-REST/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DevDHera%2FTDD-With-Django-REST/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32349438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T17:12:42.749Z","status":"ssl_error","status_checked_at":"2026-04-27T17:12:41.658Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["django","rest-api","tdd"],"created_at":"2024-12-12T15:15:10.180Z","updated_at":"2026-04-27T18:32:10.541Z","avatar_url":"https://github.com/DevDHera.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status][build status badge]][build status link] [![Issue Status][issue status badge]][issue status link] [![License Status][license status badge]][license status link] [![Fork Status][fork status badge]][fork status link]\n\n\u003c!-- markdownlint-disable --\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\n[build status badge]: https://travis-ci.com/DevDHera/TDD-With-Django-REST.svg?branch=master\n[build status link]: https://travis-ci.com/github/DevDHera/TDD-With-Django-REST\n[issue status badge]: https://img.shields.io/github/issues/DevDHera/TDD-With-Django-REST\n[issue status link]: https://github.com/DevDHera/TDD-With-Django-REST/issues\n[license status badge]: https://img.shields.io/github/license/DevDHera/TDD-With-Django-REST\n[license status link]: https://github.com/DevDHera/TDD-With-Django-REST/blob/master/LICENSE\n[fork status badge]: https://img.shields.io/github/forks/DevDHera/TDD-With-Django-REST\n[fork status link]: https://github.com/DevDHera/TDD-With-Django-REST/network/members\n\n# TDD-With-Django-REST 😎\n\nThis project is a guide to REST API development with the help of [Django Rest Framework](https://www.django-rest-framework.org/).\n\nA [Test Driven Development ](https://hackernoon.com/introduction-to-test-driven-development-tdd-61a13bc92d92) approach is used to build out this project and API contains features such as,\n\n- Fully fledged Authentication mechanisam\n- Image Upload\n- CRUD and relations\n\nand much more.\n\n## Summary\n\n- [Getting Started](#getting-started)\n- [Runing the tests](#running-the-tests)\n- [Deployment](#deployment)\n- [Built With](#built-with)\n- [Contributing](#contributing)\n- [Authors](#authors)\n- [License](#license)\n- [Acknowledgments](#acknowledgments)\n\n## Getting Started\n\nGetting started with the `TDD-With-Django-REST` is easy.\n\n1. First clone the project.\n\n```sh\ngit clone https://github.com/DevDHera/TDD-With-Django-REST.git\n```\n\n2. Start your docker machine.\n\n3. Go to the root of your cloned project and build the docker image.\n\n```sh\ndocker-compose build\n```\n\n4. Do the neccessary migrations.\n\n```sh\ndocker-compose run --rm app sh -c \"python manage.py makemigrations\"\n```\n\n5. Run the app using `docker-compose`.\n\n```sh\ndocker-compose up\n```\n\n5. Now head over to our [issue board](https://github.com/DevDHera/TDD-With-Django-REST/issues) and help solving issues 👼.\n\n### Prerequisites\n\n`TDD-With-Django-REST` uses **[Docker](https://www.docker.com/)** to manage containers.\n\nIn order to successfully run the project install the following.\n\n- Docker\n\n### Configurations\n\nAfter installing the above you can provision services as you like using the `docker-compose.yml` file on the root of the project.\n\nFollowing is the structure that we are using.\n\n```yaml\nversion: '3'\n\nservices:\n  app:\n    restart: always\n    build:\n      context: .\n    ports:\n      - '8000:8000'\n    volumes:\n      - ./app:/app\n    command: \u003e\n      sh -c \"python manage.py wait_for_db \u0026\u0026\n         python manage.py migrate \u0026\u0026\n         python manage.py runserver 0.0.0.0:8000\"\n    environment:\n      - DB_HOST=db\n      - DB_NAME=app\n      - DB_USER=postgres\n      - DB_PASS=supersecretpassword\n    depends_on:\n      - db\n\n  db:\n    image: postgres:12-alpine\n    environment:\n      - POSTGRES_DB=app\n      - POSTGRES_USER=postgres\n      - POSTGRES_PASSWORD=supersecretpassword\n```\n\n## Running the tests\n\nAs the project uses a TDD approach test take a key role. Following describes how you can run the tests and lints.\n\n### Break down into tests\n\nEach app contains test folder that will is used to test each part of the API. You can run these tests by using the below script.\n\n```sh\ndocker-compose run --rm app sh -c \"python manage.py test\"\n```\n\n### And coding style tests\n\n[Flake8](https://flake8.pycqa.org/en/latest/) is used to enforce the coding styles. Lint command as belows.\n\n```sh\ndocker-compose run --rm app sh -c \"flake8\"\n```\n\nYou can run both the tests and lints in one go like below.\n\n```sh\ndocker-compose run --rm app sh -c \"python manage.py test \u0026\u0026 flake8\"\n```\n\n### Test Look Through\n\n#### Failing Test\n\n![Failing Test GIF](public/screencasts/test-fail.gif)\n\n#### Passing Test\n\n![Passing Test GIF](public/screencasts/test-pass.gif)\n\n## Deployment\n\nTo deploy the API first you can use the power of `docker-compose`.\n\nSimply run the belwo.\n\n```sh\ndocker-compose up\n```\n\n## Built With\n\n- [Django](https://www.djangoproject.com/) - The web framework used\n- [Django Rest Framework](https://www.django-rest-framework.org/) - Web API Framework\n- [PostgreSQL](https://www.postgresql.org/) - DB Used\n- [psycopg2](https://pypi.org/project/psycopg2/) - PostgreSQL database adapter\n- [flake8](https://flake8.pycqa.org/en/latest/) - Linter\n- [Docker](https://www.docker.com/) - Container Manager\n\n## Contributing\n\nPlease read [CODE_OF_CONDUCT.md](https://github.com/DevDHera/TDD-With-Django-REST/blob/master/CODE_OF_CONDUCT.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Authors\n\n- **Devin Herath** - _Initial work_ - [DevDHera](https://github.com/DevDHera)\n\nSee also the list of [contributors](https://github.com/DevDHera/TDD-With-Django-REST/graphs/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/DevDHera/TDD-With-Django-REST/blob/master/LICENSE) file for details.\n\n## Acknowledgments\n\n- [PurpleBooth](https://github.com/PurpleBooth) for this awesome README template :heart:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdhera%2Ftdd-with-django-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevdhera%2Ftdd-with-django-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdhera%2Ftdd-with-django-rest/lists"}