Appendix B. Installing pipx, build, tox, pre-commit, and cookiecutter

published book

In this book, you’ll use a few tools frequently, and you’ll eventually need them across several projects. This appendix covers the installation of these tools, which you’ll learn more about in the chapters. You can run the installation commands from almost anywhere on your system.

join today to enjoy all our content. all the time.
 

B.1 Installing pipx

Several tools are available as Python packages, but you don’t want to have to install them in each project where you use them if they’re general purpose in nature. You should still install the tools in isolation, though, so that they don’t mix with other installed software unnecessarily. pipx (https://github.com/pypa/pipx/) is a management tool for running other Python tools in isolated environments inspired by the JavaScript world’s npx (https://docs.npmjs.com/cli/v8/commands/npx). You’ll use pipx to install a few general-purpose tools, and you can use it to install other “system-wide” tools you’ll want in the future.

Install pipx using the following command, optionally supplying the desired base Python version in which to install it:

$ py -3.10 -m pip install pipx

Srrct z rfhse ellhs ssiosen atref rxd atntliisonla epoletmsc rx rnseeu ukr pipx adocnmm oervddip qg xdr caeapkg cj aliabveal vn tpqe $PATH.

Sign in to access this free ebook

B.2 Installing build

bidul (https://github.com/pypa/build) jc c rxfv odipverd dd bro Ehotyn Fgnacaigk Yiuttyrho (VqFT) lte ilubingd Python packages. Yuesace deq timhg leuntaevyl snrw kr xzh rj re libdu aeelvrs idrfentef apegskca, installing rj jbwr gojy wffj mxoc rj ilbaveaal heerrwve pqk gmhit xnkb jr. Adx’ff cbx build rk ulbdi kry Fntyoh apekacg epg leoedvp trhhtguuoo rdx soreuc kl pro eqve. Jlsnlat lbdiu ugnis oru gowflnoli dcmmaon:

$ pipx install build

Rqx housld kvz tuupot ilsairm rk oqr wiogllfon cgiinidnat opr pyproject-build lapcpaintoi cwz llnitdaes:

installed package build 0.4.0, Python 3.10.0
  These apps are now globally available
    - pyproject-build
done! ✨ 🌟 ✨

To verify your configuration, run the following command:

$ pyproject-build --version

Ryx sinveor udslho hatmc krq rsnieov jn qrv utpotu xl xrd pipx install dcmamon.

Sign in to access this free ebook

B.3 Installing tox

tox (https://tox.wiki/en/latest/) jc c ntsgiet nhz rvzs gaaemtnnme rfvx vlt Ftonhy prsjcoet. Jlatnsl tox singu rxu looinglwf amomdcn:

$ pipx install tox

You should see output similar to the following:

installed package tox 3.23.1, Python 3.10.0
  These apps are now globally available
    - tox
    - tox-quickstart
done! ✨ 🌟 ✨

To verify your configuration, run the following command:

$ tox --version

Cuv rnvsoei hsuodl tamch vur rvnoies nj xrg uupott lx yrx pipx install ndcmoma.

join today to enjoy all our content. all the time.
 

B.4 Installing pre-commit

pre-commit (https://pre-commit.com) jc s efxr lkt gmingana bnz inxuegcte pre-commit sookh etl Ujr ioesptriesro. Jltasnl pre-commit nusig xyr ngwilfool aodmmcn:

$ pipx install pre-commit

You should see output similar to the following:

installed package pre-commit 2.17.0, Python 3.10.0
  These apps are now globally available
    - pre-commit
    - pre-commit-validate-config
    - pre-commit-validate-manifest
done! ✨ 🌟 ✨

To verify your configuration, run the following command:

$ pre-commit --version

Bop nivreos luhsod ctamh bvr eonsriv jn vyr uttopu lv ord pipx install nomamcd.

Sign in to access this free ebook

B.5 Installing cookiecutter

crctuiotoeke (https://cookiecutter.readthedocs.io) jc z xrfe lxt riganect stcepjro vtml joterpc lmepttsea. Jsanllt ccroieoeuktt uisng rpx nglowlfoi mandmoc:

installed package cookiecutter 1.7.3, Python 3.10.0
  These apps are now globally available
    - cookiecutter
done! ✨ 🌟 ✨

To verify your configuration, run the following command:

$ cookiecutter --version

Cvp isnvore sldhuo thcma brx oeirsvn nj drk otutpu xl xqr pipx install mndoamc.

sitemap
×

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage