Skip to content

Commit 50c8fee

Browse files
add imported library usage to README (#56)
1 parent 0fb8503 commit 50c8fee

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,21 @@ Code2flow is internally powered by ASTs. Most limitations stem from a token not
124124
* If a function is renamed, either explicitly or by being passed around as a parameter, it will be skipped.
125125

126126

127+
As an imported library
128+
-----------------
129+
130+
You can work with code2flow as an imported Python library in much the same way as you work with it
131+
from the CLI.
132+
133+
```python
134+
import code2flow
135+
code2flow.code2flow(['path/to/filea', 'path/to/fileb'], 'path/to/outputfile')
136+
```
137+
138+
The keyword arguments to `code2flow.code2flow` are roughly the same as the CLI
139+
parameters. To see all available parameters, refer to the code2flow function in [engine.py](https://github.com/scottrogowski/code2flow/blob/master/code2flow/engine.py).
140+
141+
127142
How to contribute
128143
-----------------------
129144

0 commit comments

Comments
 (0)