Metadata-Version: 2.4
Name: cf-extractor
Version: 0.1.0
Summary: Python semantic data extractor for Context-Footprint (AST + Jedi)
Author: Context-Footprint
License: Apache-2.0
Project-URL: Homepage, https://github.com/AiricDev/context-footprint
Project-URL: Repository, https://github.com/AiricDev/context-footprint
Project-URL: Documentation, https://github.com/AiricDev/context-footprint/tree/main/extractors/python
Keywords: context-footprint,semantic,extractor,ast,jedi,python
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
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: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: jedi>=0.19.0
Requires-Dist: pydantic>=2.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"

# cf-extractor

Python semantic data extractor for [Context-Footprint](https://github.com/context-footprint/context-footprint). Outputs SemanticData JSON using **Python AST** + **Jedi**.

## As a dependency

This package is a dependency of `cftool`. When you install cftool via uv or pip, cf-extractor is installed automatically:

```bash
uv tool install cftool   # includes cf-extractor
```

## Standalone usage

You can also install and use cf-extractor directly:

```bash
# From PyPI (when published)
pip install cf-extractor

# From Git
uv pip install "cf-extractor @ git+https://github.com/context-footprint/context-footprint#subdirectory=extractors/python"

# Development
cd extractors/python
uv sync
```

Run the extractor:

```bash
cf-extract /path/to/python/project
# or
uv run cf-extract /path/to/python/project
# or
python -m cf_extractor.main /path/to/project
```

Without arguments, uses the current directory (`.`). Output is written to stdout (valid JSON for cftool).

## Tests

```bash
uv run pytest tests/ -v
```

## Requirements

- Python >= 3.9
- jedi, pydantic (installed automatically)
