How To - Convert a Single File¶
The converter works on a source root directory. To convert one file safely, use a minimal directory containing only that file (and any local modules it imports).
Single-file workflow¶
Assume you want to convert:
- source file:
./fastapi_project/app/main.py
1. Create a minimal source root¶
If main.py imports local modules, copy those modules too.
2. Run conversion against that minimal root¶
lilya-converter convert ./tmp-single-source ./tmp-single-target --report ./reports/convert-single.json