{"id":16174945,"url":"https://github.com/app-generator/sample-django-tastypie","last_synced_at":"2026-01-20T04:32:34.674Z","repository":{"id":100503233,"uuid":"568639443","full_name":"app-generator/sample-django-tastypie","owner":"app-generator","description":"Django Tastypie Sample - Open-Source Playground | AppSeed","archived":false,"fork":false,"pushed_at":"2023-02-09T06:12:08.000Z","size":78,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T18:52:08.123Z","etag":null,"topics":["developer-tool","django-api","tastypie"],"latest_commit_sha":null,"homepage":"https://appseed.us/boilerplate-code/","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/app-generator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-11-21T04:47:16.000Z","updated_at":"2023-10-15T03:11:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f576e71-f81d-4160-814d-12c02933f21c","html_url":"https://github.com/app-generator/sample-django-tastypie","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":"app-generator/core-django","purl":"pkg:github/app-generator/sample-django-tastypie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-django-tastypie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-django-tastypie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-django-tastypie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-django-tastypie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/app-generator","download_url":"https://codeload.github.com/app-generator/sample-django-tastypie/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Fsample-django-tastypie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28596079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: 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":["developer-tool","django-api","tastypie"],"created_at":"2024-10-10T04:43:49.004Z","updated_at":"2026-01-20T04:32:34.656Z","avatar_url":"https://github.com/app-generator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Django Tastypie](https://github.com/app-generator/sample-django-tastypie) `Sample`\n\nPlayground project built on top of [django-tastypie](https://github.com/django-tastypie/django-tastypie) that aims to translate automatically OpenAPI definitions into secure APIs without coding.\n\n\u003cbr /\u003e\n\n\u003e Product Roadmap \n\n| Status | Item | info | \n| --- | --- | --- |\n| **Phase 1#** |  |  |\n| ✅ | `Up-to-date Dependencies` |  |\n| ✅ | [django-tastypie](https://github.com/django-tastypie/django-tastypie) Integration |  |\n| ✅ | **Persistence** | `SQLite`, `MySql` |\n| ✅ | **Basic Authentication** | classic user/password |\n| ✅ | **API** | Products \u0026 Sales (linked tables) |\n|     |         | GET Requests (public), `get/`, `get/id`  |\n|     |         | CREATE, UPD, DEL - reserved for authenticated users |\n| **Phase 2#** |  |  |\n| ✅ | `OpenAPI Parser` integration |  |\n| ✅ | `Complete the flow` | OpenAPI -\u003e APIs |\n\n\u003cbr /\u003e\n\n## ✨ Start the app in Docker\n\n\u003e 👉 **Step 1** - Download the code from the GH repository (using `GIT`) \n\n```bash\n$ git clone https://github.com/app-generator/sample-django-tastypie.git\n$ cd sample-django-tastypie\n```\n\n\u003cbr /\u003e\n\n\u003e 👉 **Step 2** - Start the APP in `Docker`\n\n```bash\n$ docker-compose up --build \n```\n\nVisit `http://localhost:5085` in your browser. The app should be up \u0026 running.\n\n\u003cbr /\u003e\n\n## Manual Build \n\n\u003e 👉 Download the code  \n\n```bash\n$ git clone https://github.com/app-generator/sample-django-tastypie.git\n$ cd sample-django-tastypie\n```\n\n\u003cbr /\u003e\n\n\u003e 👉 Install modules via `VENV`  \n\n```bash\n$ virtualenv env\n$ source env/bin/activate\n$ pip install -r requirements.txt\n```\n\n\u003cbr /\u003e\n\n\u003e 👉 Set Up Database\n\n```bash\n$ python manage.py makemigrations\n$ python manage.py migrate\n```\n\n\u003cbr /\u003e\n\n\u003e 👉 Start the app\n\n```bash\n$ python manage.py runserver\n```\n\nAt this point, the app runs at `http://127.0.0.1:8000/`. \n\n\u003cbr /\u003e\n\n\u003e 👉 How to use\n\nThis project provides endpoints for authentication, user profiles, products, and sales. The users, products, and sales endpoints require the developer to pass a JWT token in the headers with the following format `Authorization: Bearer \u003cJWT Token\u003e` that you can obtain by login at the `/api/v1/auth/login/` endpoint. \n\n```json\nPOST /api/v1/auth/login/\n{\n\t\"password\": \"12345678\",\n\t\"username\": \"koladev33@gmail.com\"\n}\n```\n\n\u003e Note: To register, you can send a POST request to this endpoint `/api/v1/auth/` with a `password`, `username`, and `email` fields present in the payload. \n\nThe request on the `login` endpoint will return a JWT token you can grab to make requests on the `/api/v1/products/`, `/api/v1/users/` and `/api/v1/sales/`. \n\n**Validation**\n\nTastypie allows you to write validation schemes using Django forms. You can find an example of this at `api/sale/api.py`.\n\n```python\nclass SaleForm(forms.Form):\n    product = forms.IntegerField()\n    state = forms.IntegerField()\n    value = forms.IntegerField()\n    fee = forms.IntegerField()\n    client = forms.CharField(max_length=128)\n    currency = forms.CharField(max_length=10, required=False)\n    payment_type = forms.CharField(max_length=10, required=False)\n\n    def clean_product(self):\n        product_id = self.cleaned_data['product']\n\n        try:\n            product = Product.objects.get(id=product_id)\n            return product\n        except Product.DoesNotExist:\n            raise ValidationError(\"This product doesn't exist.\")\n            \nclass SaleResource(ModelResource):\n    class Meta:\n        ...\n        validation = FormValidation(form_class=SaleForm)\n        authorization = UserAuthorization()\n\n```\n\n---\n[Django Tastypie](https://github.com/app-generator/sample-django-tastypie) `Sample` - Open-source Starter provided by **[AppSeed](https://appseed.us/)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fsample-django-tastypie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapp-generator%2Fsample-django-tastypie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Fsample-django-tastypie/lists"}