{"id":18914769,"url":"https://github.com/laaraujo/django-api-template","last_synced_at":"2025-09-04T21:33:14.615Z","repository":{"id":256896721,"uuid":"827704185","full_name":"laaraujo/django-api-template","owner":"laaraujo","description":"Django API template for my projects","archived":false,"fork":false,"pushed_at":"2024-11-01T02:04:58.000Z","size":67,"stargazers_count":9,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-08T10:12:43.319Z","etag":null,"topics":["auth","boilerplate","coverage","django","django-rest-framework","docker","makefile","postgresql","pre-commit","pytest","template"],"latest_commit_sha":null,"homepage":"","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/laaraujo.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-07-12T07:45:56.000Z","updated_at":"2024-09-28T23:17:45.000Z","dependencies_parsed_at":"2024-09-13T18:16:45.286Z","dependency_job_id":null,"html_url":"https://github.com/laaraujo/django-api-template","commit_stats":null,"previous_names":["laaraujo/django-api-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fdjango-api-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fdjango-api-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fdjango-api-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laaraujo%2Fdjango-api-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laaraujo","download_url":"https://codeload.github.com/laaraujo/django-api-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231999662,"owners_count":18458178,"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":["auth","boilerplate","coverage","django","django-rest-framework","docker","makefile","postgresql","pre-commit","pytest","template"],"created_at":"2024-11-08T10:12:48.929Z","updated_at":"2024-12-31T14:43:22.020Z","avatar_url":"https://github.com/laaraujo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![tests](https://github.com/laaraujo/django-api-template/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/laaraujo/django-api-template/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/gh/laaraujo/django-api-template/graph/badge.svg?token=6187LG7Y30)](https://codecov.io/gh/laaraujo/django-api-template)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# Django API Template\n\nOpinionated template repo to kickstart Back-end/API projects with Django Rest Framework.\n\n## Features\n\n- [Makefile](./Makefile) with common shorcuts for local development commands\n- Authentication ([Djoser](https://djoser.readthedocs.io/))\n  - Registration\n  - Login\n  - Email validation\n  - Password reset (w/ email)\n  - Password reset confirmation\n- Static file serving ([Whitenoise](https://whitenoise.readthedocs.io/))\n- [Dockerfile](./Dockerfile)\n- [Docker compose for local development](./compose.yml)\n- [PostgreSQL](https://www.postgresql.org/)\n- Auto Swagger Docs ([DRF Spectacular](https://drf-spectacular.readthedocs.io/))\n- [Custom user model](./src/users/models.py) (email, password and name)\n- Email via SMTP\n- Pre-commit hooks ([Ruff](https://docs.astral.sh/ruff/) and [OTB Pre-commit hooks](https://github.com/pre-commit/pre-commit-hooks))\n- Automated testing ([Pytest](https://docs.pytest.org/))\n  - [Modal bakery](https://model-bakery.readthedocs.io/)\n  - Test run parallelization with (pytest-xdist)[https://pytest-xdist.readthedocs.io/]\n  - [Faker](https://faker.readthedocs.io/)\n  - [Coverage](https://pytest-cov.readthedocs.io/)\n\n## Local setup\n\n```sh\ngit clone git@github.com:laaraujo/django-api-template.git # clone this repo\ncd django-api-template # cd into repository directory\npython -m venv .venv # create virtual environment\nsource .venv/bin/activate # activate virtual environment\npip install -r requirements.txt # install dependencies\npre-commit install # initialize pre-commit hooks\ncp .env.example .env # create .env file\nmake build # build containers\nmake run # run your containers locally\n```\n\n## Make commands\n\n```\nbuild .................... : Build local containers\nrun ...................... : Run local containers\nstop ..................... : Stop local containers\ndown ..................... : Stop and delete local container\nmakemigrations ........... : Django makemigrations command\nmigrate .................. : Django migrate command\ncreatesuperuser .......... : Django createsuperuser command\nshell .................... : Django shell command\nsh ....................... : SSH into local API container\nlinter ................... : Run Ruff linter against all files in this repo\n```\n\n## Documentation\n\nSwagger docs are available in the `/docs/` endpoint (http://localhost:8000/docs/).\n\n:warning: You'll get a `403 Forbidden` response by default unless you are already logged in with an `admin` account (http://localhost:8000/admin/).\nIf you want to change this behaviour you can modify the required permissions in [./src/app/urls.py](./src/app/urls.py)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaaraujo%2Fdjango-api-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaaraujo%2Fdjango-api-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaaraujo%2Fdjango-api-template/lists"}