十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊
量身定制 + 運營維護(hù)+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
這篇文章主要為大家展示了“python poetry怎么創(chuàng)建項目”,內(nèi)容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“python poetry怎么創(chuàng)建項目”這篇文章吧。
成都創(chuàng)新互聯(lián)公司-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價比陵川網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式陵川網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋陵川地區(qū)。費用合理售后完善,十多年實體公司更值得信賴。
1、可以通過命令poetrynew創(chuàng)建項目手腳架。
? poetry new example ? tree . └── example ├── example │ └── __init__.py ├── pyproject.toml ├── README.rst └── tests ├── __init__.py └── test_example.py 3 directories, 5 files
2、Poetry創(chuàng)建了example項目,生成了相應(yīng)的文件夾和pyproject.toml,包括項目信息。
在現(xiàn)有項目中,通過命令poetryinit進(jìn)行初始化。
? example poetry init This command will guide you through creating your pyproject.toml config. # 交互bash, 通過該交互bash填寫項目信息。 Package name [example]: example Version [0.1.0]: 0.0.8 Description []: example project Author [so1n, n to skip]: n License []: Compatible Python versions [^3.7]: Would you like to define your main dependencies interactively? (yes/no) [yes] no Would you like to define your development dependencies interactively? (yes/no) [yes] no Generated file # 填寫完項目信息后會生成以下內(nèi)容, 之后會在剛才的路徑創(chuàng)建pyproject.toml文件, 并寫入。 [tool.poetry] name = "example" version = "0.0.8" description = "example project" authors = ["Your Name "] [tool.poetry.dependencies] python = "^3.7" [tool.poetry.dev-dependencies] [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" Do you confirm generation? (yes/no) [yes] yes
以上是“python poetry怎么創(chuàng)建項目”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!