semvec/pypi-packages huggingface dataset:
BluePIL 0.1.5
Automatic memory management for Pillow - take the blue pill
License: MIT
Requires Python: >=3.8
Keywords: pillow, PIL, image, memory, cleanup

# BluePIL 💊

**Take the blue pill. Your memory stays safe.**

Stop fighting Pillow's memory leaks. BluePIL is a drop-in replacement that automatically handles cleanup so you don't have to.

## The Problem
```python
from PIL import Image

# Process 1000 images
for i in range(1000):
    img = Image.open(f'image_{i}.jpg')
    img = img.resize((800, 600))
    img.save(f'output_{i}.jpg')
    # img.close()  # Forgot this? RAM goes brrr 📈
```

**Memory usage: 2GB+ and climbing** 🔥

Here's the dirty secret: Pillow's Python objects get garbage collected just fine, but the underlying C image buffers don't get freed unless you explicitly call `.close()`. Python's GC has no idea those massive C allocations even exist.

The result? Your Python process looks lean to the GC while your actual RAM usage spirals out of control. You're forced to either:
- Manually call `.close()` everywhere like it's 1995
- Wrap everything in context managers
- Just accept the leak and provision 40GB of RAM (the HuggingFace strategy)

## The Solution
```python
from BluePIL import Image

# Same code, zero leaks
for i in range(1000):
    img = Image.open(f'image_{i}.jpg')
    img = img.resize((800, 600))
    img.save(f'output_{i}.jpg')
    # Automatic cleanup ✨
```

**Memory usage: Stable at 50MB** ✅

## Installation
```bash
pip install BluePIL
```

## Usage

Replace your Pillow import:
```python
# Before
from PIL import Image

# After
from BluePIL import Image
```

That's it. Everything else works exactly the same.

## How It Works

BluePIL wraps Pillow's `Image` class with automatic cleanup using `weakref.finalize()`. When an image goes out of scope, `.close()` is called automatically, releasing the C buffers immediately instead of leaking them forever.

## Features

- ✅ Drop-in replacement for `PIL.Image`
- ✅ Zero API changes
- ✅ Automatic memory cleanup
- ✅ Context manager support
- ✅ Works with existing Pillow code

## Why "BluePIL"?

> "You take the blue pill, the story ends. You wake up in your bed and believe whatever you want to believe."

Take the blue pill. Stop worrying about memory leaks. Just process your images.

## License

MIT

## Contributing

Issues and PRs welcome at [github.com/ewan-m/BluePIL](https://github.com/ewan-m/BluePIL)
akshare-proxy 1.17.88
AKShare is an elegant and simple financial data interface library for Python, built for human beings!
License: MIT
Requires Python: >=3.8
Keywords: stock, option, futures, fund, bond, index, air, finance, spider, quant, quantitative, investment, trading, algotrading, data

# Akshare 引入 Proxy 代理解决  IP 被限问题
## 安装部署 
```
# 安装python安装工具
pip install setuptools
pip install 
python setup.py check
python setup.py sdist bdist_wheel
twine upload dist/*
twine upload --repository testpypi dist/*
twine upload --repository pypi dist/*

pip install akshare-proxy==1.17.87.dev0

pip install --upgrade --index-url https://test.pypi.org/simple/ akshare-proxy==1.17.87.dev2

## 本地调试安装
pip install .
```
## 验证安装
```python
import akshare as ak
print(ak.__version__)
```
## 代理配置
```python
from akshare.utils.context import AkshareConfig
import akshare as ak

""" 创建代理字典 """
proxies = {
    "http": "http://xxx.con:xxx",
    "https": "https://xxx.con:xxx"
}
""" 创建代理字典 """
AkshareConfig.set_proxies(proxies)

stock_sse_summary_df = ak.stock_sse_summary()
print(stock_sse_summary_df)

```

## IP 代理搭建
### 免费代理
[https://github.com/AlexLiue/proxy_pool](https://github.com/AlexLiue/proxy_pool)

## 收费代理
[https://cheapproxy.net/](https://cheapproxy.net/)


## 代码更新管理脚本备注
```
# 克隆项目
git clone https://github.com/AlexLiue/akshare.git
# 查看分支
git remote -v

# 添加上游仓库地址
git remote add upstream https://github.com/akfamily/akshare.git

# 合并上游更新到本地项目 （先本地创建合并分支，然后合并）
git checkout develop
git fetch upstream
git merge upstream/main

# 提交
git add .
git commit -m '20250401'

# 合并更新到主分支
git checkout main
git pull origin main
git merge develop

# 提交主分支
git add .
git commit -m '20250401'
git tag v0.0.1
git push  origin master
```