{"id":15715290,"url":"https://github.com/crazyoptimist/google-directions-django","last_synced_at":"2025-10-26T09:21:25.565Z","repository":{"id":118360157,"uuid":"602963181","full_name":"crazyoptimist/google-directions-django","owner":"crazyoptimist","description":"Google Directions API integration with Django Rest Framework","archived":false,"fork":false,"pushed_at":"2023-05-25T08:11:26.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-05T22:59:04.355Z","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/crazyoptimist.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":"2023-02-17T10:20:07.000Z","updated_at":"2023-05-25T08:12:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"8834cefb-def1-43f3-9d84-70cce3ccf6fe","html_url":"https://github.com/crazyoptimist/google-directions-django","commit_stats":null,"previous_names":["crazyoptimist/google-directions-django"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Fgoogle-directions-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Fgoogle-directions-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Fgoogle-directions-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazyoptimist%2Fgoogle-directions-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazyoptimist","download_url":"https://codeload.github.com/crazyoptimist/google-directions-django/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246372746,"owners_count":20766635,"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":[],"created_at":"2024-10-03T21:40:52.100Z","updated_at":"2025-10-26T09:21:25.485Z","avatar_url":"https://github.com/crazyoptimist.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Toohla REST API\n[![Test](https://github.com/crazyoptimist/google-directions-drf-poc/actions/workflows/test.yml/badge.svg)](https://github.com/crazyoptimist/google-directions-drf-poc/actions/workflows/test.yml)\n\n### What is this?\n\nThis is a RESTful service when a user inputs their origin and destination into the client which returns the carbon emissions, distance, and the time of travel for each mode of transportation:\n\n- Driving\n- Walking\n- Taking the train\n\n### Design\n\n- Origin and destination incomes as latlng\n- Pass the data to Google directions API, to get `distance` and `time` for each transport mode\n- Calculate carbon emissions based on the `distance` and the existing emissions data(assume it's fetched by a scheduled worker, for example, running nightly)\n- Compose a response and send to the client\n- Another endpoint in the same procedure but with origin and destination as address, instead of latlng\n\n### Run\n\n- Create dot env by `cp .env.example .env` and configure with proper values\n- Run by `docker compose up -d`\n\n### Development\n\n- Create a virtualenv in your favorite way\n- Install dependencies by `pip install -r requirements.txt`\n- Install git pre-commit hooks by `pre-commit install`\n- Run the dev server by `python manage.py runserver`\n\n### Test\n\n- Run unit tests by `python manage.py test -v 2`\n\n### API documentation\n\nAutomatic swagger API documentation is configured, and you can find it by browsing `BASE_URL/swagger` in `development`.\n\nIn production, run `python manage.py collectstatic` for generating API docs static files, and configure the production web server(nginx or caddy etc) to serve the static files in a desired path.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazyoptimist%2Fgoogle-directions-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazyoptimist%2Fgoogle-directions-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazyoptimist%2Fgoogle-directions-django/lists"}