Metadata-Version: 2.3
Name: gen-reqs
Version: 0.1.0
Summary: A tool to automatically detect Python project dependencies and generate requirements.txt
Author-email: Jordan Richter <derquerbaer@gmail.com>
License: MIT License
        
        Copyright (c) 2024 [Your Name]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Python Dependencies Generator

A simple tool to automatically detect Python project dependencies and generate requirements.txt. It analyzes your Python files recursively, detects imports, and handles common package name mappings (like 'yaml' → 'PyYAML').

## Installation

```bash
pip install gen-reqs
```

## Usage

From the command line:
```bash
gen_reqs
```

This will:
1. Scan all Python files in the current directory and subdirectories
2. Detect third-party imports
3. Map import names to correct package names (e.g., 'yaml' → 'PyYAML')
4. Generate a requirements.txt file

## Features

- Recursive scanning of Python files
- Automatic detection of third-party imports
- Mapping of common import names to correct package names
- Filtering out standard library modules
- Detection of local modules (to exclude them)

## Common Package Mappings

The tool handles many common package name mappings, including:
- `yaml` → `PyYAML`
- `dotenv` → `python-dotenv`
- `PIL` → `Pillow`
- `sklearn` → `scikit-learn`
- And many more...

## As a Python Module

You can also use it in your Python code:

```python
from python_deps_generator import generate_requirements

# Generate requirements.txt in current directory
generate_requirements()

# Or specify a directory
generate_requirements("/path/to/project")
```

## License

This project is licensed under the MIT License - see the LICENSE file for details.