Skip to content

Commit

Permalink
chore: updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Kowal committed Nov 15, 2024
1 parent 2797c49 commit 35e6e76
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
- 🐞 Bugfixes
- 🔧 Others

## 1.0.0 - TBD
## 1.0.0 - 2024-11-15

✨ Official release of the `django_utils_kit` library ✨
72 changes: 71 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,73 @@
# ✨ Django Utils Kit ✨

Bundle of useful classes and functions for Django
![Code quality](https://github.com/Jordan-Kowal/django-utils-kit/actions/workflows/code_quality.yml/badge.svg?branch=main)
![Tests](https://github.com/Jordan-Kowal/django-utils-kit/actions/workflows/tests.yml/badge.svg?branch=main)
![Build](https://github.com/Jordan-Kowal/django-utils-kit/actions/workflows/publish_package.yml/badge.svg?event=release)
![Coverage](https://badgen.net/badge/coverage/%3E90%25/pink)
![Tag](https://badgen.net/badge/tag/1.0.0/orange)
![Python](https://badgen.net/badge/python/3.9%20|%203.10%20|%203.11%20|%203.12|%203.13)
![Licence](https://badgen.net/badge/licence/MIT)

- [✨ Django Utils Kit ✨](#-django-utils-kit-)
- [💻 How to install](#-how-to-install)
- [📕 Available imports](#-available-imports)
- [🔗 Useful links](#-useful-links)

Provides various utilities for working with Django and DRF:

- [admin.py](./django_utils_kit/admin.py): Additional classes and mixins for Django admin.
- [emails.py](./django_utils_kit/emails.py): Classes to easily send sync and async emails through Django.
- [exceptions.py](./django_utils_kit/exceptions.py): Additional exceptions for DRF.
- [files.py](./django_utils_kit/files.py): Utilities for handling files with DRF.
- [images.py](./django_utils_kit/images.py): Utilities for handling images within Django.
- [models.py](./django_utils_kit/models.py): Additional classes and utilities for Django models.
- [network.py](./django_utils_kit/network.py): Network related utilities to handle requests.
- [permissions.py](./django_utils_kit/permissions.py): Additional permissions for DRF.
- [serializers.py](./django_utils_kit/serializers.py): Additional serializers and fields for DRF.
- [test_runner.py](./django_utils_kit/test_runner.py): Custom test runners for Django.
- [test_utils.py](./django_utils_kit/test_utils.py): Additional TestCase classes with new assertions and utilities.
- [viewsets.py](./django_utils_kit/viewsets.py): Custom ViewSets for DRF.

## 💻 How to install

The package is available on PyPi with the name `django_utils_kit`.
Simply run:

```shell
pip install django_utils_kit
```

## 📕 Available imports

Here's a list of all available imports for this package:

```python
from django_utils_kit.admin import ReadOnlyAdminMixin
from django_utils_kit.emails import Email
from django_utils_kit.exceptions import Conflict, FailedPrecondition
from django_utils_kit.files import download_file, download_files_as_zip
from django_utils_kit.images import (
downsize_and_save_image_from_path,
downsize_image,
image_to_base64,
)
from django_utils_kit.models import (
FileNameWithUUID,
ImprovedModel,
PreCleanedAbstractModel,
update_m2m,
update_model_instance,
)
from django_utils_kit.network import get_client_ip, get_server_domain
from django_utils_kit.permissions import BlockAll, IsNotAuthenticated
from django_utils_kit.serializers import ReadOnlyModelSerializer, ThumbnailField
from django_utils_kit.test_runners import TimedTestRunner
from django_utils_kit.test_utils import APITestCase, AssertionTestCase, ImprovedTestCase
from django_utils_kit.viewsets import ImprovedViewSet

```

## 🔗 Useful links

- [Want to contribute?](CONTRIBUTING.md)
- [See what's new!](CHANGELOG.md)
2 changes: 0 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# TODO

- Update docstrings
- Update README
- Replace `update_deps.yml` with dependabot when `uv` gets supported
2 changes: 1 addition & 1 deletion django_utils_kit/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Additional admin classes and mixins for Django."""
"""Additional classes and mixins for Django admin."""

from typing import Optional

Expand Down
2 changes: 1 addition & 1 deletion django_utils_kit/emails.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Utilities for sending emails through Django."""
"""Classes to easily send sync and async emails through Django."""

from threading import Thread
from typing import Any, Dict, List, Optional
Expand Down
2 changes: 1 addition & 1 deletion django_utils_kit/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Additional exceptions for both Django and DRF."""
"""Additional exceptions for DRF."""

from django.utils.translation import gettext_lazy as _
from rest_framework.exceptions import APIException
Expand Down
2 changes: 1 addition & 1 deletion django_utils_kit/files.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Utilities for handling files within Django."""
"""Utilities for handling files with DRF."""

from io import BytesIO
from typing import List
Expand Down
2 changes: 1 addition & 1 deletion django_utils_kit/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Additional model classes and utilities for Django."""
"""Additional classes and utilities for Django models."""

import os
from typing import Any, List
Expand Down
2 changes: 1 addition & 1 deletion django_utils_kit/permissions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Additional permissions for both Django and DRF."""
"""Additional permissions for DRF."""

from rest_framework.permissions import BasePermission, IsAuthenticated
from rest_framework.request import Request
Expand Down
2 changes: 1 addition & 1 deletion django_utils_kit/serializers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Additional serializers and fields for Django and DRF."""
"""Additional serializers and fields for DRF."""

from typing import Any, Dict

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion django_utils_kit/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Additional TestCase classes for easier testing in Django."""
"""Additional TestCase classes with new assertions and utilities."""

import datetime
from io import BytesIO
Expand Down
2 changes: 2 additions & 0 deletions django_utils_kit/viewsets.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Custom ViewSets for DRF."""

from typing import Any, Dict, List, Optional, Sequence, Type

from rest_framework.permissions import BasePermission
Expand Down

0 comments on commit 35e6e76

Please sign in to comment.