You can install the Real Python Feed Reader from PyPI:
pip install postman_collection_generation
You can call the function :
>>> from postman_collection_generation import generate_collection
>>> generate_collection(flask_app,name='collection file name',url_domain='localhost',port=5000,output_path = '.')