semvec/pypi-packages huggingface dataset:
django-optimize-image 0.3.0
A Django middleware to optimize image uploads by converting them to WebP.

# **Django Image Optimizer**

A **Django middleware and utility** for optimizing uploaded images by converting them to WebP with configurable **width, height, and quality** settings.

## **Features**

✔ **Automatic optimization via middleware**  
✔ **Manual optimization via utility function**  
✔ **Supports per-request overrides**  
✔ **Configurable defaults via `settings.py`**

---

## **Installation**

```sh
pip install django-image-optimizer
```

Add the middleware:

```python
MIDDLEWARE = [
    # other middleware...
    "optimizer_middleware.middleware.ImageOptimizationMiddleware",
]
```

---

## **Configuration**

Set global defaults in **`settings.py`**:

```python
# Default image optimization settings
IMAGE_OPTIMIZER_WIDTH = 800   # Resize width
IMAGE_OPTIMIZER_HEIGHT = None  # Keep aspect ratio
IMAGE_OPTIMIZER_QUALITY = 80  # WebP quality
```

> _By default, images are resized to 800px width while maintaining aspect ratio and optimized to 80% quality._

---

## **Usage**

### **1️⃣ Automatic Optimization (Middleware)**

Once added to `MIDDLEWARE`, the optimizer **automatically processes all uploaded images** in `POST`, `PUT`, and `PATCH` requests.

✅ Converts images to **WebP**  
✅ Resizes based on `settings.py`

---

### **2️⃣ Dynamic Overrides (Per Request)**

Override optimization settings dynamically in a view using **`request.META`**:

```python
def upload_view(request):
    request.META["IMAGE_OPTIMIZER_WIDTH"] = 600
    request.META["IMAGE_OPTIMIZER_QUALITY"] = 90
    return some_response
```

---

### **3️⃣ Manual Optimization (Standalone Function)**

Use the function **anywhere** in your code (views, forms, serializers, etc.).

```python
from optimizer_middleware.utils import optimize_image

optimized_image = optimize_image(image_file, width=500, quality=85)
```

---

## **License**

[MIT License](LICENSE). Free to use and modify. 🚀

---

## **Contribution**

Use this guide [Contribution](https://opensource.guide/how-to-contribute/)
meishiki 0.3.12
Calculation of Four Pillars of Destiny
Requires Python: >=3.7

# Meishiki

[![Python test](https://github.com/tk42/meishiki/actions/workflows/test.yml/badge.svg)](https://github.com/tk42/meishiki/actions/workflows/test.yml) ![Python 3.7](https://img.shields.io/badge/python-3.7-00af00.svg) [![PyPI](https://img.shields.io/pypi/v/meishiki)](https://pypi.org/project/meishiki/) ![License: MIT](https://img.shields.io/badge/license-MIT-a000ff.svg) ![CodeStyle: black](https://img.shields.io/badge/code%20style-black-000000.svg)

## Requirement

- Python >= 3.7
- jinja2
- pyyaml
- python-box

## Quickstart

```bash
$ pip install meishiki
```

Then,

```bash
$ python3 ./generate_html.py YYYY-MM-DD HH:MM SEX
```

SEX should be specified when male = 0, female = 1

## How to run MCP server

This library is supported MCP server.

```bash
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install meishiki fastmcp
$ python3 ./mcp_server.py
```

and add the following to your ClaudeDesktop config file:

```json
{
  "mcpServers": {
    "meishiki": {
      "name": "Meishiki Server",
      "command": "{local repository}/meishiki/.venv/bin/python3",
      "args": ["-u", "{local repository}/meishiki/mcp_server.py"],
      "transport": "stdio"
    }
  }
}
```

## Run tests

### Test all

```bash
$ pip install -e .
$ pytest --cov=meishiki ./tests
```

### Test specific

```bash
pytest -s tests/output/test_html.py::test_output_html_basic
```

## 節入り

- [2026 年](https://eco.mtk.nao.ac.jp/koyomi/yoko/2026/rekiyou262.html)

## TODO

- [ ] 逆引きテーブル作成

## Thanks

@hajime-f/meishiki
wppm 17.2.20250823
WinPython Package Management
Requires Python: >=3.10
Keywords: Portable, Windows

WinPython tools
===============

Copyright 2012-2013 Pierre Raybaut

Copyright 2014-2025+ The Winpython development team: https://github.com/winpython/

Licensed under the terms of the MIT License
(see wppm/__init__.py for details)


Overview
--------

WinPython is a portable distribution of the Python programming 
language for Windows: https://winpython.github.io
		
This is the `wppm` Python package and build toolchain repository, not the distribution itself.
It includes two main features:

WinPython Package Manager (WPPM)
  a complementary tool to navigate provided packages, install packages from included Wheelhouse, or register WinPython. 
  pip is the recommanded way to add or remove packages otherwise
			
WinPython build toolchain
  generate_a_winpython_distro.bat and make.py are the toolchain used to 
  build a WinPython distribution from (almost) scratch.

WinPython set of Wheel
  You can get also the equivalent of the WinPython distribution by using one of the provided pylock.toml
  or by using provided requirements-with-hash.txt until pip does support pylock.toml files
  

Dependencies
------------   

* Python3 >= 3.10


Requirements
------------

* installer can be 7-Zip or nothing (just .zip-it)


Wppm build 
----------
    
From the source package (see section 'Building dependencies'), you may 
build WPPM using the following commands:

.. code-block:: bash

   python -m pip install flit
   python -m flit build

Winpython Distribution wheels installation
------------------------------------------
    
To only install the wheels assembled per WinPython Distribution, you may

.. code-block:: bash

   python -m pip install --no-deps --require-hashes https://github.com/winpython/winpython/releases/download/16.6.20250620final/requir.64-3_13_5_0slim.txt

A pylock file is also available, when you package manager can handle it

.. code-block:: text

   https://github.com/winpython/winpython/releases/download/16.6.20250620final/pylock.64-3_13_5_0slim.toml

But the easiest way to install the last stable release of WinPython is 
by using a zipped distribution with or without auto-extractor: https://winpython.github.io/
            
More information
----------------

* Downloads: https://sourceforge.net/projects/winpython/files/ or https://github.com/winpython/winpython/releases

* Development, bug reports, discussions and feature requests: https://github.com/winpython/winpython

* Discussions: https://github.com/winpython/winpython/discussions