mirror of
https://github.com/Kludex/awesome-fastapi-projects.git
synced 2025-03-29 17:06:41 +00:00
9 lines
240 B
Python
9 lines
240 B
Python
from typing import TextIO
|
|
|
|
|
|
def get_packages(file: TextIO):
|
|
for line in file.readlines():
|
|
clean_line = line.strip()
|
|
if clean_line.startswith(("from", "import")):
|
|
yield clean_line.replace(".", " ").split()[1]
|