Starter kit for Django Rest Framework projects
Project description
Django REST Framework Starter Kit
This is a starter template for Django REST Framework (DRF) projects, designed to provide a solid foundation with essential features commonly needed in API development.
Features
- Token-Based Authentication: Secure your API endpoints using token-based authentication.
- Swagger API Documentation: Automatically generate interactive API documentation using Swagger UI.
- User Management System: Implement user registration, login, logout, and password reset functionalities.
- Permissions and Roles: Define user roles and permissions to control access to API endpoints.
- Email Notifications: Set up email notifications for user-related events like registration and password reset.
- Rate Limiting: Prevent abuse of API endpoints by implementing rate limiting.
- File Uploads: Support file uploads (e.g., images, documents) with customizable storage backends.
- Caching: Improve API performance with caching for frequently accessed data.
- Background Tasks: Perform background tasks asynchronously using Celery and a message broker.
- Monitoring and Logging: Monitor application performance and track errors with logging and monitoring tools.
Usage
-
Clone this repository:
git clone https://github.com/hossainchisty/django-rest-starter-kit.git
-
Install dependencies:
pip install -r requirements.txt
-
Customize settings:
- Configure database settings in
settings.py
. - Set up email configuration for sending notifications.
- Configure token authentication settings.
- Customize permissions and roles according to your application's requirements.
- Configure database settings in
-
Migrate the database:
python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Access the API documentation:
Open your browser and navigate to
http://127.0.0.1:8000/swagger/
to view the interactive API documentation generated by Swagger UI. -
Start building your API endpoints:
- Define your API endpoints in
urls.py
. - Implement views and serializers for your API resources in
views.py
andserializers.py
respectively. - Secure your endpoints using token authentication and define permissions as needed.
- Define your API endpoints in
Testing
Run unit tests and integration tests to ensure the reliability and stability of your API:
python manage.py test
Contributing
Contributions are welcome! If you have suggestions for improvements or new features, please open an issue or submit a pull request.
License
This project is licensed under the Apache-2.0 license - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django-rest-starter-kit-1.21.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dacbd2f550328fe3224b57027c812a282b16dccbe52fa4f6291d6b1b5667240b |
|
MD5 | 82935e91b27138f92722fa19307e7461 |
|
BLAKE2b-256 | 5f7fa77ae0ecf6b3f12233a835c7e6e5f90582853fa9d5318c6789ac68590c14 |
Hashes for django_rest_starter_kit-1.21.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f783c17e0d9c81b1db3fc5929fe901c9124839f81d0867f38646bc371e93f66a |
|
MD5 | 74f94b01e471b62df47b5cf371ac7ff1 |
|
BLAKE2b-256 | ff46aa18cb7a35e1193677761d1b25166264947c27f0e8349a137e5aa7c7d47e |