{"id":26473061,"url":"https://github.com/amalv/django-api","last_synced_at":"2026-04-09T20:50:32.801Z","repository":{"id":142962863,"uuid":"267661971","full_name":"amalv/django-api","owner":"amalv","description":"Django REST API with Django Rest Framework","archived":false,"fork":false,"pushed_at":"2020-06-16T21:04:02.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-02T06:33:02.045Z","etag":null,"topics":["curl","django","django-rest-framework","rest-api","sendgrid","sqlite3"],"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/amalv.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":"2020-05-28T18:09:36.000Z","updated_at":"2020-05-29T07:44:10.000Z","dependencies_parsed_at":"2023-04-04T00:46:55.694Z","dependency_job_id":null,"html_url":"https://github.com/amalv/django-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amalv/django-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalv%2Fdjango-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalv%2Fdjango-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalv%2Fdjango-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalv%2Fdjango-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amalv","download_url":"https://codeload.github.com/amalv/django-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalv%2Fdjango-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273244306,"owners_count":25070958,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["curl","django","django-rest-framework","rest-api","sendgrid","sqlite3"],"created_at":"2025-03-19T21:50:46.058Z","updated_at":"2026-04-09T20:50:32.728Z","avatar_url":"https://github.com/amalv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django REST API\n\nDjango REST API with Django Rest Framework\n\nExample managing users and sending emails via SendGrid when a new user is created.\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes.\n\n### Prerequisites\n\nYou need Pip, Python and cURL packages installed\n\n### Installing\n\nClone the project\n\n```bash\ngit clone git@github.com:amalv/django-api.git\n```\n\nCreate a virtual environment to isolate packages locally\n\n```bash\npython3 -m venv env\nsource env/bin/activate\n```\n\nInstall Django and Django Rest Framework into the virtual environment\n\n```bash\npip install django\npip install djangorestframework\npip install -U python-dotenv\n```\n\nCreate database (SQLite by default)\n\n```bash\npython manage.py migrate\n```\n\nCreate a super user\n\n```bash\npython manage.py createsuperuser --email admin@example.com --username admin\n```\n\n### Configuration\n\nCreate a `.env` file with the following config:\n\n```bash\nSENDGRID_API_KEY='\u003cYOUR_SENDGRID_API_KEY\u003e'\nSENDER_EMAIL='\u003cYOUR_SENDER_EMAIL\u003e'\n```\n\nThis will allow to send emails when a new user is added.\n\nDon't forget to validate your sender email using [Single Sender Verification](https://sendgrid.com/docs/ui/sending-email/sender-verification/)\n\nYou can read the documentation about sending emails with Django and Sendgrid [here](https://www.twilio.com/blog/using-twilio-sendgrid-send-emails-python-django)\n\n## Testing the API\n\nRun the server\n\n```bash\npython manage.py runserver\n```\n\nExecute cURL request to get a list of users\n\n```bash\ncurl -H 'Accept: application/json; indent=2' http://admin:\u003cYOUR_ADMIN_PASSWORD\u003e@127.0.0.1:8000/users/\n```\n\nYou should see the following output\n\n```json\n[\n  {\n    \"url\": \"http://127.0.0.1:8000/users/1/\",\n    \"username\": \"admin\",\n    \"first_name\": \"\",\n    \"email\": \"admin@example.com\"\n  }\n]\n```\n\n## Testing the API with a public URL\n\nSign up to ngrok and download the client for exposing your local webserver\n\n[Download ngrok](https://ngrok.com/download)\n\nUnzip to install\n\n```bash\nunzip /path/to/ngrok.zip\n```\n\nConnect to your account using the token\n[token](https://dashboard.ngrok.com/auth/your-authtoken)\n\n```bash\n./ngrok authtoken \u003cYOUR_AUTH_TOKEN\u003e\n```\n\nStart HTTP tunnel on port 8000\n\n```bash\n./ngrok http 8000\n```\n\nAdd the ngrok HOST in the `.env` file:\n\nNGROK_HOST='\u003cYOUR_NGROK_HOST\u003e'\n\nExecute cURL request to get a list of users\n\n```bash\ncurl -H 'Accept: application/json; indent=2' https://admin:\u003cYOUR_ADMIN_PASSWORD\u003e@\u003cNGROK_HOST\u003e/users/\n```\n\nYou should see the following output\n\n```bash\n[\n  {\n    \"url\": \"http://\u003cNGROK_URL\u003e/users/1/\",\n    \"username\": \"admin\",\n    \"first_name\": \"\",\n    \"email\": \"admin@example.com\"\n  }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famalv%2Fdjango-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famalv%2Fdjango-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famalv%2Fdjango-api/lists"}