{"id":19374015,"url":"https://github.com/akashrchandran/sample-django","last_synced_at":"2026-04-16T04:02:16.359Z","repository":{"id":232130122,"uuid":"783527278","full_name":"akashrchandran/sample-django","owner":"akashrchandran","description":"A Django Rest Framework project demonstrating the use of JWT authentication.","archived":false,"fork":false,"pushed_at":"2024-06-22T18:45:42.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T10:47:42.985Z","etag":null,"topics":["api","django","django-rest-framework","python","python3","rest-api"],"latest_commit_sha":null,"homepage":"https://sample-django-7lfj.onrender.com","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/akashrchandran.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-04-08T04:23:00.000Z","updated_at":"2025-02-09T17:44:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"36e93118-4cbe-4c05-b987-33fc9af32ff4","html_url":"https://github.com/akashrchandran/sample-django","commit_stats":null,"previous_names":["akashrchandran/sample-django"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akashrchandran/sample-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Fsample-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Fsample-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Fsample-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Fsample-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akashrchandran","download_url":"https://codeload.github.com/akashrchandran/sample-django/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akashrchandran%2Fsample-django/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31870516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"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":["api","django","django-rest-framework","python","python3","rest-api"],"created_at":"2024-11-10T08:33:51.833Z","updated_at":"2026-04-16T04:02:16.337Z","avatar_url":"https://github.com/akashrchandran.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Django Rest Framework API\n\nThis is a sample Django Rest Framework API that allows users to register, login, upload files, and download files. The API is secured with JWT authentication. The API is hosted on Heroku and can be accessed via the following link: [https://sample-django-7lfj.onrender.com/](https://sample-django-7lfj.onrender.com/)\n\n\n## API Documentation\n\nThe API documentation is available at the following link: \n1. Swagger UI: [https://sample-django-7lfj.onrender.com/api/docs/](https://sample-django-7lfj.onrender.com/api/docs/)\n2. Redoc: [https://sample-django-7lfj.onrender.com/api/redoc/](https://sample-django-7lfj.onrender.com/api/redoc)\n\n## API Endpoints\n| Endpoint              | Method | Description          | Authentication Required | Request Body Parameters |\n|-----------------------|--------|----------------------|-------------------------|--------------------|\n| `/api/register/`      | POST   | Register User        | No                      | `username`, `password`, `email` |\n| `/api/login/`         | POST   | Login User           | No                      | `username`, `password` |\n| `/api/upload/`        | POST   | Upload File          | Yes                     | `file` |\n| `/api/download/{id}`  | GET    | Download File        | Yes                     | `None` |\n| `/api/add/`           | POST   | Add Number           | Yes                     | `num1`, `num2` |\n| `/api/subtract/`      | POST   | Subtract Number      | Yes                     | `num1`, `num2` |\n| `/api/multiply/`      | POST   | Multiply Number      | Yes                     | `num1`, `num2` |\n| `/api/divide/`        | POST   | Divide Number        | Yes                     | `num1`, `num2` |\n| `/api/products/`      | GET    | Get All Products     | No                      | `None` |\n| `/api/products/{id}`  | GET    | Get Product by ID    | No                      | `None` |\n| `/api/products/`      | POST   | Create Product       | Yes                     | `name`, `description`, `price` |\n| `/api/products/{id}`  | PUT    | Update Product       | Yes                     | `name`, `description`, `price` |\n| `/api/products/{id}`  | PATCH  | Patch Product        | Yes                     | `name`, `description`, `price` |\n| `/api/products/{id}`  | DELETE | Delete Product       | Yes                     | `None` |\n\n## Authentication\n\nThe API uses JWT authentication. To access the protected endpoints, you need to include the JWT token in the request headers. The token is generated when you login. The token should be included in the `Authorization` header as follows:\n\n```json\n{\n    \"Authorization\": \"Bearer  \u003ctoken\u003e\"\n}\n```\n\n## Running the API Locally\n\nTo run the API locally, follow the steps below:\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/akashrchandran/sample-django\n```\n\n2. Change into the project directory:\n\n```bash\ncd sample-django\n```\n\n3. Create a virtual environment:\n\n```bash\npython3 -m venv env\n```\n\n4. Activate the virtual environment:\n\n```bash\nsource env/bin/activate\n```\n\n5. Install the dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n6. Run the migrations:\n\n```bash\npython manage.py migrate\n```\n\n7. Run the development server:\n\n```bash\npython manage.py runserver\n```\n\nThe API will be accessible at `http://localhost:8000/`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakashrchandran%2Fsample-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakashrchandran%2Fsample-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakashrchandran%2Fsample-django/lists"}