Metadata-Version: 2.4
Name: aimport
Version: 1.1.0
Summary: A minimal library for smart Python imports with automatic path resolution
Author: aimport contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/aimport/aimport
Project-URL: Repository, https://github.com/aimport/aimport
Project-URL: Bug Tracker, https://github.com/aimport/aimport/issues
Keywords: import,path,module,python,sys.path
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Filesystems
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest<8.4.0,>=7.0.0; extra == "dev"
Dynamic: license-file

# aimport

A minimal library for python: Adding support for smart imports

## Usage

```python
import aimport
```

This automatically adds relevant directories to `sys.path` based on `__aimport__` anchor files found in the directory tree.

## Features

- **Smart path resolution**: Automatically discovers project roots using `__aimport__` files
- **Fallback support**: Falls back to `__init__.py` files when no `__aimport__` files are found
- **Duplicate prevention**: Avoids adding duplicate paths to `sys.path`
- **Automatic execution**: Works immediately upon import

## Testing

The project includes comprehensive unit tests using pytest:

```bash
# Install development dependencies
uv sync --dev

# Run all tests
./test.sh

# Or run pytest directly
uv run pytest tests/ -v
```

### Test Coverage

- 23 comprehensive test cases
- Full coverage of all functions and edge cases
- Integration tests for complex directory structures
- Behavior-focused testing (not implementation details)

## Development

```bash
# Build distribution
python setup.py sdist

# Upload to PyPI
twine upload dist/*
```
