问题
I found that python can use pyproject.toml to list dependencies instead of requirements.txt file. It's more convenient and is very similar to package.json for node.However, I could not find a documentation to init the pyproject.toml file much like the  npm init command. How to autogenerate the file with virtualenv or pip?
also, is there a way to autoupdate the toml file, as the packagaes get installed, much like npm --save tag, that saves the package to the package.json as its installed?
回答1:
Look at poetry. It can do it for you nicely. Actually I think its the only project that handles this already that I know of.
来源:https://stackoverflow.com/questions/60229063/how-to-init-the-pyproject-toml-file