semvec/pypi-packages huggingface dataset:
django-batteries 0.0.3
Set of most common utils for django/drf projects
License: MIT
Requires Python: >=3.11,<4.0

# Django-batteries

This package contains useful utilities for django/drf project

## Models

Contains set of abstract models to enforce DRY principle for most common use cases

### `django_batteries.models.TimeStampedModel`

- `created`
- `modified`

### `django_batteries.models.TimeFramedModel`

- `start`
- `end`

  For time bound entities

### `django_batteries.models.DescriptionModel`

- `description`

### `django_batteries.models.TitleModel`

- `title`

### `django_batteries.models.TitleDescriptionModel`

- `title`
- `description`

## Fields

### Monitor field

A DateTimeField that monitors another field on the same model and sets itself to the current date/time whenever the monitored field
changes.
use it like this in your models:
class MyMode(models.Model):

    title = models.Charfield(max_length=50)
    title_changed = MonitorField(_('title changed'), monitor='title')

## Mixins

### `django_batteries.mixins.ListSerializerMixin`

Allow you to specify `list_serializer_class` that will be used only in list action

## Paginators

### django_batteries.paginators.ResultSetPagination

Paginator with `page_size` as query parameter for setting page size

### django_batteries.paginators.SingleResultPaginator

Custom paginator class that returns not paginated(detail result) if qs result have only 1 item

## Utils

### django_batteries.utils.qs_admin_or_author

Return all objects if user is staff, otherwise return objects owned by user
pyFolderOrganizer 0.0.1b0
Python package to organize a folder in sub-directories based on file types.
License: MIT

# pyFolderOrganizer
 ![Read the docs][docs-shield] ![PyPI Downloads][pypiDown-shield]  ![Last Commit][lastCommit-shield]

 Python package to organize a folder in sub-directories based on file types.

#
## Documentation
View documentation on [Readthedocs](https://pyfolderorganizer.readthedocs.io/en/latest/index.html)
#
## Setup
You can install this package from:

From GitHub:

```bash
pip install git+https://github.com/kotsiossp97/pyFolderOrganizer.git@latest
```

From PIP:

```bash
pip install pyFolderOrganizer
```

#
## Usage
### Basic Example
```python
import pyFolderOrganizer

path = "path/to/be/organized"
organizer = pyFolderOrganizer.FolderOrganizer(path)
```

### Observer Mode
Package offers "Observer Mode" that listens for any file created in the directory that the organizer is set to. Creates a thread and when a new file is detected, is automatically moved to the corresponding folder depending of the file extension.
```python
organizer = pyFolderOrganizer.FolderOrganizer(path, observe=True)
```

### Enable/Disable Windows Toasts
Set the `notifications` argument to True to enable windows notifications on startup and when a file gets organized.
Clicking the notification opens an explorer window to the corresponding path. This is turned off by default.
```python
organizer = pyFolderOrganizer.FolderOrganizer(path, notifications=True)
```

### Enable/Disable Console Printing
By default, the package prints messages on the console, equivalent to the notifications. This can be turned off by setting the `printing` argument:
```python
organizer = pyFolderOrganizer.FolderOrganizer(path, printing=False)
```

#
## Available Extensions
These are the folders that will contain the files with the provided extensions. Folders are auto created, so no need to create any of them.

| Folder Name   | Extensions                                            |
| ------------- | ----------------------------------------------------- |
| PDF           | .pdf                                                  |
| CodeFiles     | .py, .c, .cpp, .java, .h, .html, .php, .js, .tsx      |
| OfficeFiles   | .txt, .doc, .docx, .xls, .xlsx, .accdb, .ppt, .pptx   |
| MusicFiles    | .mp3, .wav, .flac                                     |
| ImageFiles    | .jpg, .jpeg, .png, .gif, .dds                         |
| Compressed    | .zip, .rar, .7z, .gz                                  |
| Executables   | .exe, .msi                                            |
| General       | All other file extensions                             |

### Add custom folder/extension
To-do

[docs-shield]:https://img.shields.io/readthedocs/pyfolderorganizer?style=for-the-badge
[pypiDown-shield]:https://img.shields.io/pypi/dw/pyfolderorganizer?style=for-the-badge
[lastCommit-shield]: https://img.shields.io/github/last-commit/kotsiossp97/pyFolderOrganizer?style=for-the-badge