semvec/pypi-packages huggingface dataset:
nsfwguard 1.0.1
GPU-accelerated NSFW content detection for images, videos, and URLs
License: MIT
Requires Python: >=3.8

# nsfwguard



🚨 **GPU-accelerated NSFW content detection** for **images, videos, and URLs**.

`nsfwguard` is a Python tool designed for developers who need fast and reliable NSFW moderation for
bots, websites, APIs, and content pipelines.

---

## ✨ Features

- 🖼️ Image NSFW detection  
- 🎥 Video NSFW detection (frame-based analysis)  
- 🌐 URL scanning  
- ⚡ GPU acceleration (automatic CUDA detection)  
- 📦 Batch scanning  
- 💻 CLI support  
- 🤖 Telegram bot integration  
- 🔐 Policy-based actions (ALLOW / WARN / BLOCK / BAN)

---

## 🚀 Installation

```bash
pip install nsfwguard
```


---

## Example: Scan image 

```python
from nsfwguard import scan_image

result = scan_image("image.jpg")
print(result)
```

## Example: Scan a video file

```python
from nsfwguard import scan_video

result = scan_video("video.mp4")
print(result)
```

## Example: Scan any URL
```python
from nsfwguard import scan_url

result = scan_url("https://example.com/file.jpg")
print(result)
```
text-only-scanner 0.1.1
Ensure only human readable text files are in a directory.
License: MIT
Requires Python: >=3.8

# Text Only Scanner 📝🔍

`text_only_scanner` helps teams ensure only human-readable text files pass validation. It
scans files (or directories) and rejects anything editors would struggle to open or read —
including binary files, files containing many control characters, and printable-but-high-entropy
blobs (e.g., encoded/encrypted payloads). 🚫🔒

## Objective 🎯

Prevent non-human-readable files from slipping into pipelines or tests. The library flags
files that are likely binary, contain unusual control characters, or appear to be encoded
or encrypted text that isn't meant to be read directly. This keeps downstream tooling and
review processes clean and predictable. ✅

## Use Cases

- Detect accidental binary outputs in repositories and CI. 🧪
- Block files that hide encoded/encrypted content where plain text is expected. 🔐
- Serve as a pre-commit or CI gate to ensure only code are in the pipeline
, not access/secret keys or tokens or binary files. ⛔️➡️✅

## Usage

From Python:

```py
from text_only_scanner.detector import is_text_file, filter_text_files

print(is_text_file("somefile.txt"))

accepted, rejected = filter_text_files(["a.txt", "b.bin"])
print("accepted:", accepted)
print("rejected:", rejected)
```

Command-line (module):

```bash
python -m text_only_scanner.cli file1.txt file2.bin
# prints accepted files to stdout, rejected to stderr and exits non-zero if any rejected
```

Notes:

- The detector combines several heuristics: NUL bytes, control-character ratios, printable
 vs letter ratios, and Shannon entropy to identify suspicious files. It is conservative —
 intended to reduce false negatives while keeping false positives low. ⚖️

Recursive usage:

```bash
# Recurse into directories and check all files inside
python -m text_only_scanner.cli -r pass_folder fail_folder
```