https://github.com/wannacry081/simpleapi-django
SimpleAPI-Django is a straightforward note API implemented in the Django framework, designed to showcase REST API principles for CRUD operations, authentication, searching, ordering, pagination, renderers, throttling, and more.
https://github.com/wannacry081/simpleapi-django
django django-rest-framework django-rest-framework-jwt djoser drf-yasg
Last synced: 3 months ago
JSON representation
SimpleAPI-Django is a straightforward note API implemented in the Django framework, designed to showcase REST API principles for CRUD operations, authentication, searching, ordering, pagination, renderers, throttling, and more.
- Host: GitHub
- URL: https://github.com/wannacry081/simpleapi-django
- Owner: WannaCry081
- License: mit
- Created: 2024-02-07T13:59:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-23T16:50:48.000Z (about 1 year ago)
- Last Synced: 2025-01-10T04:28:23.833Z (4 months ago)
- Topics: django, django-rest-framework, django-rest-framework-jwt, djoser, drf-yasg
- Language: Python
- Homepage:
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SimpleAPI-Django
## Overview
SimpleAPI-Django is a straightforward note API implemented in the Django framework, designed to showcase REST API principles for CRUD operations, authentication, and more. It leverages various Django packages, including Djoser for authentication, djangorestframework-simplejwt, djangorestframework-xml, drf-yasg for Swagger documentation (accessible via /swagger or /redoc), and pipenv for dependency management.
## Features
- Django 3.x and Django Rest Framework
- RESTful API supporting CRUD operations
- Authentication powered by Djoser
- Token-based authentication with djangorestframework-simplejwt
- Swagger documentation available at /swagger or /redoc
- Utilizes pipenv for dependency management## Best Practices Implemented
SimpleAPI-Django embodies best practices for creating a comprehensive REST API, including:
- Versioning to manage API changes gracefully
- Throttling mechanisms for controlling the rate of API requests
- Flexible rendering options (json, text/html, and xml)
- Pagination for handling large datasets
- Search capabilities for efficient data retrieval
- Ordering for sorting results based on specific criteria## Getting Started
1. **Clone the repository:**
```bash
git clone https://github.com/WannaCry081/SimpleAPI-Django.git
```2. **Create a virtual environment:**
```bash
cd SimpleAPI-Django
virtualenv venv
```3. **Activate the virtual environment:**
```bash
source venv/Scripts/activate
```4. **Install dependencies:**
```bash
pip install -r requirements.txt
```5. **Run migrations:**
```bash
python manage.py migrate
```6. **Create a superuser:**
```bash
python manage.py createsuperuser
```7. **Start the development server:**
```bash
python manage.py runserver
```Access the API at `http://localhost:8000/`.
## Testing
Execute unit tests with:
```bash
python manage.py test
```## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.