Metadata-Version: 2.4
Name: slopsquat-detector
Version: 0.3
Summary: A Python package that detects and warns against slopsquatted or suspicious import statements in code, helping developers avoid accidentally using malicious or mistyped packages suggested by LLMs or found in legacy code.
Author-email: Prashant Pandey <prashantpandeyiuet@gmail.com>
Project-URL: Homepage, https://github.com/prashantpandeygit/slopsquat
Project-URL: Documentation, https://github.com/prashantpandeygit/slopsquat#readme
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.1
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: requests-mock; extra == "test"
Dynamic: license-file


slopsquat-detector is a Python package that helps detect fake, incorrect, or suspicious Python package imports. These may come from typos, hallucinated names generated by AI LLMS and tools like ChatGPT or Copilot, or from packages designed to trick users.
This tool checks if the packages you are using actually exist on PyPI. If any package is missing, it flags it as potentially fake or unsafe. This can help prevent you from installing malicious or useless code.

## Why use it?
- Flags hallucinated imports generated by AI tools  
- Detects typos in package names  
- Catches fake or non-existent packages before installation  
- Protects against supply chain attacks and slopsquatting  
- Works with `.py` scripts, `requirements.txt` files, and `.ipynb` notebooks  

## How to install using pip
- Python 3.6 or higher
- pip (Python package installer)

### Installation
You can install slopsquat-detector using pip. Make sure you have Python and pip installed on your system.
pip install slopsquat-detector
This will install the `slopsquat` command-line tool on your system.

## How to install locally
To install the tool from source, first clone the repository:

git clone https://github.com/prashantpandeygit/slopsquat
cd slopsquat
Then install it using pip:
pip install .

## How to use
You can run slopsquat-detector from the terminal and give it a file to scan. Supported files include:
- `requirements.txt`
- Python files (`.py`)
- Jupyter notebooks (`.ipynb`)

### Examples
To check a requirements file:
slopsquat requirements.txt

To check a Python script:
slopsquat script.py

To check a notebook:
slopsquat notebook.ipynb

The tool will show which packages exist and which are missing from PyPI. Missing packages are likely typos, hallucinations, or slopsquats.

## License
This project is open source and licensed under the MIT License. See the LICENSE file for details.

## Author
Prashant Pandey  
Email: prashantpandeyiuet@gmail.com
