I'd like to do the same I can do with python3.6 -m http.server. I'd like to run my oneliner like that. How do I do this? For now I've got:
def run():
print('Great!')
if __name__ == '__main__':
run()
I tried python3.6 -m fastapi and I've got /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6: No module named test.__main__; 'test' is a package and cannot be directly executed,
and with python3.6 -m fastapi.run /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6: No module named test.run