Skip to content
Myr

Merge branch 'stable' into bugfix/OptionsAutoCompletion

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Saipraneeth · committed by GitHub · parents 7fc3771, 1c68e53 · Browse files · 114 files+6464 added−4394 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

114 files+6464 added−4394 removed

  • tests:+899 added−92 removed
  • other:+5565 added−4302 removed

114 files+6464 added−4394 removed

modified:.github/workflows/lock.yaml+1 added
modified:.github/workflows/pre-commit.yaml+16 added-7 removed
modified:.github/workflows/publish.yaml+15 added-43 removed
modified:.github/workflows/tests.yaml+20 added-21 removed
deleted:artwork/logo.svg-75 removed
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!-- Created with Inkscape (http://www.inkscape.org/) -->34<svg5 xmlns:dc="http://purl.org/dc/elements/1.1/"6 xmlns:cc="http://creativecommons.org/ns#"7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"8 xmlns:svg="http://www.w3.org/2000/svg"9 xmlns="http://www.w3.org/2000/svg"10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"12 width="237.36929"13 height="110.7928"14 id="svg4837"15 version="1.1"16 inkscape:version="0.48.2 r9819"17 sodipodi:docname="New document 8">18 <defs19 id="defs4839" />20 <sodipodi:namedview21 id="base"22 pagecolor="#ffffff"23 bordercolor="#666666"24 borderopacity="1.0"25 inkscape:pageopacity="0.0"26 inkscape:pageshadow="2"27 inkscape:zoom="0.98994949"28 inkscape:cx="259.76814"29 inkscape:cy="40.769955"30 inkscape:document-units="px"31 inkscape:current-layer="layer1"32 showgrid="false"33 fit-margin-top="10"34 fit-margin-left="10"35 fit-margin-right="10"36 fit-margin-bottom="10"37 inkscape:window-width="1676"38 inkscape:window-height="1006"39 inkscape:window-x="4"40 inkscape:window-y="0"41 inkscape:window-maximized="1" />42 <metadata43 id="metadata4842">44 <rdf:RDF>45 <cc:Work46 rdf:about="">47 <dc:format>image/svg+xml</dc:format>48 <dc:type49 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />50 <dc:title></dc:title>51 </cc:Work>52 </rdf:RDF>53 </metadata>54 <g55 inkscape:label="Layer 1"56 inkscape:groupmode="layer"57 id="layer1"58 transform="translate(-255.43458,-207.38101)">59 <path60 style="fill:#000000"61 d="m 466.33424,306.48462 0,-1.6892 3.16724,0 3.16723,0 0,1.6892 0,1.68919 -3.16723,0 -3.16724,0 0,-1.68919 z m -3.37839,-5.06759 0,-3.37839 1.47804,0 1.47805,0 0,3.37839 0,3.37839 -1.47805,0 -1.47804,0 0,-3.37839 z m 10.13516,0 0,-3.37839 1.47804,0 1.47805,0 0,3.37839 0,3.37839 -1.47805,0 -1.47804,0 0,-3.37839 z m -30.82778,-28.92744 0,-28.92744 1.68919,0 c 1.68919,0 1.68919,0 1.68919,1.68919 0,1.6892 0,1.6892 1.6892,1.6892 1.68919,0 1.68919,0 1.68919,1.68919 0,1.6892 0,1.6892 1.6892,1.6892 1.68919,0 1.68919,0 1.68919,1.68919 0,1.6892 0,1.6892 -1.68919,1.6892 -1.6892,0 -1.6892,0 -1.6892,-1.6892 0,-1.68919 0,-1.68919 -1.68919,-1.68919 l -1.6892,0 0,23.85986 0,23.85985 1.6892,0 c 1.68919,0 1.68919,0 1.68919,1.6892 l 0,1.68919 -3.37839,0 -3.37838,0 0,-28.92744 z m 7.00029,25.22951 c -0.13394,-0.13393 -0.24352,-0.87696 -0.24352,-1.65118 0,-1.36423 0.0529,-1.40766 1.71469,-1.40766 l 1.71468,0 -0.13106,1.58362 c -0.12024,1.45279 -0.24178,1.5892 -1.47117,1.65118 -0.73706,0.0372 -1.44968,-0.042 -1.58362,-0.17596 z m 10.14204,-0.0392 c -0.13814,-0.22352 -0.20454,-1.7545 -0.14756,-3.40219 l 0.10361,-2.99581 1.60373,0 1.60374,0 -0.12334,3.27282 -0.12334,3.27281 -1.33284,0.12938 c -0.73305,0.0712 -1.44586,-0.0535 -1.584,-0.27702 z m 10.30707,-3.03247 0,-3.36553 1.47803,0 1.47805,0 0,3.30997 0,3.30996 -1.47805,0.0556 -1.47803,0.0556 0,-3.36553 z m -17.03271,-0.26872 c -0.15484,-0.15483 -0.28153,-0.91497 -0.28153,-1.68919 0,-1.36073 0.0563,-1.40766 1.68919,-1.40766 1.6892,0 1.6892,0 1.6892,1.6892 0,1.63289 -0.0469,1.68919 -1.40766,1.68919 -0.77422,0 -1.53436,-0.12669 -1.6892,-0.28154 z m 3.09686,-4.99719 c 0,-1.44286 0.0402,-1.47804 1.68919,-1.47804 1.64898,0 1.68919,0.0352 1.68919,1.47804 0,1.44285 -0.0402,1.47805 -1.68919,1.47805 -1.64898,0 -1.68919,-0.0352 -1.68919,-1.47805 z m 10.55746,-1.68919 0,-3.16724 6.75677,0 6.75678,0 0,-1.68919 c 0,-1.64898 0.0351,-1.6892 1.47804,-1.6892 l 1.47804,0 0,3.15652 0,3.15651 -6.6512,0.1163 -6.65119,0.1163 -0.13108,1.58361 c -0.12394,1.49763 -0.20994,1.58363 -1.58361,1.58363 l -1.45255,0 0,-3.16724 z m 10.13516,-8.44597 c 0,-1.40766 0.0704,-1.47804 1.47804,-1.47804 1.40766,0 1.47805,0.0704 1.47805,1.47804 0,1.40766 -0.0704,1.47804 -1.47805,1.47804 -1.40766,0 -1.47804,-0.0704 -1.47804,-1.47804 z m -3.37839,-3.37839 c 0,-1.40766 0.0704,-1.47804 1.47804,-1.47804 1.40767,0 1.47805,0.0704 1.47805,1.47804 0,1.40767 -0.0704,1.47805 -1.47805,1.47805 -1.40765,0 -1.47804,-0.0704 -1.47804,-1.47805 z m -3.37838,-3.37839 c 0,-1.40765 0.0704,-1.47804 1.47803,-1.47804 1.40767,0 1.47805,0.0704 1.47805,1.47804 0,1.40767 -0.0704,1.47805 -1.47805,1.47805 -1.40765,0 -1.47803,-0.0704 -1.47803,-1.47805 z m -3.37839,-3.48871 c 0,-1.52897 0.0553,-1.58931 1.47804,-1.61346 1.43567,-0.0244 1.47804,0.0211 1.47804,1.58838 0,1.56241 -0.0467,1.61345 -1.47804,1.61345 -1.42721,0 -1.47804,-0.0546 -1.47804,-1.58837 z m -3.37839,-3.47921 c 0,-1.64897 0.0351,-1.68919 1.47804,-1.68919 1.44285,0 1.47805,0.0402 1.47805,1.68919 0,1.64898 -0.0352,1.6892 -1.47805,1.6892 -1.44285,0 -1.47804,-0.0403 -1.47804,-1.6892 z m -3.45076,-3.37839 c 0.15328,-1.60738 0.23052,-1.68919 1.59478,-1.68919 1.3911,0 1.43368,0.0502 1.43368,1.68919 0,1.67253 -0.0157,1.6892 -1.59478,1.6892 l -1.59477,0 0.16109,-1.6892 z m -3.30601,-3.37838 c 0,-1.64898 0.0351,-1.6892 1.47804,-1.6892 1.44285,0 1.47804,0.0402 1.47804,1.6892 0,1.64897 -0.0352,1.68919 -1.47804,1.68919 -1.44286,0 -1.47804,-0.0402 -1.47804,-1.68919 z m -3.72061,-3.27282 c 0.12395,-1.49762 0.21706,-1.59073 1.71468,-1.71468 l 1.58363,-0.13107 0,1.71469 0,1.71468 -1.71469,0 -1.71468,0 0.13106,-1.58362 z"62 id="path4856"63 inkscape:connector-curvature="0" />64 <path65 style="fill:#000000"66 d="m 271.34527,247.46047 c 0,-1.32826 -0.94153,-2.12734 -3.05297,-2.59109 -4.04056,-0.88746 -3.19986,-3.08429 1.01754,-2.65894 9.32239,0.94022 10.81407,-3.50307 2.60795,-7.76831 -2.71012,-1.40862 -5.36388,-3.27897 -5.89726,-4.15634 -1.47604,-2.42802 -0.0246,-6.42458 2.80076,-7.7119 1.48697,-0.67751 2.52398,-1.98054 2.52398,-3.17144 0,-1.13017 0.66136,-2.02144 1.5,-2.02144 0.825,0 1.5,0.85122 1.5,1.89159 0,1.19765 0.94321,2.12832 2.57104,2.53688 3.91591,0.98283 2.39946,3.10499 -1.95093,2.73019 -6.99788,-0.60291 -8.93527,3.8291 -2.87011,6.5657 9.0905,4.10163 11.015,9.73021 4.5,13.16112 -1.2375,0.65169 -2.25,2.06905 -2.25,3.1497 0,1.08065 -0.675,1.96482 -1.5,1.96482 -0.825,0 -1.5,-0.86425 -1.5,-1.92054 z m 38.357,-3.07104 c -4.57947,-1.84804 -6.77791,-8.48491 -4.32736,-13.06381 2.11183,-3.94599 10.30093,-6.28597 13.9414,-3.98367 2.2687,1.43477 0.36183,2.48777 -3.94232,2.177 -6.96682,-0.50302 -10.61631,6.27447 -5.91184,10.97894 1.71218,1.71218 2.95483,2.02243 6.5,1.62284 3.13626,-0.35351 4.38312,-0.13272 4.38312,0.77613 0,2.4062 -6.21813,3.27822 -10.643,1.49257 z m 21.1997,-1.23093 c -1.16379,-1.66155 -1.5567,-4.81653 -1.5567,-12.5 l 0,-10.27749 -2.5,0 c -1.55556,0 -2.5,-0.56667 -2.5,-1.5 0,-1.08333 1.11111,-1.5 4,-1.5 l 4,0 0.0153,11.25 c 0.008,6.1875 0.41056,11.87411 0.89363,12.63691 0.54214,0.85607 1.88505,1.19446 3.50856,0.88411 2.94677,-0.56331 4.58181,0.98192 2.46061,2.32547 -2.5829,1.63598 -6.70984,0.98184 -8.32141,-1.319 z m 20.4433,0.22251 c -1.55556,-1.55556 -2,-3.33333 -2,-8 0,-5.73333 -0.11111,-6 -2.5,-6 -1.55556,0 -2.5,-0.56667 -2.5,-1.5 0,-1.08333 1.11111,-1.5 4,-1.5 l 4,0 0.0153,6.75 c 0.0183,8.04891 0.82623,9.70461 4.40219,9.02102 2.94677,-0.56331 4.58181,0.98192 2.46061,2.32547 -2.3358,1.47948 -5.78176,0.99986 -7.87811,-1.09649 z m 18.357,1.00842 c -4.57947,-1.84804 -6.77791,-8.48491 -4.32736,-13.06381 2.11183,-3.94599 10.30093,-6.28597 13.9414,-3.98367 2.2687,1.43477 0.36183,2.48777 -3.94232,2.177 -6.96682,-0.50302 -10.61631,6.27447 -5.91184,10.97894 1.71218,1.71218 2.95483,2.02243 6.5,1.62284 3.13626,-0.35351 4.38312,-0.13272 4.38312,0.77613 0,2.4062 -6.21813,3.27822 -10.643,1.49257 z m 15.86478,-12.67646 c 0.20032,-9.84119 0.6282,-13.78431 1.52822,-14.08333 0.9358,-0.31091 1.25628,1.80502 1.275,8.41804 l 0.025,8.83333 4.01111,-4.25 c 2.32594,-2.46446 4.92367,-4.25 6.18321,-4.25 1.8968,0 1.6121,0.57059 -2.24643,4.50214 l -4.41851,4.50213 4.92271,4.99787 c 3.84161,3.90023 4.49929,4.99786 2.99467,4.99786 -1.06044,0 -4.08102,-2.12058 -6.71241,-4.71241 l -4.78435,-4.71241 0,4.71241 c 0,3.56082 -0.37346,4.71241 -1.52822,4.71241 -1.30999,0 -1.48849,-1.95179 -1.25,-13.66804 z m -37.85759,-9.82527 c -0.34636,-0.90262 -0.15025,-2.12063 0.43581,-2.70669 1.52361,-1.52361 4.41041,-0.13109 4.01242,1.93549 -0.4433,2.30188 -3.64766,2.85743 -4.44823,0.7712 z"67 id="path4887"68 inkscape:connector-curvature="0" />69 <path70 style="fill:#000000;fill-opacity:1;stroke:none"71 d="m 411.32164,243.39982 c 7.38153,0.15924 14.76525,0.0821 22.14736,0.0136 -3.6814,3.83663 -9.42739,1.45689 -14.06576,2.07921 -3.69684,-0.007 -7.3939,0.0151 -11.09,0.0923 1.0029,-0.72825 2.00505,-1.45754 3.0084,-2.18514 z"72 id="path4889"73 inkscape:connector-curvature="0" />74 </g>75</svg>
deleted:docs/_static/click-icon.pngbinary

A binary file, deleted.

added:docs/_static/click-icon.svg+11 added
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<svg width="100%" height="100%" viewBox="0 0 500 500" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">4 <rect id="Icon" x="0" y="0" width="500" height="500" style="fill:none;"/>5 <g>6 <path d="M448.569,446.761l-66.389,49.07c-3.528,2.565 -8.018,4.169 -12.508,4.169l-136.626,-0c-19.243,-0 -28.223,-23.733 -14.112,-36.562l54.843,-49.07c3.849,-3.528 8.66,-5.452 14.112,-5.452l147.851,-0c20.526,-0 28.865,25.657 12.829,37.845Z" style="fill:#5c549e;fill-rule:nonzero;"/>7 <path d="M192.956,406.03l-91.404,84.028c-6.415,6.414 -15.074,9.942 -23.734,9.942c-8.659,-0 -17.318,-3.528 -23.733,-9.942c-13.47,-13.47 -13.47,-34.317 0,-47.467l32.713,-36.561l106.158,-0Z" style="fill:#5c549e;fill-rule:nonzero;"/>8 <path d="M328.299,216.485l-113.855,-102.309l-109.685,-0l124.118,135.343l-124.118,135.343l108.723,-0.321l114.817,-101.988c8.66,-9.301 13.15,-21.167 12.829,-33.355c0.321,-11.225 -4.169,-23.412 -12.829,-32.713Z" style="fill:#5c549e;fill-rule:nonzero;"/>9 <path d="M191.994,93.97l-91.405,-84.028c-6.414,-6.414 -15.073,-9.942 -23.733,-9.942c-8.659,0 -17.319,3.528 -23.733,9.942c-13.47,13.47 -13.47,34.317 0,47.467l33.034,36.561l105.837,0Z" style="fill:#5c549e;fill-rule:nonzero;"/>10 </g>11</svg>
deleted:docs/_static/click-logo-sidebar.pngbinary

A binary file, deleted.

deleted:docs/_static/click-logo.pngbinary

A binary file, deleted.

added:docs/_static/click-logo.svg+18 added
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<svg width="100%" height="100%" viewBox="0 0 500 500" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">4 <rect id="Logo" x="0" y="0" width="500" height="500" style="fill:none;"/>5 <g>6 <path id="Box" d="M500,50l0,400c0,27.596 -22.404,50 -50,50l-400,0c-27.596,0 -50,-22.404 -50,-50l0,-400c0,-27.596 22.404,-50 50,-50l400,0c27.596,0 50,22.404 50,50Z" style="fill:url(#_Linear1);"/>7 <path id="Shadow" d="M500,432.911l0,17.089c0,27.596 -22.404,50 -50,50l-211.576,0l-105.636,-105.637c3.812,3.641 8.857,5.637 13.903,5.637c5.196,0 10.391,-2.117 14.24,-5.965l54.843,-50.417l-40.218,-0l-12.701,-12.701l65.234,-0.192l68.891,-61.193c5.195,-5.581 7.889,-12.701 7.697,-20.013c0.192,-6.735 -2.502,-14.048 -7.697,-19.628l203.02,203.02Zm-284.804,-276.529l12.124,12.123l-63.503,0l-12.123,-12.123l63.502,0Zm153.945,211.674c9.622,-7.312 4.619,-22.706 -7.697,-22.706l-88.711,-0c-3.271,-0 -6.157,1.154 -8.467,3.271l-32.905,29.442c-8.467,7.697 -3.079,21.937 8.467,21.937l81.975,0c2.694,0 5.388,-0.962 7.505,-2.502l39.833,-29.442Z" style="fill:#493e5e;"/>8 <g id="Icon">9 <path d="M369.141,368.056l-39.833,29.442c-2.117,1.54 -4.811,2.502 -7.505,2.502l-81.975,0c-11.546,0 -16.934,-14.24 -8.467,-21.937l32.905,-29.442c2.31,-2.117 5.196,-3.271 8.467,-3.271l88.711,-0c12.316,-0 17.319,15.394 7.697,22.706Z" style="fill:#fff;fill-rule:nonzero;"/>10 <path d="M215.774,343.618l-54.843,50.417c-3.849,3.848 -9.044,5.965 -14.24,5.965c-5.196,0 -10.391,-2.117 -14.24,-5.965c-8.082,-8.082 -8.082,-20.59 0,-28.48l19.628,-21.937l63.695,-0Z" style="fill:#fff;fill-rule:nonzero;"/>11 <path d="M296.98,229.891l-68.313,-61.386l-65.812,0l74.471,81.206l-74.471,81.206l65.234,-0.192l68.891,-61.193c5.195,-5.581 7.889,-12.701 7.697,-20.013c0.192,-6.735 -2.502,-14.048 -7.697,-19.628Z" style="fill:#fff;fill-rule:nonzero;"/>12 <path d="M215.196,156.382l-54.842,-50.417c-3.849,-3.848 -9.045,-5.965 -14.24,-5.965c-5.196,0 -10.392,2.117 -14.24,5.965c-8.082,8.082 -8.082,20.59 -0,28.48l19.82,21.937l63.502,0Z" style="fill:#fff;fill-rule:nonzero;"/>13 </g>14 </g>15 <defs>16 <linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(3.06162e-14,500,-500,3.06162e-14,267.59,0)"><stop offset="0" style="stop-color:#d8a9ca;stop-opacity:1"/><stop offset="1" style="stop-color:#53519b;stop-opacity:1"/></linearGradient>17 </defs>18</svg>
added:docs/_static/click-name.svg+24 added
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">3<svg width="100%" height="100%" viewBox="0 0 679 300" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">4 <g>5 <path id="Name" d="M410.6,166.725l19.35,0c0,13.6 -3.4,24.05 -10.2,31.35c-6.8,7.3 -16.4,10.95 -28.8,10.95c-27.3,0 -40.95,-16.05 -40.95,-48.15l0,-9c0,-25.3 7,-41.15 21,-47.55c5.5,-2.6 12.15,-3.9 19.95,-3.9c11.4,0 20.675,3.125 27.825,9.375c7.15,6.25 10.725,15.275 10.725,27.075l-19.5,0c-1.1,-5.9 -3.05,-10.35 -5.85,-13.35c-2.8,-3 -7.2,-4.5 -13.2,-4.5c-7,0 -12.2,2.2 -15.6,6.6c-2.4,3.1 -3.8,8.4 -4.2,15.9c-0.2,2.4 -0.3,5.65 -0.3,9.75l0,9.3c0,11.5 1.6,19.35 4.8,23.55c3.3,4.2 8.425,6.3 15.375,6.3c6.95,0 11.75,-1.925 14.4,-5.775c2.65,-3.85 4.375,-9.825 5.175,-17.925Z" style="fill-rule:nonzero;"/>6 <path d="M464.9,208.125l-19.5,0.15l0,-112.95l19.5,0l0,112.8Z" style="fill-rule:nonzero;"/>7 <path d="M495.8,89.775c4.7,0 7.75,0.725 9.15,2.175c1.4,1.45 2.1,4.5 2.1,9.15c0,4.65 -0.725,7.7 -2.175,9.15c-1.45,1.45 -4.5,2.175 -9.15,2.175c-4.65,0 -7.7,-0.75 -9.15,-2.25c-1.45,-1.5 -2.175,-4.55 -2.175,-9.15c0,-4.6 0.725,-7.625 2.175,-9.075c1.45,-1.45 4.525,-2.175 9.225,-2.175Zm9.6,118.35l-19.5,0l0,-82.5l19.5,0l0,82.5Z" style="fill-rule:nonzero;"/>8 <path d="M570.95,176.775l17.7,-0.15c-0.1,0.8 -0.2,2.25 -0.3,4.35c-0.1,2.1 -0.175,3.525 -0.225,4.275c-0.05,0.75 -0.175,1.925 -0.375,3.525c-0.2,1.6 -0.425,2.775 -0.675,3.525c-0.25,0.75 -0.575,1.725 -0.975,2.925c-1.8,5.2 -6.7,9.3 -14.7,12.3c-5.1,1.8 -10.425,2.7 -15.975,2.7c-5.55,-0 -10.575,-0.9 -15.075,-2.7c-4.5,-1.8 -8.05,-4.1 -10.65,-6.9c-5.9,-6.2 -8.85,-17.825 -8.85,-34.875c0,-17.05 2.95,-28.675 8.85,-34.875c2.6,-2.8 6.15,-5.1 10.65,-6.9c4.5,-1.8 9.5,-2.7 15,-2.7c10.8,0 19,2.7 24.6,8.1c5.6,5.4 8.4,12.9 8.4,22.5l-17.7,0c0,-4.4 -1.1,-7.675 -3.3,-9.825c-2.2,-2.15 -6.275,-3.225 -12.225,-3.225c-5.95,-0 -9.9,1.85 -11.85,5.55c-1.95,3.7 -2.925,9.25 -2.925,16.65l0,7.8c0,11.9 2.3,19.2 6.9,21.9c2.1,1.3 4.85,1.95 8.25,1.95c3.4,-0 6.175,-0.325 8.325,-0.975c2.15,-0.65 3.7,-1.775 4.65,-3.375c0.95,-1.6 1.575,-3.175 1.875,-4.725c0.3,-1.55 0.5,-3.825 0.6,-6.825Z" style="fill-rule:nonzero;"/>9 <path d="M678.65,208.125l-23.4,0l-22.5,-30.3l-8.55,12.15l0,18.15l-19.5,0l0,-112.8l19.5,0l0,71.25l27.3,-40.65l22.05,0l-28.05,38.4l33.15,43.8Z" style="fill-rule:nonzero;"/>10 <g id="Logo">11 <path id="Box" d="M300,30l0,240c0,16.557 -13.443,30 -30,30l-240,-0c-16.557,-0 -30,-13.443 -30,-30l0,-240c0,-16.557 13.443,-30 30,-30l240,0c16.557,0 30,13.443 30,30Z" style="fill:url(#_Linear1);"/>12 <path id="Shadow" d="M300,259.747l0,10.253c0,16.557 -13.443,30 -30,30l-126.946,-0l-63.381,-63.382c2.287,2.184 5.314,3.382 8.342,3.382c3.117,0 6.234,-1.27 8.544,-3.579l32.905,-30.25l-24.131,-0l-7.62,-7.621l39.141,-0.115l41.334,-36.716c3.117,-3.348 4.734,-7.62 4.618,-12.008c0.116,-4.041 -1.501,-8.428 -4.618,-11.776l121.812,121.812Zm-170.882,-165.918l7.274,7.274l-38.102,0l-7.273,-7.274l38.101,0Zm92.367,127.005c5.773,-4.388 2.771,-13.624 -4.619,-13.624l-53.226,-0c-1.963,-0 -3.695,0.693 -5.08,1.963l-19.744,17.665c-5.08,4.618 -1.847,13.162 5.081,13.162l49.185,0c1.616,0 3.233,-0.577 4.503,-1.501l23.9,-17.665Z" style="fill:#493e5e;"/>13 <g id="Icon">14 <path d="M221.485,220.834l-23.9,17.665c-1.27,0.924 -2.887,1.501 -4.503,1.501l-49.185,0c-6.928,0 -10.161,-8.544 -5.081,-13.162l19.744,-17.665c1.385,-1.27 3.117,-1.963 5.08,-1.963l53.226,-0c7.39,-0 10.392,9.236 4.619,13.624Z" style="fill:#fff;fill-rule:nonzero;"/>15 <path d="M129.464,206.171l-32.905,30.25c-2.31,2.309 -5.427,3.579 -8.544,3.579c-3.118,0 -6.235,-1.27 -8.544,-3.579c-4.85,-4.849 -4.85,-12.354 -0,-17.088l11.776,-13.162l38.217,-0Z" style="fill:#fff;fill-rule:nonzero;"/>16 <path d="M178.188,137.935l-40.988,-36.832l-39.487,0l44.683,48.724l-44.683,48.723l39.141,-0.115l41.334,-36.716c3.117,-3.348 4.734,-7.62 4.618,-12.008c0.116,-4.041 -1.501,-8.428 -4.618,-11.776Z" style="fill:#fff;fill-rule:nonzero;"/>17 <path d="M129.118,93.829l-32.906,-30.25c-2.309,-2.309 -5.426,-3.579 -8.544,-3.579c-3.117,0 -6.235,1.27 -8.544,3.579c-4.849,4.849 -4.849,12.354 0,17.088l11.893,13.162l38.101,0Z" style="fill:#fff;fill-rule:nonzero;"/>18 </g>19 </g>20 </g>21 <defs>22 <linearGradient id="_Linear1" x1="0" y1="0" x2="1" y2="0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.83697e-14,300,-300,1.83697e-14,160.554,0)"><stop offset="0" style="stop-color:#d8a9ca;stop-opacity:1"/><stop offset="1" style="stop-color:#53519b;stop-opacity:1"/></linearGradient>23 </defs>24</svg>
modified:docs/advanced.rst+81 added-174 removed
1 unmodified line
2=================34.. currentmodule:: click56In addition to common functionality that is implemented in the library7itself, there are countless patterns that can be implemented by extending8Click. This page should give some insight into what can be accomplished.6In addition to common functionality, Click offers some advanced features.78.. contents::9 :depth: 110 :local:1111.. _aliases:12Callbacks and Eager Options13---------------------------1413Command Aliases14---------------15Sometimes, you want a parameter to completely change the execution flow.16For instance, this is the case when you want to have a ``--version``17parameter that prints out the version and then exits the application.1816Many tools support aliases for commands. For example, you can configure17``git`` to accept ``git ci`` as alias for ``git commit``. Other tools also18support auto-discovery for aliases by automatically shortening them.19Note: an actual implementation of a ``--version`` parameter that is20reusable is available in Click as :func:`click.version_option`. The code21here is merely an example of how to implement such a flag.2220It's possible to customize :class:`Group` to provide this functionality. As21explained in :ref:`custom-groups`, a group provides two methods:22:meth:`~Group.list_commands` and :meth:`~Group.get_command`. In this particular23case, you only need to override the latter as you generally don't want to24enumerate the aliases on the help page in order to avoid confusion.23In such cases, you need two concepts: eager parameters and a callback. An24eager parameter is a parameter that is handled before others, and a25callback is what executes after the parameter is handled. The eagerness26is necessary so that an earlier required parameter does not produce an27error message. For instance, if ``--version`` was not eager and a28parameter ``--foo`` was required and defined before, you would need to29specify it for ``--version`` to work. For more information, see30:ref:`callback-evaluation-order`.3126The following example implements a subclass of :class:`Group` that accepts a27prefix for a command. If there was a command called ``push``, it would accept28``pus`` as an alias (so long as it was unique):32A callback is a function that is invoked with three parameters: the33current :class:`Context`, the current :class:`Parameter`, and the value.34The context provides some useful features such as quitting the35application and gives access to other already processed parameters.3637Here's an example for a ``--version`` flag:3839.. click:example::4032 class AliasedGroup(click.Group):33 def get_command(self, ctx, cmd_name):34 rv = super().get_command(ctx, cmd_name)41 def print_version(ctx, param, value):42 if not value or ctx.resilient_parsing:43 return44 click.echo('Version 1.0')45 ctx.exit()4636 if rv is not None:37 return rv47 @click.command()48 @click.option('--version', is_flag=True, callback=print_version,49 expose_value=False, is_eager=True)50 def hello():51 click.echo('Hello World!')5239 matches = [40 x for x in self.list_commands(ctx)41 if x.startswith(cmd_name)42 ]53The `expose_value` parameter prevents the pretty pointless ``version``54parameter from being passed to the callback. If that was not specified, a55boolean would be passed to the `hello` script. The `resilient_parsing`56flag is applied to the context if Click wants to parse the command line57without any destructive behavior that would change the execution flow. In58this case, because we would exit the program, we instead do nothing.5944 if not matches:45 return None60What it looks like:6147 if len(matches) == 1:48 return click.Group.get_command(self, ctx, matches[0])62.. click:run::6350 ctx.fail(f"Too many matches: {', '.join(sorted(matches))}")64 invoke(hello)65 invoke(hello, args=['--version'])6652 def resolve_command(self, ctx, args):53 # always return the full command name54 _, cmd, args = super().resolve_command(ctx, args)55 return cmd.name, cmd, args67Callbacks for Validation68------------------------6957It can be used like this:70.. versionchanged:: 2.07159.. click:example::72If you want to apply custom validation logic, you can do this in the73parameter callbacks. These callbacks can both modify values as well as74raise errors if the validation does not work. The callback runs after75type conversion. It is called for all sources, including prompts.7661 @click.group(cls=AliasedGroup)62 def cli():63 pass77In Click 1.0, you can only raise the :exc:`UsageError` but starting with78Click 2.0, you can also raise the :exc:`BadParameter` error, which has the79added advantage that it will automatically format the error message to80also contain the parameter name.8165 @cli.command66 def push():67 pass82.. click:example::8369 @cli.command70 def pop():71 pass84 def validate_rolls(ctx, param, value):85 if isinstance(value, tuple):86 return value8773See the `alias example`_ in Click's repository for another example.88 try:89 rolls, _, dice = value.partition("d")90 return int(dice), int(rolls)91 except ValueError:92 raise click.BadParameter("format must be 'NdM'")9375.. _alias example: https://github.com/pallets/click/tree/main/examples/aliases94 @click.command()95 @click.option(96 "--rolls", type=click.UNPROCESSED, callback=validate_rolls,97 default="1d6", prompt=True,98 )99 def roll(rolls):100 sides, times = rolls101 click.echo(f"Rolling a {sides}-sided dice {times} time(s)")102103.. click:run::104105 invoke(roll, args=["--rolls=42"])106 println()107 invoke(roll, args=["--rolls=2d12"])108 println()109 invoke(roll, input=["42", "2d12"])110111Parameter Modifications112-----------------------113114Parameters (options and arguments) are forwarded to the command callbacks
115 unmodified lines
230231 invoke(cli, prog_name='cli', args=['dist'])232233201.. _callback-evaluation-order:234203Callback Evaluation Order204-------------------------205206Click works a bit differently than some other command line parsers in that207it attempts to reconcile the order of arguments as defined by the208programmer with the order of arguments as defined by the user before209invoking any callbacks.210211This is an important concept to understand when porting complex212patterns to Click from optparse or other systems. A parameter213callback invocation in optparse happens as part of the parsing step,214whereas a callback invocation in Click happens after the parsing.215216The main difference is that in optparse, callbacks are invoked with the raw217value as it happens, whereas a callback in Click is invoked after the218value has been fully converted.219220Generally, the order of invocation is driven by the order in which the user221provides the arguments to the script; if there is an option called ``--foo``222and an option called ``--bar`` and the user calls it as ``--bar223--foo``, then the callback for ``bar`` will fire before the one for ``foo``.224225There are three exceptions to this rule which are important to know:226227Eagerness:228 An option can be set to be "eager". All eager parameters are229 evaluated before all non-eager parameters, but again in the order as230 they were provided on the command line by the user.231232 This is important for parameters that execute and exit like ``--help``233 and ``--version``. Both are eager parameters, but whatever parameter234 comes first on the command line will win and exit the program.235236Repeated parameters:237 If an option or argument is split up on the command line into multiple238 places because it is repeated -- for instance, ``--exclude foo --include239 baz --exclude bar`` -- the callback will fire based on the position of240 the first option. In this case, the callback will fire for241 ``exclude`` and it will be passed both options (``foo`` and242 ``bar``), then the callback for ``include`` will fire with ``baz``243 only.244245 Note that even if a parameter does not allow multiple versions, Click246 will still accept the position of the first, but it will ignore every247 value except the last. The reason for this is to allow composability248 through shell aliases that set defaults.249250Missing parameters:251 If a parameter is not defined on the command line, the callback will252 still fire. This is different from how it works in optparse where253 undefined values do not fire the callback. Missing parameters fire254 their callbacks at the very end which makes it possible for them to255 default to values from a parameter that came before.256257Most of the time you do not need to be concerned about any of this,258but it is important to know how it works for some advanced cases.259235.. _forwarding-unknown-options:236237Forwarding Unknown Options238--------------------------
88 unmodified lines
327everything below a subcommand be forwarded to another application than to328handle some arguments yourself.329330356Global Context Access357---------------------358359.. versionadded:: 5.0360361Starting with Click 5.0 it is possible to access the current context from362anywhere within the same thread through the use of the363:func:`get_current_context` function which returns it. This is primarily364useful for accessing the context bound object as well as some flags that365are stored on it to customize the runtime behavior. For instance the366:func:`echo` function does this to infer the default value of the `color`367flag.368369Example usage::370371 def get_current_command_name():372 return click.get_current_context().info_name373374It should be noted that this only works within the current thread. If you375spawn additional threads then those threads will not have the ability to376refer to the current context. If you want to give another thread the377ability to refer to this context you need to use the context within the378thread as a context manager::379380 def spawn_thread(ctx, func):381 def wrapper():382 with ctx:383 func()384 t = threading.Thread(target=wrapper)385 t.start()386 return t387388Now the thread function can access the context like the main thread would389do. However if you do use this for threading you need to be very careful390as the vast majority of the context is not thread safe! You are only391allowed to read from the context, but not to perform any modifications on392it.393394395Detecting the Source of a Parameter396-----------------------------------397398In some situations it's helpful to understand whether or not an option399or parameter came from the command line, the environment, the default400value, or :attr:`Context.default_map`. The401:meth:`Context.get_parameter_source` method can be used to find this402out. It will return a member of the :class:`~click.core.ParameterSource`403enum.404405.. click:example::406407 @click.command()408 @click.argument('port', nargs=1, default=8080, envvar="PORT")409 @click.pass_context410 def cli(ctx, port):411 source = ctx.get_parameter_source("port")412 click.echo(f"Port came from {source.name}")413414.. click:run::415416 invoke(cli, prog_name='cli', args=['8080'])417 println()418 invoke(cli, prog_name='cli', args=[], env={"PORT": "8080"})419 println()420 invoke(cli, prog_name='cli', args=[])421 println()422423331Managing Resources332------------------333334It can be useful to open a resource in a group, to be made available to
74 unmodified lines
modified:docs/api.rst+7 added
4 unmodified lines
56This part of the documentation lists the full API reference of all public7classes and functions.89.. contents::10 :depth: 111 :local:1213Decorators14----------1516.. autofunction:: command
99 unmodified lines
116.. autoclass:: click.core.ParameterSource117 :members:118 :member-order: bysource119120.. _click-api-types:121122Types123-----124
77 unmodified lines
202203.. autofunction:: add_completion_class204205206.. _testing:207208Testing209-------210211.. currentmodule:: click.testing
6 unmodified lines
modified:docs/arguments.rst+63 added-171 removed
3 unmodified lines
4=========56.. currentmodule:: click78Arguments work similarly to :ref:`options <options>` but are positional.9They also only support a subset of the features of options due to their10syntactical nature. Click will also not attempt to document arguments for11you and wants you to :ref:`document them manually <documenting-arguments>`12in order to avoid ugly help pages.8Arguments are:910* Are positional in nature.11* Similar to a limited version of :ref:`options <options>` that can take an arbitrary number of inputs12* :ref:`Documented manually <documenting-arguments>`.1314Useful and often used kwargs are:1516* ``default``: Passes a default.17* ``nargs``: Sets the number of arguments. Set to -1 to take an arbitrary number.1819Basic Arguments20---------------2117The most basic option is a simple string argument of one value. If no18type is provided, the type of the default value is used, and if no default19value is provided, the type is assumed to be :data:`STRING`.22A minimal :class:`click.Argument` solely takes one string argument: the name of the argument. This will assume the argument is required, has no default, and is of the type ``str``.2324Example:2526.. click:example::2728 @click.command()29 @click.argument('filename')27 def touch(filename):30 def touch(filename: str):31 """Print FILENAME."""32 click.echo(filename)3331And what it looks like:34And from the command line:3536.. click:run::3738 invoke(touch, args=['foo.txt'])3937Variadic Arguments38------------------4040The second most common version is variadic arguments where a specific (or41unlimited) number of arguments is accepted. This can be controlled with42the ``nargs`` parameter. If it is set to ``-1``, then an unlimited number43of arguments is accepted.41An argument may be assigned a :ref:`parameter type <parameter-types>`. If no type is provided, the type of the default value is used. If no default value is provided, the type is assumed to be :data:`STRING`.4245The value is then passed as a tuple. Note that only one argument can be46set to ``nargs=-1``, as it will eat up all arguments.43.. admonition:: Note on Required Arguments4448Example:45 It is possible to make an argument required by setting ``required=True``. It is not recommended since we think command line tools should gracefully degrade into becoming no ops. We think this because command line tools are often invoked with wildcard inputs and they should not error out if the wildcard is empty.4647Multiple Arguments48-----------------------------------4950To set the number of argument use the ``nargs`` kwarg. It can be set to any positive integer and -1. Setting it to -1, makes the number of arguments arbitrary (which is called variadic) and can only be used once. The arguments are then packed as a tuple and passed to the function.5152.. click:example::5354 @click.command()53 @click.argument('src', nargs=-1)54 @click.argument('dst', nargs=1)55 def copy(src, dst):55 @click.argument('src', nargs=1)56 @click.argument('dsts', nargs=-1)57 def copy(src: str, dsts: tuple[str, ...]):58 """Move file SRC to DST."""57 for fn in src:58 click.echo(f"move {fn} to folder {dst}")59 for destination in dsts:60 click.echo(f"Copy {src} to folder {destination}")6160And what it looks like:62And from the command line:6364.. click:run::6564 invoke(copy, args=['foo.txt', 'bar.txt', 'my_folder'])66 invoke(copy, args=['foo.txt', 'usr/david/foo.txt', 'usr/mitsuko/foo.txt'])6766Note that this is not how you would write this application. The reason67for this is that in this particular example the arguments are defined as68strings. Filenames, however, are not strings! They might be on certain69operating systems, but not necessarily on all. For better ways to write70this, see the next sections.68.. admonition:: Note on Handling Files6972.. admonition:: Note on Non-Empty Variadic Arguments70 This is not how you should handle files and files paths. This merely used as a simple example. See :ref:`handling-files` to learn more about how to handle files in parameters.7174 If you come from ``argparse``, you might be missing support for setting75 ``nargs`` to ``+`` to indicate that at least one argument is required.72Argument Escape Sequences73---------------------------7477 This is supported by setting ``required=True``. However, this should78 not be used if you can avoid it as we believe scripts should gracefully79 degrade into becoming noops if a variadic argument is empty. The80 reason for this is that very often, scripts are invoked with wildcard81 inputs from the command line and they should not error out if the82 wildcard is empty.75If you want to process arguments that look like options, like a file named ``-foo.txt`` or ``--foo.txt`` , you must pass the ``--`` separator first. After you pass the ``--``, you may only pass arguments. This is a common feature for POSIX command line tools.7684.. _file-args:77Example usage:7886File Arguments87--------------8889Since all the examples have already worked with filenames, it makes sense90to explain how to deal with files properly. Command line tools are more91fun if they work with files the Unix way, which is to accept ``-`` as a92special file that refers to stdin/stdout.9394Click supports this through the :class:`click.File` type which95intelligently handles files for you. It also deals with Unicode and bytes96correctly for all versions of Python so your script stays very portable.9798Example:9979.. click:example::8081 @click.command()103 @click.argument('input', type=click.File('rb'))104 @click.argument('output', type=click.File('wb'))105 def inout(input, output):106 """Copy contents of INPUT to OUTPUT."""107 while True:108 chunk = input.read(1024)109 if not chunk:110 break111 output.write(chunk)82 @click.argument('files', nargs=-1, type=click.Path())83 def touch(files):84 """Print all FILES file names."""85 for filename in files:86 click.echo(filename)87113And what it does:88And from the command line:8990.. click:run::91117 with isolated_filesystem():118 invoke(inout, args=['-', 'hello.txt'], input=['hello'],119 terminate_input=True)120 invoke(inout, args=['hello.txt', '-'])92 invoke(touch, ['--', '-foo.txt', 'bar.txt'])93122File Path Arguments123-------------------94If you don't like the ``--`` marker, you can set ignore_unknown_options to True to avoid checking unknown options:95125In the previous example, the files were opened immediately. But what if126we just want the filename? The naïve way is to use the default string127argument type. The :class:`Path` type has several checks available which raise nice128errors if they fail, such as existence. Filenames in these error messages are formatted129with :func:`format_filename`, so any undecodable bytes will be printed nicely.130131Example:13296.. click:example::97135 @click.command()136 @click.argument('filename', type=click.Path(exists=True))137 def touch(filename):138 """Print FILENAME if the file exists."""139 click.echo(click.format_filename(filename))98 @click.command(context_settings={"ignore_unknown_options": True})99 @click.argument('files', nargs=-1, type=click.Path())100 def touch(files):101 """Print all FILES file names."""102 for filename in files:103 click.echo(filename)104141And what it does:105And from the command line:106107.. click:run::108145 with isolated_filesystem():146 with open('hello.txt', 'w') as f:147 f.write('Hello World!\n')148 invoke(touch, args=['hello.txt'])109 invoke(touch, ['-foo.txt', 'bar.txt'])149 println()150 invoke(touch, args=['missing.txt'])110111153File Opening Safety154-------------------155156The :class:`FileType` type has one problem it needs to deal with, and that157is to decide when to open a file. The default behavior is to be158"intelligent" about it. What this means is that it will open stdin/stdout159and files opened for reading immediately. This will give the user direct160feedback when a file cannot be opened, but it will only open files161for writing the first time an IO operation is performed by automatically162wrapping the file in a special wrapper.163164This behavior can be forced by passing ``lazy=True`` or ``lazy=False`` to165the constructor. If the file is opened lazily, it will fail its first IO166operation by raising an :exc:`FileError`.167168Since files opened for writing will typically immediately empty the file,169the lazy mode should only be disabled if the developer is absolutely sure170that this is intended behavior.171172Forcing lazy mode is also very useful to avoid resource handling173confusion. If a file is opened in lazy mode, it will receive a174``close_intelligently`` method that can help figure out if the file175needs closing or not. This is not needed for parameters, but is176necessary for manually prompting with the :func:`prompt` function as you177do not know if a stream like stdout was opened (which was already open178before) or a real file that needs closing.179180Starting with Click 2.0, it is also possible to open files in atomic mode by181passing ``atomic=True``. In atomic mode, all writes go into a separate182file in the same folder, and upon completion, the file will be moved over to183the original location. This is useful if a file regularly read by other184users is modified.185186112.. _environment-variables:113114Environment Variables115---------------------116192Like options, arguments can also grab values from an environment variable.193Unlike options, however, this is only supported for explicitly named194environment variables.117Arguments can use environment variables. To do so, pass the name(s) of the environment variable(s) via `envvar` in ``click.argument``.118196Example usage:119Checking one environment variable:120121.. click:example::122123 @click.command()
6 unmodified lines
130131.. click:run::132133 with isolated_filesystem():134 # Writing the file in the filesystem.135 with open('hello.txt', 'w') as f:136 f.write('Hello World!')137 invoke(echo, env={'SRC': 'hello.txt'})138215In that case, it can also be a list of different environment variables216where the first one is picked.139218Generally, this feature is not recommended because it can cause the user219a lot of confusion.140Checking multiple environment variables:141221Option-Like Arguments222---------------------223224Sometimes, you want to process arguments that look like options. For225instance, imagine you have a file named ``-foo.txt``. If you pass this as226an argument in this manner, Click will treat it as an option.227228To solve this, Click does what any POSIX style command line script does,229and that is to accept the string ``--`` as a separator for options and230arguments. After the ``--`` marker, all further parameters are accepted as231arguments.232233Example usage:234142.. click:example::143144 @click.command()238 @click.argument('files', nargs=-1, type=click.Path())239 def touch(files):240 """Print all FILES file names."""241 for filename in files:242 click.echo(filename)145 @click.argument('src', envvar=['SRC', 'SRC_2'], type=click.File('r'))146 def echo(src):147 """Print value of SRC environment variable."""148 click.echo(src.read())149150And from the command line:151152.. click:run::153248 invoke(touch, ['--', '-foo.txt', 'bar.txt'])249250If you don't like the ``--`` marker, you can set ignore_unknown_options to251True to avoid checking unknown options:252253.. click:example::254255 @click.command(context_settings={"ignore_unknown_options": True})256 @click.argument('files', nargs=-1, type=click.Path())257 def touch(files):258 """Print all FILES file names."""259 for filename in files:260 click.echo(filename)261262And from the command line:263264.. click:run::265266 invoke(touch, ['-foo.txt', 'bar.txt'])154 with isolated_filesystem():155 # Writing the file in the filesystem.156 with open('hello.txt', 'w') as f:157 f.write('Hello World from second variable!')158 invoke(echo, env={'SRC_2': 'hello.txt'})
added:docs/click-concepts.rst+67 added
1Click Concepts2================34This section covers concepts about Click's design.56.. contents::7 :depth: 18 :local:910.. _callback-evaluation-order:1112Callback Evaluation Order13-------------------------1415Click works a bit differently than some other command line parsers in that16it attempts to reconcile the order of arguments as defined by the17programmer with the order of arguments as defined by the user before18invoking any callbacks.1920This is an important concept to understand when porting complex21patterns to Click from optparse or other systems. A parameter22callback invocation in optparse happens as part of the parsing step,23whereas a callback invocation in Click happens after the parsing.2425The main difference is that in optparse, callbacks are invoked with the raw26value as it happens, whereas a callback in Click is invoked after the27value has been fully converted.2829Generally, the order of invocation is driven by the order in which the user30provides the arguments to the script; if there is an option called ``--foo``31and an option called ``--bar`` and the user calls it as ``--bar32--foo``, then the callback for ``bar`` will fire before the one for ``foo``.3334There are three exceptions to this rule which are important to know:3536Eagerness:37 An option can be set to be "eager". All eager parameters are38 evaluated before all non-eager parameters, but again in the order as39 they were provided on the command line by the user.4041 This is important for parameters that execute and exit like ``--help``42 and ``--version``. Both are eager parameters, but whatever parameter43 comes first on the command line will win and exit the program.4445Repeated parameters:46 If an option or argument is split up on the command line into multiple47 places because it is repeated -- for instance, ``--exclude foo --include48 baz --exclude bar`` -- the callback will fire based on the position of49 the first option. In this case, the callback will fire for50 ``exclude`` and it will be passed both options (``foo`` and51 ``bar``), then the callback for ``include`` will fire with ``baz``52 only.5354 Note that even if a parameter does not allow multiple versions, Click55 will still accept the position of the first, but it will ignore every56 value except the last. The reason for this is to allow composability57 through shell aliases that set defaults.5859Missing parameters:60 If a parameter is not defined on the command line, the callback will61 still fire. This is different from how it works in optparse where62 undefined values do not fire the callback. Missing parameters fire63 their callbacks at the very end which makes it possible for them to64 default to values from a parameter that came before.6566Most of the time you do not need to be concerned about any of this,67but it is important to know how it works for some advanced cases.
added:docs/commands-and-groups.rst+342 added
1Basic Commands, Groups, Context2================================34.. currentmodule:: click56Commands and Groups are the building blocks for Click applications. :class:`Command` wraps a function to make it into a cli command. :class:`Group` wraps Commands and Groups to make them into applications. :class:`Context` is how groups and commands communicate.78.. contents::9 :depth: 210 :local:1112Commands13--------------------1415Basic Command Example16^^^^^^^^^^^^^^^^^^^^^^^17A simple command decorator takes no arguments.1819.. click:example::20 @click.command()21 @click.option('--count', default=1)22 def hello(count):23 for x in range(count):24 click.echo("Hello!")2526.. click:run::27 invoke(hello, args=['--count', '2',])2829Renaming Commands30^^^^^^^^^^^^^^^^^^^31By default the command is the function name with underscores replaced by dashes. To change this pass the desired name into the first positional argument.3233.. click:example::34 @click.command('say-hello')35 @click.option('--count', default=1)36 def hello(count):37 for x in range(count):38 click.echo("Hello!")3940.. click:run::41 invoke(hello, args=['--count', '2',])4243Deprecating Commands44^^^^^^^^^^^^^^^^^^^^^^45To mark a command as deprecated pass in ``deprecated=True``4647.. click:example::48 @click.command('say-hello', deprecated=True)49 @click.option('--count', default=1)50 def hello(count):51 for x in range(count):52 click.echo("Hello!")5354.. click:run::55 invoke(hello, args=['--count', '2',])5657Groups58------------5960Basic Group Example61^^^^^^^^^^^^^^^^^^^^^62A group wraps one or more commands. After being wrapped, the commands are nested under that group. You can see that on the help pages and in the execution. By default, invoking the group with no command shows the help page.6364.. click:example::65 @click.group()66 def greeting():67 click.echo('Starting greeting ...')6869 @greeting.command('say-hello')70 @click.option('--count', default=1)71 def hello(count):72 for x in range(count):73 click.echo("Hello!")7475At the top level:7677.. click:run::7879 invoke(greeting)8081At the command level:8283.. click:run::8485 invoke(greeting, args=['say-hello'])86 invoke(greeting, args=['say-hello', '--help'])8788As you can see from the above example, the function wrapped by the group decorator executes unless it is interrupted (for example by calling the help).8990Renaming Groups91^^^^^^^^^^^^^^^^^92To have a name other than the decorated function name as the group name, pass it in as the first positional argument.9394.. click:example::95 @click.group('greet-someone')96 def greeting():97 click.echo('Starting greeting ...')9899 @greeting.command('say-hello')100 @click.option('--count', default=1)101 def hello(count):102 for x in range(count):103 click.echo("Hello!")104105.. click:run::106107 invoke(greeting, args=['say-hello'])108109Group Invocation Without Command110^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^111112By default, if a group is passed without a command, the group is not invoked and a command automatically passes ``--help``. To change this, pass ``invoke_without_command=True`` to the group. The context object also includes information about whether or not the group invocation would go to a command nested under it.113114.. click:example::115116 @click.group(invoke_without_command=True)117 @click.pass_context118 def cli(ctx):119 if ctx.invoked_subcommand is None:120 click.echo('I was invoked without subcommand')121 else:122 click.echo(f"I am about to invoke {ctx.invoked_subcommand}")123124 @cli.command()125 def sync():126 click.echo('The subcommand')127128.. click:run::129130 invoke(cli, prog_name='tool', args=[])131 invoke(cli, prog_name='tool', args=['sync'])132133134135Group Separation136^^^^^^^^^^^^^^^^^^^137Command :ref:`parameters` attached to a command belong only to that command.138139.. click:example::140 @click.group()141 def greeting():142 pass143144 @greeting.command()145 @click.option('--count', default=1)146 def hello(count):147 for x in range(count):148 click.echo("Hello!")149150 @greeting.command()151 @click.option('--count', default=1)152 def goodbye(count):153 for x in range(count):154 click.echo("Goodbye!")155156.. click:run::157158 invoke(greeting, args=['hello', '--count', '2'])159 invoke(greeting, args=['goodbye', '--count', '2'])160 invoke(greeting)161162Additionally parameters for a given group belong only to that group and not to the commands under it. What this means is that options and arguments for a specific command have to be specified *after* the command name itself, but *before* any other command names.163164This behavior is observable with the ``--help`` option. Suppose we have a group called ``tool`` containing a command called ``sub``.165166- ``tool --help`` returns the help for the whole program (listing subcommands).167- ``tool sub --help`` returns the help for the ``sub`` subcommand.168- But ``tool --help sub`` treats ``--help`` as an argument for the main program. Click then invokes the callback for ``--help``, which prints the help and aborts the program before click can process the subcommand.169170Arbitrary Nesting171^^^^^^^^^^^^^^^^^^^172:class:`Commands <Command>` are attached to a :class:`Group`. Multiple groups can be attached to another group. Groups containing multiple groups can be attached to a group, and so on. To invoke a command nested under multiple groups, all the groups under which it is nested must be invoked.173174.. click:example::175176 @click.group()177 def cli():178 pass179180 # Not @click so that the group is registered now.181 @cli.group()182 def session():183 click.echo('Starting session')184185 @session.command()186 def initdb():187 click.echo('Initialized the database')188189 @session.command()190 def dropdb():191 click.echo('Dropped the database')192193.. click:run::194195 invoke(cli, args=['session', 'initdb'])196197Lazily Attaching Commands198^^^^^^^^^^^^^^^^^^^^^^^^^^^199Most examples so far have attached the commands to a group immediately, but commands may be registered later. This could be used to split commands into multiple Python modules. Regardless of how they are attached, the commands are invoked identically.200201.. click:example::202203 @click.group()204 def cli():205 pass206207 @cli.command()208 def initdb():209 click.echo('Initialized the database')210211 @click.command()212 def dropdb():213 click.echo('Dropped the database')214215 cli.add_command(dropdb)216217.. click:run::218219 invoke(cli, args=['initdb'])220 invoke(cli, args=['dropdb'])221222Context Object223-------------------224The :class:`Context` object is how commands and groups communicate.225226Auto Envvar Prefix227^^^^^^^^^^^^^^^^^^^^228Automatically built environment variables are supported for options only. To enable this feature, the ``auto_envvar_prefix`` parameter needs to be passed to the script that is invoked. Each command and parameter is then added as an uppercase underscore-separated variable. If you have a subcommand229called ``run`` taking an option called ``reload`` and the prefix is ``WEB``, then the variable is ``WEB_RUN_RELOAD``.230231Example usage:232233.. click:example::234235 @click.command()236 @click.option('--username')237 def greet(username):238 click.echo(f'Hello {username}!')239240 if __name__ == '__main__':241 greet(auto_envvar_prefix='GREETER')242243And from the command line:244245.. click:run::246247 invoke(greet, env={'GREETER_USERNAME': 'john'},248 auto_envvar_prefix='GREETER')249250When using ``auto_envvar_prefix`` with command groups, the command name251needs to be included in the environment variable, between the prefix and252the parameter name, *i.e.* ``PREFIX_COMMAND_VARIABLE``. If you have a253subcommand called ``run-server`` taking an option called ``host`` and254the prefix is ``WEB``, then the variable is ``WEB_RUN_SERVER_HOST``.255256.. click:example::257258 @click.group()259 @click.option('--debug/--no-debug')260 def cli(debug):261 click.echo(f"Debug mode is {'on' if debug else 'off'}")262263 @cli.command()264 @click.option('--username')265 def greet(username):266 click.echo(f"Hello {username}!")267268 if __name__ == '__main__':269 cli(auto_envvar_prefix='GREETER')270271.. click:run::272273 invoke(cli, args=['greet',],274 env={'GREETER_GREET_USERNAME': 'John', 'GREETER_DEBUG': 'false'},275 auto_envvar_prefix='GREETER')276277Global Context Access278^^^^^^^^^^^^^^^^^^^^^^279280.. versionadded:: 5.0281282Starting with Click 5.0 it is possible to access the current context from283anywhere within the same thread through the use of the284:func:`get_current_context` function which returns it. This is primarily285useful for accessing the context bound object as well as some flags that286are stored on it to customize the runtime behavior. For instance the287:func:`echo` function does this to infer the default value of the `color`288flag.289290Example usage::291292 def get_current_command_name():293 return click.get_current_context().info_name294295It should be noted that this only works within the current thread. If you296spawn additional threads then those threads will not have the ability to297refer to the current context. If you want to give another thread the298ability to refer to this context you need to use the context within the299thread as a context manager::300301 def spawn_thread(ctx, func):302 def wrapper():303 with ctx:304 func()305 t = threading.Thread(target=wrapper)306 t.start()307 return t308309Now the thread function can access the context like the main thread would310do. However if you do use this for threading you need to be very careful311as the vast majority of the context is not thread safe! You are only312allowed to read from the context, but not to perform any modifications on313it.314315316Detecting the Source of a Parameter317^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^318319In some situations it's helpful to understand whether or not an option320or parameter came from the command line, the environment, the default321value, or :attr:`Context.default_map`. The322:meth:`Context.get_parameter_source` method can be used to find this323out. It will return a member of the :class:`~click.core.ParameterSource`324enum.325326.. click:example::327328 @click.command()329 @click.argument('port', nargs=1, default=8080, envvar="PORT")330 @click.pass_context331 def cli(ctx, port):332 source = ctx.get_parameter_source("port")333 click.echo(f"Port came from {source.name}")334335.. click:run::336337 invoke(cli, prog_name='cli', args=['8080'])338 println()339 invoke(cli, prog_name='cli', args=[], env={"PORT": "8080"})340 println()341 invoke(cli, prog_name='cli', args=[])342 println()
modified:docs/commands.rst+6 added-117 removed
1Commands and Groups2===================1Advanced Groups and Context2=============================34.. currentmodule:: click56The structure of a Click application is defined with :class:`Command`, which7defines an individual named command, and :class:`Group`, which defines a nested8collection of commands (or more groups) under a name.6In addition to the capabilities covered in the previous section, Groups have more advanced capabilities that leverage the Context.78.. contents::9 :depth: 110 :local:1112Callback Invocation13-------------------14
24 unmodified lines
39 invoke(cli, prog_name='tool.py')40 println()41 invoke(cli, prog_name='tool.py', args=['--debug', 'sync'])4242Passing Parameters43------------------4445Click strictly separates parameters between commands and subcommands. What this46means is that options and arguments for a specific command have to be specified47*after* the command name itself, but *before* any other command names.4849This behavior is already observable with the predefined ``--help`` option.50Suppose we have a program called ``tool.py``, containing a subcommand called51``sub``.5253- ``tool.py --help`` will return the help for the whole program (listing54 subcommands).5556- ``tool.py sub --help`` will return the help for the ``sub`` subcommand.5758- But ``tool.py --help sub`` will treat ``--help`` as an argument for the main59 program. Click then invokes the callback for ``--help``, which prints the60 help and aborts the program before click can process the subcommand.6143Nested Handling and Contexts44----------------------------4546As you can see from the earlier example, the basic command group accepts a
77 unmodified lines
124125This is a very powerful concept that can be used to build very complex126nested applications; see :ref:`complex-guide` for more information.127147148Group Invocation Without Command149--------------------------------150151By default, a group is not invoked unless a subcommand is passed. In fact, not152providing a command automatically passes ``--help`` by default. This behavior153can be changed by passing ``invoke_without_command=True`` to a group. In that154case, the callback is always invoked instead of showing the help page. The155context object also includes information about whether or not the invocation156would go to a subcommand.157158.. click:example::159160 @click.group(invoke_without_command=True)161 @click.pass_context162 def cli(ctx):163 if ctx.invoked_subcommand is None:164 click.echo('I was invoked without subcommand')165 else:166 click.echo(f"I am about to invoke {ctx.invoked_subcommand}")167168 @cli.command()169 def sync():170 click.echo('The subcommand')171172.. click:run::173174 invoke(cli, prog_name='tool', args=[])175 invoke(cli, prog_name='tool', args=['sync'])176177178.. _custom-groups:179180Custom Groups181-------------182183You can customize the behavior of a group beyond the arguments it accepts by184subclassing :class:`click.Group`.185186The most common methods to override are :meth:`~click.Group.get_command` and187:meth:`~click.Group.list_commands`.188189The following example implements a basic plugin system that loads commands from190Python files in a folder. The command is lazily loaded to avoid slow startup.191192.. code-block:: python193194 import importlib.util195 import os196 import click197198 class PluginGroup(click.Group):199 def __init__(self, name=None, plugin_folder="commands", **kwargs):200 super().__init__(name=name, **kwargs)201 self.plugin_folder = plugin_folder202203 def list_commands(self, ctx):204 rv = []205206 for filename in os.listdir(self.plugin_folder):207 if filename.endswith(".py"):208 rv.append(filename[:-3])209210 rv.sort()211 return rv212213 def get_command(self, ctx, name):214 path = os.path.join(self.plugin_folder, f"{name}.py")215 spec = importlib.util.spec_from_file_location(name, path)216 module = importlib.util.module_from_spec(spec)217 spec.loader.exec_module(module)218 return module.cli219220 cli = PluginGroup(221 plugin_folder=os.path.join(os.path.dirname(__file__), "commands")222 )223224 if __name__ == "__main__":225 cli()226227Custom classes can also be used with decorators:228229.. code-block:: python230231 @click.group(232 cls=PluginGroup,233 plugin_folder=os.path.join(os.path.dirname(__file__), "commands")234 )235 def cli():236 pass237238128.. _command-chaining:129130Command Chaining131----------------
297 unmodified lines
modified:docs/complex.rst+4 added
14 unmodified lines
15In a theoretical world of two separate Click command line utilities, they16could solve this problem by nesting one inside the other. For instance, the17web framework could also load the commands for the message queue framework.1819.. contents::20 :depth: 121 :local:2223Basic Concepts24--------------2526To understand how this works, you need to understand two concepts: contexts
367 unmodified lines
modified:docs/conf.py+4 added-2 removed
8 unmodified lines
9release, version = get_version("Click")1011# General --------------------------------------------------------------1213master_doc = "index"14default_role = "code"15extensions = [16 "sphinx.ext.autodoc",17 "sphinx.ext.extlinks",18 "sphinx.ext.intersphinx",19 "sphinx_tabs.tabs",20 "sphinxcontrib.log_cabinet",21 "pallets_sphinx_themes",22 "myst_parser",23]24autodoc_member_order = "bysource"25autodoc_typehints = "description"26autodoc_preserve_defaults = True
23 unmodified lines
50 "**": ["localtoc.html", "relations.html", "searchbox.html", "ethicalads.html"],51}52singlehtml_sidebars = {"index": ["project.html", "localtoc.html", "ethicalads.html"]}53html_static_path = ["_static"]52html_favicon = "_static/click-icon.png"53html_logo = "_static/click-logo-sidebar.png"54html_favicon = "_static/click-icon.svg"55html_logo = "_static/click-logo.svg"56html_title = f"Click Documentation ({version})"57html_show_sourcelink = False
added:docs/contrib.md+45 added
1(contrib)=23# click-contrib45As the user number of Click grows, more and more major feature requests are6made. To users, it may seem reasonable to include those features with Click;7however, many of them are experimental or aren't practical to support8generically. Maintainers have to choose what is reasonable to maintain in Click9core.1011The [click-contrib](https://github.com/click-contrib/) GitHub organization exists as a place to collect third-party12packages that extend Click's features. It is also meant to ease the effort of13searching for such extensions.1415Please note that the quality and stability of those packages may be different16from Click itself. While published under a common organization, they are still17separate from Click and the Pallets maintainers.1819## Third-party projects2021Other projects that extend Click's features are available outside the22[click-contrib](https://github.com/click-contrib/) organization.2324Some of the most popular and actively maintained are listed below:2526| Project | Description | Popularity | Activity |27|---------------------------------------------------------|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|28| [Typer](https://github.com/fastapi/typer) | Use Python type hints to create CLI apps. | ![GitHub stars](https://img.shields.io/github/stars/fastapi/typer?label=%20&style=flat-square) | ![Last commit](https://img.shields.io/github/last-commit/fastapi/typer?label=%20&style=flat-square) |29| [rich-click](https://github.com/ewels/rich-click) | Format help output with Rich. | ![GitHub stars](https://img.shields.io/github/stars/ewels/rich-click?label=%20&style=flat-square) | ![Last commit](https://img.shields.io/github/last-commit/ewels/rich-click?label=%20&style=flat-square) |30| [click-app](https://github.com/simonw/click-app) | Cookiecutter template for creating new CLIs. | ![GitHub stars](https://img.shields.io/github/stars/simonw/click-app?label=%20&style=flat-square) | ![Last commit](https://img.shields.io/github/last-commit/simonw/click-app?label=%20&style=flat-square) |31| [Cloup](https://github.com/janluke/cloup) | Adds option groups, constraints, command aliases, help themes, suggestions and more. | ![GitHub stars](https://img.shields.io/github/stars/janluke/cloup?label=%20&style=flat-square) | ![Last commit](https://img.shields.io/github/last-commit/janluke/cloup?label=%20&style=flat-square) |32| [Click Extra](https://github.com/kdeldycke/click-extra) | Cloup + colorful `--help`, `--config`, `--show-params`, `--verbosity` options, etc. | ![GitHub stars](https://img.shields.io/github/stars/kdeldycke/click-extra?label=%20&style=flat-square) | ![Last commit](https://img.shields.io/github/last-commit/kdeldycke/click-extra?label=%20&style=flat-square) |3334```{note}35To make it into the list above, a project:3637- must be actively maintained (at least one commit in the last year)38- must have a reasonable number of stars (at least 20)3940If you have a project that meets these criteria, please open a pull request41to add it to the list.4243If a project is no longer maintained or does not meet the criteria above,44please open a pull request to remove it from the list.45```
deleted:docs/contrib.rst-21 removed
1.. _contrib:23=============4click-contrib5=============67As the number of users of Click grows, more and more major feature requests are8made. To users it may seem reasonable to include those features with Click;9however, many of them are experimental or aren't practical to support10generically. Maintainers have to choose what is reasonable to maintain in Click11core.1213The click-contrib_ GitHub organization exists as a place to collect third-party14packages that extend Click's features. It is also meant to ease the effort of15searching for such extensions.1617Please note that the quality and stability of those packages may be different18than Click itself. While published under a common organization, they are still19separate from Click and the Pallets maintainers.2021.. _click-contrib: https://github.com/click-contrib/
added:docs/documentation.md+277 added
1# Help Pages23```{currentmodule} click4```56Click makes it very easy to document your command line tools. For most things Click automatically generates help pages for you. By design the text is customizable, but the layout is not.78## Help Texts910Commands and options accept help arguments. For commands, the docstring of the function is automatically used if provided.1112Simple example:1314```{eval-rst}15.. click:example::1617 @click.command()18 @click.argument('name')19 @click.option('--count', default=1, help='number of greetings')20 def hello(name: str, count: int):21 """This script prints hello and a name one or more times."""22 for x in range(count):23 if name:24 click.echo(f"Hello {name}!")25 else:26 click.echo("Hello!")2728.. click:run::29 invoke(hello, args=['--help'])30```3132## Command Short Help3334For subcommands, a short help snippet is generated. By default, it's the first sentence of the docstring. If too long, then it will ellipsize what cannot be fit on a single line with `...`. The short help snippet can also be overridden with `short_help`:3536```{eval-rst}37.. click:example::3839 import click4041 @click.group()42 def cli():43 """A simple command line tool."""4445 @cli.command('init', short_help='init the repo')46 def init():47 """Initializes the repository."""4849.. click:run::50 invoke(cli, args=['--help'])51```5253## Command Epilog Help5455The help epilog is printed at the end of the help and is useful for showing example command usages or referencing additional help resources.5657```{eval-rst}58.. click:example::5960 import click6162 @click.command(63 epilog='See https://example.com for more details',64 )65 def init():66 """Initializes the repository."""6768.. click:run::69 invoke(init, args=['--help'])70```7172(documenting-arguments)=7374## Documenting Arguments7576{class}`click.argument` does not take a `help` parameter. This follows the Unix Command Line Tools convention of using arguments only for necessary things and documenting them in the command help text77by name. This should then be done via the docstring.7879A brief example:8081```{eval-rst}82.. click:example::8384 @click.command()85 @click.argument('filename')86 def touch(filename):87 """Print FILENAME."""88 click.echo(filename)8990.. click:run::91 invoke(touch, args=['--help'])92```9394Or more explicitly:9596```{eval-rst}97.. click:example::9899 @click.command()100 @click.argument('filename')101 def touch(filename):102 """Print FILENAME.103104 FILENAME is the name of the file to check.105 """106 click.echo(filename)107108.. click:run::109 invoke(touch, args=['--help'])110```111112## Showing Defaults113114To control the appearance of defaults pass `show_default`.115116```{eval-rst}117.. click:example::118119 @click.command()120 @click.option('--n', default=1, show_default=False, help='number of dots')121 def dots(n):122 click.echo('.' * n)123124.. click:run::125 invoke(dots, args=['--help'])126```127128For single option boolean flags, the default remains hidden if the default value is False, even if show default is set to true.129130```{eval-rst}131.. click:example::132133 @click.command()134 @click.option('--n', default=1, show_default=True)135 @click.option("--gr", is_flag=True, show_default=True, default=False, help="Greet the world.")136 @click.option("--br", is_flag=True, show_default=True, default=True, help="Add a thematic break")137 def dots(n, gr, br):138 if gr:139 click.echo('Hello world!')140 click.echo('.' * n)141 if br:142 click.echo('-' * n)143144.. click:run::145 invoke(dots, args=['--help'])146```147148## Click's Wrapping Behavior149150Click's default wrapping ignores single new lines and rewraps the text based on the width of the terminal, to a maximum of 80 characters. In the example notice how the second grouping of three lines is rewrapped into a single paragraph.151152```{eval-rst}153.. click:example::154155 import click156157 @click.command()158 def cli():159 """160 This is a very long paragraph and as you161 can see wrapped very early in the source text162 but will be rewrapped to the terminal width in163 the final output.164165 This is166 a paragraph167 that is compacted.168 """169170.. click:run::171 invoke(cli, args=['--help'])172```173174## Escaping Click's Wrapping175176Sometimes Click's wrapping can be a problem, such as when showing code examples where new lines are significant. This behavior can be escaped on a per-paragraph basis by adding a line with only `\b` . The `\b` is removed from the rendered help text.177178Example:179180```{eval-rst}181.. click:example::182183 import click184185 @click.command()186 def cli():187 """First paragraph.188189 \b190 This is191 a paragraph192 without rewrapping.193194 And this is a paragraph195 that will be rewrapped again.196 """197198.. click:run::199 invoke(cli, args=['--help'])200```201202To change the rendering maximum width, pass `max_content_width` when calling the command.203204```bash205cli(max_content_width=120)206```207208## Truncating Help Texts209210Click gets {class}`Command` help text from the docstring. If you do not want to include part of the docstring, add the `\f` escape marker to have Click truncate the help text after the marker.211212Example:213214```{eval-rst}215.. click:example::216217 import click218219 @click.command()220 def cli():221 """First paragraph.222 \f223224 Words to not be included.225 """226227.. click:run::228 invoke(cli, args=['--help'])229```230231(doc-meta-variables)=232233## Placeholder / Meta Variable234235The default placeholder variable ([meta variable](https://en.wikipedia.org/wiki/Metasyntactic_variable#IETF_Requests_for_Comments)) in the help pages is the parameter name in uppercase with underscores. This can be changed for Commands and Parameters with the `options_metavar` and `metavar` kwargs.236237```{eval-rst}238.. click:example::239240 # This controls entry on the usage line.241 @click.command(options_metavar='[[options]]')242 @click.option('--count', default=1, help='number of greetings',243 metavar='<int>')244 @click.argument('name', metavar='<name>')245 def hello(name: str, count: int) -> None:246 """This script prints 'hello <name>' a total of <count> times."""247 for x in range(count):248 click.echo(f"Hello {name}!")249250# Example usage:251252.. click:run::253 invoke(hello, args=['--help'])254255```256257## Help Parameter Customization258259Help parameters are automatically added by Click for any command. The default is `--help` but can be overridden by the context setting {attr}`~Context.help_option_names`. Click also performs automatic conflict resolution on the default help parameter, so if a command itself implements a parameter named `help` then the default help will not be run.260261This example changes the default parameters to `-h` and `--help`262instead of just `--help`:263264```{eval-rst}265.. click:example::266267 import click268269 CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])270271 @click.command(context_settings=CONTEXT_SETTINGS)272 def cli():273 pass274275.. click:run::276 invoke(cli, ['-h'])277```
deleted:docs/documentation.rst-267 removed
1Documenting Scripts2===================34.. currentmodule:: click56Click makes it very easy to document your command line tools. First of7all, it automatically generates help pages for you. While these are8currently not customizable in terms of their layout, all of the text9can be changed.1011Help Texts12----------1314Commands and options accept help arguments. In the case of commands, the15docstring of the function is automatically used if provided.1617Simple example:1819.. click:example::2021 @click.command()22 @click.option('--count', default=1, help='number of greetings')23 @click.argument('name')24 def hello(count, name):25 """This script prints hello NAME COUNT times."""26 for x in range(count):27 click.echo(f"Hello {name}!")2829And what it looks like:3031.. click:run::3233 invoke(hello, args=['--help'])343536.. _documenting-arguments:3738Documenting Arguments39----------------------4041:func:`click.argument` does not take a ``help`` parameter. This is to42follow the general convention of Unix tools of using arguments for only43the most necessary things, and to document them in the command help text44by referring to them by name.4546You might prefer to reference the argument in the description:4748.. click:example::4950 @click.command()51 @click.argument('filename')52 def touch(filename):53 """Print FILENAME."""54 click.echo(filename)5556And what it looks like:5758.. click:run::5960 invoke(touch, args=['--help'])6162Or you might prefer to explicitly provide a description of the argument:6364.. click:example::6566 @click.command()67 @click.argument('filename')68 def touch(filename):69 """Print FILENAME.7071 FILENAME is the name of the file to check.72 """73 click.echo(filename)7475And what it looks like:7677.. click:run::7879 invoke(touch, args=['--help'])8081For more examples, see the examples in :doc:`/arguments`.828384Preventing Rewrapping85---------------------8687The default behavior of Click is to rewrap text based on the width of the88terminal, to a maximum 80 characters. In some circumstances, this can become89a problem. The main issue is when showing code examples, where newlines are90significant.9192Rewrapping can be disabled on a per-paragraph basis by adding a line with93solely the ``\b`` escape marker in it. This line will be removed from the94help text and rewrapping will be disabled.9596Example:9798.. click:example::99100 @click.command()101 def cli():102 """First paragraph.103104 This is a very long second paragraph and as you105 can see wrapped very early in the source text106 but will be rewrapped to the terminal width in107 the final output.108109 \b110 This is111 a paragraph112 without rewrapping.113114 And this is a paragraph115 that will be rewrapped again.116 """117118And what it looks like:119120.. click:run::121122 invoke(cli, args=['--help'])123124To change the maximum width, pass ``max_content_width`` when calling the command.125126.. code-block:: python127128 cli(max_content_width=120)129130131.. _doc-meta-variables:132133Truncating Help Texts134---------------------135136Click gets command help text from function docstrings. However if you137already use docstrings to document function arguments you may not want138to see :param: and :return: lines in your help text.139140You can use the ``\f`` escape marker to have Click truncate the help text141after the marker.142143Example:144145.. click:example::146147 @click.command()148 @click.pass_context149 def cli(ctx):150 """First paragraph.151152 This is a very long second153 paragraph and not correctly154 wrapped but it will be rewrapped.155 \f156157 :param click.core.Context ctx: Click context.158 """159160And what it looks like:161162.. click:run::163164 invoke(cli, args=['--help'])165166167Meta Variables168--------------169170Options and parameters accept a ``metavar`` argument that can change the171meta variable in the help page. The default version is the parameter name172in uppercase with underscores, but can be annotated differently if173desired. This can be customized at all levels:174175.. click:example::176177 @click.command(options_metavar='<options>')178 @click.option('--count', default=1, help='number of greetings',179 metavar='<int>')180 @click.argument('name', metavar='<name>')181 def hello(count, name):182 """This script prints hello <name> <int> times."""183 for x in range(count):184 click.echo(f"Hello {name}!")185186Example:187188.. click:run::189190 invoke(hello, args=['--help'])191192193Command Short Help194------------------195196For commands, a short help snippet is generated. By default, it's the first197sentence of the help message of the command, unless it's too long. This can198also be overridden:199200.. click:example::201202 @click.group()203 def cli():204 """A simple command line tool."""205206 @cli.command('init', short_help='init the repo')207 def init():208 """Initializes the repository."""209210 @cli.command('delete', short_help='delete the repo')211 def delete():212 """Deletes the repository."""213214And what it looks like:215216.. click:run::217218 invoke(cli, prog_name='repo.py')219220Command Epilog Help221-------------------222223The help epilog is like the help string but it's printed at the end of the help224page after everything else. Useful for showing example command usages or225referencing additional help resources.226227.. click:example::228229 @click.command(epilog='Check out our docs at https://click.palletsprojects.com/ for more details')230 def init():231 """Initializes the repository."""232233And what it looks like:234235.. click:run::236237 invoke(init, prog_name='repo.py', args=['--help'])238239Help Parameter Customization240----------------------------241242.. versionadded:: 2.0243244The help parameter is implemented in Click in a very special manner.245Unlike regular parameters it's automatically added by Click for any246command and it performs automatic conflict resolution. By default it's247called ``--help``, but this can be changed. If a command itself implements248a parameter with the same name, the default help parameter stops accepting249it. There is a context setting that can be used to override the names of250the help parameters called :attr:`~Context.help_option_names`.251252This example changes the default parameters to ``-h`` and ``--help``253instead of just ``--help``:254255.. click:example::256257 CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])258259 @click.command(context_settings=CONTEXT_SETTINGS)260 def cli():261 pass262263And what it looks like:264265.. click:run::266267 invoke(cli, ['-h'])
modified:docs/entry-points.rst+3 added-2 removed
1Packaging Entry Points2======================34It's recommended to write command line utilities as installable packages with5entry points instead telling users to run ``python hello.py``.5entry points instead of telling users to run ``python hello.py``.67A distribution package is a ``.whl`` file you install with pip or another Python8installer. You use a ``pyproject.toml`` file to describe the project and how it9is built into a package. You might upload this package to PyPI, or distribute it
16 unmodified lines
26 hello-project/27 src/28 hello/29 __init__.py30 hello.py31 pyproject.toml3233Contents of ``hello.py``:34
19 unmodified lines
54 "click>=8.1",55 ]5657 [project.scripts]57 hello = "hello:cli"58 hello = "hello.hello:cli"5960 [build-system]61 requires = ["flit_core<4"]62 build-backend = "flit_core.buildapi"
25 unmodified lines
added:docs/extending-click.rst+138 added
1Extending Click2=================34.. currentmodule:: click56In addition to common functionality that is implemented in the library7itself, there are countless patterns that can be implemented by extending8Click. This page should give some insight into what can be accomplished.910.. contents::11 :depth: 212 :local:1314.. _custom-groups:1516Custom Groups17-------------1819You can customize the behavior of a group beyond the arguments it accepts by20subclassing :class:`click.Group`.2122The most common methods to override are :meth:`~click.Group.get_command` and23:meth:`~click.Group.list_commands`.2425The following example implements a basic plugin system that loads commands from26Python files in a folder. The command is lazily loaded to avoid slow startup.2728.. code-block:: python2930 import importlib.util31 import os32 import click3334 class PluginGroup(click.Group):35 def __init__(self, name=None, plugin_folder="commands", **kwargs):36 super().__init__(name=name, **kwargs)37 self.plugin_folder = plugin_folder3839 def list_commands(self, ctx):40 rv = []4142 for filename in os.listdir(self.plugin_folder):43 if filename.endswith(".py"):44 rv.append(filename[:-3])4546 rv.sort()47 return rv4849 def get_command(self, ctx, name):50 path = os.path.join(self.plugin_folder, f"{name}.py")51 spec = importlib.util.spec_from_file_location(name, path)52 module = importlib.util.module_from_spec(spec)53 spec.loader.exec_module(module)54 return module.cli5556 cli = PluginGroup(57 plugin_folder=os.path.join(os.path.dirname(__file__), "commands")58 )5960 if __name__ == "__main__":61 cli()6263Custom classes can also be used with decorators:6465.. code-block:: python6667 @click.group(68 cls=PluginGroup,69 plugin_folder=os.path.join(os.path.dirname(__file__), "commands")70 )71 def cli():72 pass7374.. _aliases:7576Command Aliases77---------------7879Many tools support aliases for commands. For example, you can configure80``git`` to accept ``git ci`` as alias for ``git commit``. Other tools also81support auto-discovery for aliases by automatically shortening them.8283It's possible to customize :class:`Group` to provide this functionality. As84explained in :ref:`custom-groups`, a group provides two methods:85:meth:`~Group.list_commands` and :meth:`~Group.get_command`. In this particular86case, you only need to override the latter as you generally don't want to87enumerate the aliases on the help page in order to avoid confusion.8889The following example implements a subclass of :class:`Group` that accepts a90prefix for a command. If there was a command called ``push``, it would accept91``pus`` as an alias (so long as it was unique):9293.. click:example::9495 class AliasedGroup(click.Group):96 def get_command(self, ctx, cmd_name):97 rv = super().get_command(ctx, cmd_name)9899 if rv is not None:100 return rv101102 matches = [103 x for x in self.list_commands(ctx)104 if x.startswith(cmd_name)105 ]106107 if not matches:108 return None109110 if len(matches) == 1:111 return click.Group.get_command(self, ctx, matches[0])112113 ctx.fail(f"Too many matches: {', '.join(sorted(matches))}")114115 def resolve_command(self, ctx, args):116 # always return the full command name117 _, cmd, args = super().resolve_command(ctx, args)118 return cmd.name, cmd, args119120It can be used like this:121122.. click:example::123124 @click.group(cls=AliasedGroup)125 def cli():126 pass127128 @cli.command129 def push():130 pass131132 @cli.command133 def pop():134 pass135136See the `alias example`_ in Click's repository for another example.137138.. _alias example: https://github.com/pallets/click/tree/main/examples/aliases
added:docs/faqs.md+39 added
1# Frequently Asked Questions23```{contents}4:depth: 25:local: true6```78## General910### Shell Variable Expansion On Windows1112I have a simple Click app :1314```15import click1617@click.command()18@click.argument('message')19def main(message: str):20 click.echo(message)2122if __name__ == '__main__':23 main()2425```2627When you pass an environment variable in the argument, it expands it:2829```{code-block} powershell30> Desktop python foo.py '$M0/.viola/2025-01-25-17-20-23-307878'31> M:/home/ramrachum/.viola/2025-01-25-17-20-23-30787832>33```34Note that I used single quotes above, so my shell is not expanding the environment variable, Click does. How do I get Click to not expand it?3536#### Answer3738If you don't want Click to emulate (as best it can) unix expansion on Windows, pass windows_expand_args=False when calling the CLI.39Windows command line doesn't do any *, ~, or $ENV expansion. It also doesn't distinguish between double quotes and single quotes (where the later means "don't expand here"). Click emulates the expansion so that the app behaves similarly on both platforms, but doesn't receive information about what quotes were used.
added:docs/handling-files.rst+90 added
1.. _handling-files:23Handling Files4================56.. currentmodule:: click78Click has built in features to support file and file path handling. The examples use arguments but the same principle applies to options as well.910.. _file-args:1112File Arguments13-----------------1415Click supports working with files with the :class:`File` type. Some notable features are:1617* Support for ``-`` to mean a special file that refers to stdin when used for reading, and stdout when used for writing. This is a common pattern for POSIX command line utilities.18* Deals with ``str`` and ``bytes`` correctly for all versions of Python.1920Example:2122.. click:example::2324 @click.command()25 @click.argument('input', type=click.File('rb'))26 @click.argument('output', type=click.File('wb'))27 def inout(input, output):28 """Copy contents of INPUT to OUTPUT."""29 while True:30 chunk = input.read(1024)31 if not chunk:32 break33 output.write(chunk)3435And from the command line:3637.. click:run::3839 with isolated_filesystem():40 invoke(inout, args=['-', 'hello.txt'], input=['hello'],41 terminate_input=True)42 invoke(inout, args=['hello.txt', '-'])4344File Path Arguments45----------------------4647For handling paths, the :class:`Path` type is better than a ``str``. Some notable features are:4849* The ``exists`` argument will verify whether the path exists.50* ``readable``, ``writable``, and ``executable`` can perform permission checks.51* ``file_okay`` and ``dir_okay`` allow specifying whether files/directories are accepted.52* Error messages are nicely formatted using :func:`format_filename` so any undecodable bytes will be printed nicely.5354See :class:`Path` for all features.5556Example:5758.. click:example::5960 @click.command()61 @click.argument('filename', type=click.Path(exists=True))62 def touch(filename):63 """Print FILENAME if the file exists."""64 click.echo(click.format_filename(filename))6566And from the command line:6768.. click:run::6970 with isolated_filesystem():71 with open('hello.txt', 'w') as f:72 f.write('Hello World!\n')73 invoke(touch, args=['hello.txt'])74 println()75 invoke(touch, args=['missing.txt'])767778File Opening Behaviors79-----------------------------8081The :class:`File` type attempts to be "intelligent" about when to open a file. Stdin/stdout and files opened for reading will be opened immediately. This will give the user direct feedback when a file cannot be opened. Files opened for writing will only be open on the first IO operation. This is done by automatically wrapping the file in a special wrapper.8283File open behavior can be controlled by the boolean kwarg ``lazy``. If a file is opened lazily:8485* A failure at first IO operation will happen by raising an :exc:`FileError`.86* It can help minimize resource handling confusion. If a file is opened in lazy mode, it will call :meth:`LazyFile.close_intelligently` to help figure out if the file needs closing or not. This is not needed for parameters, but is necessary for manually prompting. For manual prompts with the :func:`prompt` function you do not know if a stream like stdout was opened (which was already open before) or a real file was opened (that needs closing).8788Since files opened for writing will typically empty the file, the lazy mode should only be disabled if the developer is absolutely sure that this is intended behavior.8990It is also possible to open files in atomic mode by passing ``atomic=True``. In atomic mode, all writes go into a separate file in the same folder, and upon completion, the file will be moved over to the original location. This is useful if a file regularly read by other users is modified.
modified:docs/index.rst+52 added-18 removed
1 unmodified line
23Welcome to Click4================56.. image:: _static/click-logo.png6.. image:: _static/click-name.svg7 :align: center8 :scale: 50%9 :target: https://palletsprojects.com/p/click/8 :height: 200px910Click is a Python package for creating beautiful command line interfaces11in a composable way with as little code as necessary. It's the "Command12Line Interface Creation Kit". It's highly configurable but comes with
43 unmodified lines
5657 pip install click5859Documentation61-------------60==============6163This part of the documentation guides you through all of the library's64usage patterns.6562.. toctree::63 :maxdepth: 26469 why65 faqs6667Tutorials68------------69.. toctree::70 :maxdepth: 17172 quickstart71 entry-points73 virtualenv7475How to Guides76---------------77.. toctree::78 :maxdepth: 17980 entry-points81 setuptools82 support-multiple-versions8384Conceptual Guides85-------------------86.. toctree::87 :maxdepth: 18889 why90 click-concepts9192General Reference93--------------------9495.. toctree::96 :maxdepth: 19798 parameters99 parameter-types100 options101 option-decorators102 arguments103 commands-and-groups104 commands78 prompts105 documentation80 complex106 prompts107 handling-files108 advanced109 complex110 extending-click111 testing112 utils113 shell-completion114 exceptions115 unicode-support116 wincmd117118API Reference90-------------119-------------------12092If you are looking for information on a specific function, class, or93method, this part of the documentation is for you.94121.. toctree::122 :maxdepth: 2123124 api125100Miscellaneous Pages101-------------------126About Project127===============128129* This documentation is structured according to `Diataxis <https://diataxis.fr/>`_130131* `Version Policy <https://palletsprojects.com/versions>`_132133* `Contributing <https://palletsprojects.com/contributing/>`_134135* `Donate <https://palletsprojects.com/donate>`_136137.. toctree::104 :maxdepth: 2138 :maxdepth: 1139140 contrib141 license142 changes
deleted:docs/make.bat-36 removed
1@ECHO OFF23pushd %~dp045REM Command file for Sphinx documentation67if "%SPHINXBUILD%" == "" (8 set SPHINXBUILD=sphinx-build9)10set SOURCEDIR=.11set BUILDDIR=_build12set SPHINXPROJ=Jinja1314if "%1" == "" goto help1516%SPHINXBUILD% >NUL 2>NUL17if errorlevel 9009 (18 echo.19 echo.The 'sphinx-build' command was not found. Make sure you have Sphinx20 echo.installed, then set the SPHINXBUILD environment variable to point21 echo.to the full path of the 'sphinx-build' executable. Alternatively you22 echo.may add the Sphinx directory to PATH.23 echo.24 echo.If you don't have Sphinx installed, grab it from25 echo.http://sphinx-doc.org/26 exit /b 127)2829%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%30goto end3132:help33%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%3435:end36popd
deleted:docs/Makefile-20 removed
1# Minimal makefile for Sphinx documentation2#34# You can set these variables from the command line.5SPHINXOPTS =6SPHINXBUILD = sphinx-build7SPHINXPROJ = Jinja8SOURCEDIR = .9BUILDDIR = _build1011# Put it first so that "make" without argument is like "make help".12help:13 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)1415.PHONY: help Makefile1617# Catch-all target: route all unknown targets to Sphinx using the new18# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).19%: Makefile20 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
added:docs/option-decorators.rst+84 added
1Options Shortcut Decorators2===========================34.. currentmodule:: click56For convenience commonly used combinations of options arguments are available as their own decorators.78.. contents::9 :depth: 210 :local:1112Password Option13------------------1415Click supports hidden prompts and asking for confirmation. This is16useful for password input:1718.. click:example::1920 import codecs2122 @click.command()23 @click.option(24 "--password", prompt=True, hide_input=True,25 confirmation_prompt=True26 )27 def encode(password):28 click.echo(f"encoded: {codecs.encode(password, 'rot13')}")2930.. click:run::3132 invoke(encode, input=['secret', 'secret'])3334Because this combination of parameters is quite common, this can also be35replaced with the :func:`password_option` decorator:3637.. code-block:: python3839 @click.command()40 @click.password_option()41 def encrypt(password):42 click.echo(f"encoded: to {codecs.encode(password, 'rot13')}")4344Confirmation Option45--------------------4647For dangerous operations, it's very useful to be able to ask a user for48confirmation. This can be done by adding a boolean ``--yes`` flag and49asking for confirmation if the user did not provide it and to fail in a50callback:5152.. click:example::5354 def abort_if_false(ctx, param, value):55 if not value:56 ctx.abort()5758 @click.command()59 @click.option('--yes', is_flag=True, callback=abort_if_false,60 expose_value=False,61 prompt='Are you sure you want to drop the db?')62 def dropdb():63 click.echo('Dropped all tables!')6465And what it looks like on the command line:6667.. click:run::6869 invoke(dropdb, input=['n'])70 invoke(dropdb, args=['--yes'])7172Because this combination of parameters is quite common, this can also be73replaced with the :func:`confirmation_option` decorator:7475.. click:example::7677 @click.command()78 @click.confirmation_option(prompt='Are you sure you want to drop the db?')79 def dropdb():80 click.echo('Dropped all tables!')8182Version Option83----------------84:func:`version_option` adds a ``--version`` option which immediately prints the version number and exits the program.
added:docs/options.md+476 added
1(options)=23# Options45```{eval-rst}6.. currentmodule:: click7```89Adding options to commands can be accomplished with the {func}`option`10decorator. At runtime the decorator invokes the {class}`Option` class. Options in Click are distinct from {ref}`positional arguments <arguments>`.1112Useful and often used kwargs are:1314- `default`: Passes a default.15- `help`: Sets help message.16- `nargs`: Sets the number of arguments.17- `required`: Makes option required.18- `type`: Sets {ref}`parameter type <parameter-types>`1920```{contents}21:depth: 222:local: true23```2425## Option Decorator2627Click expects you to pass at least two positional arguments to the option decorator. They are option name and function argument name.2829```{eval-rst}30.. click:example::3132 @click.command()33 @click.option('--string-to-echo', 'string_to_echo')34 def echo(string_to_echo):35 click.echo(string_to_echo)363738.. click:run::3940 invoke(echo, args=['--help'])41```4243However, if you don't pass in the function argument name, then Click will try to infer it. A simple way to name your option is by taking the function argument, adding two dashes to the front and converting underscores to dashes. In this case, Click will infer the function argument name correctly so you can add only the option name.4445```{eval-rst}46.. click:example::4748 @click.command()49 @click.option('--string-to-echo')50 def echo(string_to_echo):51 click.echo(string_to_echo)5253.. click:run::5455 invoke(echo, args=['--string-to-echo', 'Hi!'])56```5758More formally, Click will try to infer the function argument name by:59601. If a positional argument name does not have a prefix, it is chosen.612. If a positional argument name starts with with two dashes, the first one given is chosen.623. The first positional argument prefixed with one dash is chosen otherwise.6364The chosen positional argument is converted to lower case, up to two dashes are removed from the beginning, and other dashes are converted to underscores to get the function argument name.6566```{eval-rst}67.. list-table:: Examples68 :widths: 15 1069 :header-rows: 17071 * - Decorator Arguments72 - Function Name73 * - ``"-f", "--foo-bar"``74 - foo_bar75 * - ``"-x"``76 - x77 * - ``"-f", "--filename", "dest"``78 - dest79 * - ``"--CamelCase"``80 - camelcase81 * - ``"-f", "-fb"``82 - f83 * - ``"--f", "--foo-bar"``84 - f85 * - ``"---f"``86 - _f87```8889## Basic Example9091A simple {class}`click.Option` takes one argument. This will assume the argument is not required. If the decorated function takes an positional argument then None is passed it. This will also assume the type is `str`.9293```{eval-rst}94.. click:example::9596 @click.command()97 @click.option('--text')98 def print_this(text):99 click.echo(text)100101102.. click:run::103104 invoke(print_this, args=['--text=this'])105106 invoke(print_this, args=[])107108109.. click:run::110111 invoke(print_this, args=['--help'])112113```114115## Setting a Default116117Instead of setting the `type`, you may set a default and Click will try to infer the type.118119```{eval-rst}120.. click:example::121122 @click.command()123 @click.option('--n', default=1)124 def dots(n):125 click.echo('.' * n)126127.. click:run::128129 invoke(dots, args=['--help'])130```131132## Multi Value Options133134To make an option take multiple values, pass in `nargs`. Note only a fixed number of arguments is supported. The values are passed to the underlying function as a tuple.135136```{eval-rst}137.. click:example::138139 @click.command()140 @click.option('--pos', nargs=2, type=float)141 def findme(pos):142 a, b = pos143 click.echo(f"{a} / {b}")144145.. click:run::146147 invoke(findme, args=['--pos', '2.0', '3.0'])148149```150151(tuple-type)=152153## Multi Value Options as Tuples154155```{versionadded} 4.0156```157158As you can see that by using `nargs` set to a specific number each item in159the resulting tuple is of the same type. This might not be what you want.160Commonly you might want to use different types for different indexes in161the tuple. For this you can directly specify a tuple as type:162163```{eval-rst}164.. click:example::165166 @click.command()167 @click.option('--item', type=(str, int))168 def putitem(item):169 name, id = item170 click.echo(f"name={name} id={id}")171172173And on the command line:174175.. click:run::176177 invoke(putitem, args=['--item', 'peter', '1338'])178```179180By using a tuple literal as type, `nargs` gets automatically set to the181length of the tuple and the {class}`click.Tuple` type is automatically182used. The above example is thus equivalent to this:183184```{eval-rst}185.. click:example::186187 @click.command()188 @click.option('--item', nargs=2, type=click.Tuple([str, int]))189 def putitem(item):190 name, id = item191 click.echo(f"name={name} id={id}")192```193194(multiple-options)=195196## Multiple Options197198The multiple options format allows you to call the underlying function multiple times with one command line entry. If set, the default must be a list or tuple. Setting a string as a default will be interpreted as list of characters.199200```{eval-rst}201.. click:example::202203 @click.command()204 @click.option('--message', '-m', multiple=True)205 def commit(message):206 click.echo('\n'.join(message))207208.. click:run::209210 invoke(commit, args=['-m', 'foo', '-m', 'bar', '-m', 'here'])211```212213## Counting214215To count the occurrence of an option pass in `count=True`. If the option is not passed in, then the count is 0. Counting is commonly used for verbosity.216217```{eval-rst}218.. click:example::219220 @click.command()221 @click.option('-v', '--verbose', count=True)222 def log(verbose):223 click.echo(f"Verbosity: {verbose}")224225.. click:run::226227 invoke(log, args=[])228 invoke(log, args=['-vvv'])229```230231(option-boolean-flag)=232233## Boolean234235Boolean options (boolean flags) take the value True or False. The simplest case sets the default value to `False` if the flag is not passed, and `True` if it is.236237```{eval-rst}238.. click:example::239240 import sys241242 @click.command()243 @click.option('--shout', is_flag=True)244 def info(shout):245 rv = sys.platform246 if shout:247 rv = rv.upper() + '!!!!111'248 click.echo(rv)249250251.. click:run::252253 invoke(info)254 invoke(info, args=['--shout'])255256```257258To implement this more explicitly, pass in on-option `/` off-option. Click will automatically set `is_flag=True`. Click always wants you to provide an enable259and disable flag so that you can change the default later.260261```{eval-rst}262.. click:example::263264 import sys265266 @click.command()267 @click.option('--shout/--no-shout', default=False)268 def info(shout):269 rv = sys.platform270 if shout:271 rv = rv.upper() + '!!!!111'272 click.echo(rv)273274.. click:run::275276 invoke(info)277 invoke(info, args=['--shout'])278 invoke(info, args=['--no-shout'])279```280281If a forward slash(`/`) is contained in your option name already, you can split the parameters using `;`. In Windows `/` is commonly used as the prefix character.282283```{eval-rst}284.. click:example::285286 @click.command()287 @click.option('/debug;/no-debug')288 def log(debug):289 click.echo(f"debug={debug}")290```291292```{versionchanged} 6.0293```294295If you want to define an alias for the second option only, then you will need to use leading whitespace to disambiguate the format string.296297```{eval-rst}298.. click:example::299300 import sys301302 @click.command()303 @click.option('--shout/--no-shout', ' /-N', default=False)304 def info(shout):305 rv = sys.platform306 if shout:307 rv = rv.upper() + '!!!!111'308 click.echo(rv)309310.. click:run::311312 invoke(info, args=['--help'])313```314315## Flag Value316317To have an flag pass a value to the underlying function set `flag_value`. This automatically sets `is_flag=True`. To set a default flag, set `default=True`. Setting flag values can be used to create patterns like this:318319```{eval-rst}320.. click:example::321322 import sys323324 @click.command()325 @click.option('--upper', 'transformation', flag_value='upper', default=True)326 @click.option('--lower', 'transformation', flag_value='lower')327 def info(transformation):328 click.echo(getattr(sys.platform, transformation)())329330.. click:run::331332 invoke(info, args=['--help'])333 invoke(info, args=['--upper'])334 invoke(info, args=['--lower'])335 invoke(info)336```337338## Values from Environment Variables339340To pass in a value in from a specific environment variable use `envvar`.341342```{eval-rst}343.. click:example::344345 @click.command()346 @click.option('--username', envvar='USERNAME')347 def greet(username):348 click.echo(f"Hello {username}!")349350.. click:run::351352 invoke(greet, env={'USERNAME': 'john'})353```354355If a list is passed to `envvar`, the first environment variable found is picked.356357```{eval-rst}358.. click:example::359360 @click.command()361 @click.option('--username', envvar=['ALT_USERNAME', 'USERNAME'])362 def greet(username):363 click.echo(f"Hello {username}!")364365.. click:run::366367 invoke(greet, env={'ALT_USERNAME': 'Bill', 'USERNAME': 'john'})368369```370371Variable names are:372 - [Case-insensitive on Windows but not on other platforms](https://github.com/python/cpython/blob/aa9eb5f757ceff461e6e996f12c89e5d9b583b01/Lib/os.py#L777-L789).373 - Not stripped of whitespaces and should match the exact name provided to the `envvar` argument.374375For flag options, there is two concepts to consider: the activation of the flag driven by the environment variable, and the value of the flag if it is activated.376377The environment variable need to be interpreted, because values read from them are always strings. We need to transform these strings into boolean values that will determine if the flag is activated or not.378379Here are the rules used to parse environment variable values for flag options:380 - `true`, `1`, `yes`, `on`, `t`, `y` are interpreted as activating the flag381 - `false`, `0`, `no`, `off`, `f`, `n` are interpreted as deactivating the flag382 - The presence of the environment variable without value is interpreted as deactivating the flag383 - Empty strings are interpreted as deactivating the flag384 - Values are case-insensitive, so the `True`, `TRUE`, `tRuE` strings are all activating the flag385 - Values are stripped of leading and trailing whitespaces before being interpreted, so the `" True "` string is transformed to `"true"` and so activates the flag386 - If the flag option has a `flag_value` argument, passing that value in the environment variable will activate the flag, in addition to all the cases described above387 - Any other value is interpreted as deactivating the flag388389.. caution::390 For boolean flags with a pair of values, the only recognized environment variable is the one provided to the `envvar` argument.391392 So an option defined as `--flag\--no-flag`, with a `envvar="FLAG"` parameter, there is no magical `NO_FLAG=<anything>` variable that is recognized. Only the `FLAG=<anything>` environment variable is recognized.393394Once the status of the flag has been determine to be activated or not, the `flag_value` is used as the value of the flag if it is activated. If the flag is not activated, the value of the flag is set to `None` by default.395396## Multiple Options from Environment Values397398As options can accept multiple values, pulling in such values from399environment variables (which are strings) is a bit more complex. The way400Click solves this is by leaving it up to the type to customize this401behavior. For both `multiple` and `nargs` with values other than402`1`, Click will invoke the {meth}`ParamType.split_envvar_value` method to403perform the splitting.404405The default implementation for all types is to split on whitespace. The406exceptions to this rule are the {class}`File` and {class}`Path` types407which both split according to the operating system's path splitting rules.408On Unix systems like Linux and OS X, the splitting happens on409every colon (`:`), and for Windows, splitting on every semicolon (`;`).410411```{eval-rst}412.. click:example::413414 @click.command()415 @click.option('paths', '--path', envvar='PATHS', multiple=True,416 type=click.Path())417 def perform(paths):418 for path in paths:419 click.echo(path)420421 if __name__ == '__main__':422 perform()423424.. click:run::425426 import os427 invoke(perform, env={"PATHS": f"./foo/bar{os.path.pathsep}./test"})428```429430## Other Prefix Characters431432Click can deal with prefix characters besides `-` for options. Click can use433`/`, `+` as well as others. Note that alternative prefix characters are generally used very sparingly if at all within POSIX.434435```{eval-rst}436.. click:example::437438 @click.command()439 @click.option('+w/-w')440 def chmod(w):441 click.echo(f"writable={w}")442443.. click:run::444445 invoke(chmod, args=['+w'])446 invoke(chmod, args=['-w'])447```448449There are special considerations for using `/` as prefix character, see {ref}`option-boolean-flag` for more.450451(optional-value)=452453## Optional Value454455Providing the value to an option can be made optional, in which case456providing only the option's flag without a value will either show a457prompt or use its `flag_value`.458459Setting `is_flag=False, flag_value=value` tells Click that the option460can still be passed a value, but if only the flag is given, the461value will be `flag_value`.462463```{eval-rst}464.. click:example::465466 @click.command()467 @click.option("--name", is_flag=False, flag_value="Flag", default="Default")468 def hello(name):469 click.echo(f"Hello, {name}!")470471.. click:run::472473 invoke(hello, args=[])474 invoke(hello, args=["--name", "Value"])475 invoke(hello, args=["--name"])476```
deleted:docs/options.rst-927 removed
1.. _options:23Options4=======56.. currentmodule:: click78Adding options to commands can be accomplished by the :func:`option`9decorator. Since options can come in various different versions, there10are a ton of parameters to configure their behavior. Options in click are11distinct from :ref:`positional arguments <arguments>`.1213Name Your Options14-----------------1516Options have a name that will be used as the Python argument name when17calling the decorated function. This can be inferred from the option18names or given explicitly. Names are given as position arguments to the19decorator.2021A name is chosen in the following order22231. If a name is not prefixed, it is used as the Python argument name24 and not treated as an option name on the command line.252. If there is at least one name prefixed with two dashes, the first26 one given is used as the name.273. The first name prefixed with one dash is used otherwise.2829To get the Python argument name, the chosen name is converted to lower30case, up to two dashes are removed as the prefix, and other dashes are31converted to underscores.3233.. code-block:: python3435 @click.command()36 @click.option('-s', '--string-to-echo')37 def echo(string_to_echo):38 click.echo(string_to_echo)3940.. code-block:: python4142 @click.command()43 @click.option('-s', '--string-to-echo', 'string')44 def echo(string):45 click.echo(string)4647- ``"-f", "--foo-bar"``, the name is ``foo_bar``48- ``"-x"``, the name is ``x``49- ``"-f", "--filename", "dest"``, the name is ``dest``50- ``"--CamelCase"``, the name is ``camelcase``51- ``"-f", "-fb"``, the name is ``f``52- ``"--f", "--foo-bar"``, the name is ``f``53- ``"---f"``, the name is ``_f``5455Basic Value Options56-------------------5758The most basic option is a value option. These options accept one59argument which is a value. If no type is provided, the type of the default60value is used. If no default value is provided, the type is assumed to be61:data:`STRING`. Unless a name is explicitly specified, the name of the62parameter is the first long option defined; otherwise the first short one is63used. By default, options are not required, however to make an option required,64simply pass in `required=True` as an argument to the decorator.6566.. click:example::6768 @click.command()69 @click.option('--n', default=1)70 def dots(n):71 click.echo('.' * n)7273.. click:example::7475 # How to make an option required76 @click.command()77 @click.option('--n', required=True, type=int)78 def dots(n):79 click.echo('.' * n)8081.. click:example::8283 # How to use a Python reserved word such as `from` as a parameter84 @click.command()85 @click.option('--from', '-f', 'from_')86 @click.option('--to', '-t')87 def reserved_param_name(from_, to):88 click.echo(f"from {from_} to {to}")8990And on the command line:9192.. click:run::9394 invoke(dots, args=['--n=2'])9596In this case the option is of type :data:`INT` because the default value97is an integer.9899To show the default values when showing command help, use ``show_default=True``100101.. click:example::102103 @click.command()104 @click.option('--n', default=1, show_default=True)105 def dots(n):106 click.echo('.' * n)107108.. click:run::109110 invoke(dots, args=['--help'])111112For single option boolean flags, the default remains hidden if the default113value is False.114115.. click:example::116117 @click.command()118 @click.option('--n', default=1, show_default=True)119 @click.option("--gr", is_flag=True, show_default=True, default=False, help="Greet the world.")120 @click.option("--br", is_flag=True, show_default=True, default=True, help="Add a thematic break")121 def dots(n, gr, br):122 if gr:123 click.echo('Hello world!')124 click.echo('.' * n)125 if br:126 click.echo('-' * n)127128.. click:run::129130 invoke(dots, args=['--help'])131132133Multi Value Options134-------------------135136Sometimes, you have options that take more than one argument. For options,137only a fixed number of arguments is supported. This can be configured by138the ``nargs`` parameter. The values are then stored as a tuple.139140.. click:example::141142 @click.command()143 @click.option('--pos', nargs=2, type=float)144 def findme(pos):145 a, b = pos146 click.echo(f"{a} / {b}")147148And on the command line:149150.. click:run::151152 invoke(findme, args=['--pos', '2.0', '3.0'])153154.. _tuple-type:155156Tuples as Multi Value Options157-----------------------------158159.. versionadded:: 4.0160161As you can see that by using `nargs` set to a specific number each item in162the resulting tuple is of the same type. This might not be what you want.163Commonly you might want to use different types for different indexes in164the tuple. For this you can directly specify a tuple as type:165166.. click:example::167168 @click.command()169 @click.option('--item', type=(str, int))170 def putitem(item):171 name, id = item172 click.echo(f"name={name} id={id}")173174And on the command line:175176.. click:run::177178 invoke(putitem, args=['--item', 'peter', '1338'])179180By using a tuple literal as type, `nargs` gets automatically set to the181length of the tuple and the :class:`click.Tuple` type is automatically182used. The above example is thus equivalent to this:183184.. click:example::185186 @click.command()187 @click.option('--item', nargs=2, type=click.Tuple([str, int]))188 def putitem(item):189 name, id = item190 click.echo(f"name={name} id={id}")191192.. _multiple-options:193194Multiple Options195----------------196197Similarly to ``nargs``, there is also the case of wanting to support a198parameter being provided multiple times and have all the values recorded --199not just the last one. For instance, ``git commit -m foo -m bar`` would200record two lines for the commit message: ``foo`` and ``bar``. This can be201accomplished with the ``multiple`` flag:202203Example:204205.. click:example::206207 @click.command()208 @click.option('--message', '-m', multiple=True)209 def commit(message):210 click.echo('\n'.join(message))211212And on the command line:213214.. click:run::215216 invoke(commit, args=['-m', 'foo', '-m', 'bar'])217218When passing a ``default`` with ``multiple=True``, the default value219must be a list or tuple, otherwise it will be interpreted as a list of220single characters.221222.. code-block:: python223224 @click.option("--format", multiple=True, default=["json"])225226227Counting228--------229230In some very rare circumstances, it is interesting to use the repetition231of options to count an integer up. This can be used for verbosity flags,232for instance:233234.. click:example::235236 @click.command()237 @click.option('-v', '--verbose', count=True)238 def log(verbose):239 click.echo(f"Verbosity: {verbose}")240241And on the command line:242243.. click:run::244245 invoke(log, args=['-vvv'])246247Boolean Flags248-------------249250Boolean flags are options that can be enabled or disabled. This can be251accomplished by defining two flags in one go separated by a slash (``/``)252for enabling or disabling the option. (If a slash is in an option string,253Click automatically knows that it's a boolean flag and will pass254``is_flag=True`` implicitly.) Click always wants you to provide an enable255and disable flag so that you can change the default later.256257Example:258259.. click:example::260261 import sys262263 @click.command()264 @click.option('--shout/--no-shout', default=False)265 def info(shout):266 rv = sys.platform267 if shout:268 rv = rv.upper() + '!!!!111'269 click.echo(rv)270271And on the command line:272273.. click:run::274275 invoke(info, args=['--shout'])276 invoke(info, args=['--no-shout'])277 invoke(info)278279If you really don't want an off-switch, you can just define one and280manually inform Click that something is a flag:281282.. click:example::283284 import sys285286 @click.command()287 @click.option('--shout', is_flag=True)288 def info(shout):289 rv = sys.platform290 if shout:291 rv = rv.upper() + '!!!!111'292 click.echo(rv)293294And on the command line:295296.. click:run::297298 invoke(info, args=['--shout'])299 invoke(info)300301Note that if a slash is contained in your option already (for instance, if302you use Windows-style parameters where ``/`` is the prefix character), you303can alternatively split the parameters through ``;`` instead:304305.. click:example::306307 @click.command()308 @click.option('/debug;/no-debug')309 def log(debug):310 click.echo(f"debug={debug}")311312 if __name__ == '__main__':313 log()314315.. versionchanged:: 6.0316317If you want to define an alias for the second option only, then you will318need to use leading whitespace to disambiguate the format string:319320Example:321322.. click:example::323324 import sys325326 @click.command()327 @click.option('--shout/--no-shout', ' /-S', default=False)328 def info(shout):329 rv = sys.platform330 if shout:331 rv = rv.upper() + '!!!!111'332 click.echo(rv)333334.. click:run::335336 invoke(info, args=['--help'])337338Feature Switches339----------------340341In addition to boolean flags, there are also feature switches. These are342implemented by setting multiple options to the same parameter name and343defining a flag value. Note that by providing the ``flag_value`` parameter,344Click will implicitly set ``is_flag=True``.345346To set a default flag, assign a value of `True` to the flag that should be347the default.348349.. click:example::350351 import sys352353 @click.command()354 @click.option('--upper', 'transformation', flag_value='upper',355 default=True)356 @click.option('--lower', 'transformation', flag_value='lower')357 def info(transformation):358 click.echo(getattr(sys.platform, transformation)())359360And on the command line:361362.. click:run::363364 invoke(info, args=['--upper'])365 invoke(info, args=['--lower'])366 invoke(info)367368.. _choice-opts:369370Choice Options371--------------372373Sometimes, you want to have a parameter be a choice of a list of values.374In that case you can use :class:`Choice` type. It can be instantiated375with a list of valid values. The originally passed choice will be returned,376not the str passed on the command line. Token normalization functions and377``case_sensitive=False`` can cause the two to be different but still match.378379Example:380381.. click:example::382383 @click.command()384 @click.option('--hash-type',385 type=click.Choice(['MD5', 'SHA1'], case_sensitive=False))386 def digest(hash_type):387 click.echo(hash_type)388389What it looks like:390391.. click:run::392393 invoke(digest, args=['--hash-type=MD5'])394 println()395 invoke(digest, args=['--hash-type=md5'])396 println()397 invoke(digest, args=['--hash-type=foo'])398 println()399 invoke(digest, args=['--help'])400401Only pass the choices as list or tuple. Other iterables (like402generators) may lead to unexpected results.403404Choices work with options that have ``multiple=True``. If a ``default``405value is given with ``multiple=True``, it should be a list or tuple of406valid choices.407408Choices should be unique after considering the effects of409``case_sensitive`` and any specified token normalization function.410411.. versionchanged:: 7.1412 The resulting value from an option will always be one of the413 originally passed choices regardless of ``case_sensitive``.414415.. _option-prompting:416417Prompting418---------419420In some cases, you want parameters that can be provided from the command line,421but if not provided, ask for user input instead. This can be implemented with422Click by defining a prompt string.423424Example:425426.. click:example::427428 @click.command()429 @click.option('--name', prompt=True)430 def hello(name):431 click.echo(f"Hello {name}!")432433And what it looks like:434435.. click:run::436437 invoke(hello, args=['--name=John'])438 invoke(hello, input=['John'])439440If you are not happy with the default prompt string, you can ask for441a different one:442443.. click:example::444445 @click.command()446 @click.option('--name', prompt='Your name please')447 def hello(name):448 click.echo(f"Hello {name}!")449450What it looks like:451452.. click:run::453454 invoke(hello, input=['John'])455456It is advised that prompt not be used in conjunction with the multiple457flag set to True. Instead, prompt in the function interactively.458459By default, the user will be prompted for an input if one was not passed460through the command line. To turn this behavior off, see461:ref:`optional-value`.462463464Password Prompts465----------------466467Click also supports hidden prompts and asking for confirmation. This is468useful for password input:469470.. click:example::471472 import codecs473474 @click.command()475 @click.option(476 "--password", prompt=True, hide_input=True,477 confirmation_prompt=True478 )479 def encode(password):480 click.echo(f"encoded: {codecs.encode(password, 'rot13')}")481482.. click:run::483484 invoke(encode, input=['secret', 'secret'])485486Because this combination of parameters is quite common, this can also be487replaced with the :func:`password_option` decorator:488489.. code-block:: python490491 @click.command()492 @click.password_option()493 def encrypt(password):494 click.echo(f"encoded: to {codecs.encode(password, 'rot13')}")495496497Dynamic Defaults for Prompts498----------------------------499500The ``auto_envvar_prefix`` and ``default_map`` options for the context501allow the program to read option values from the environment or a502configuration file. However, this overrides the prompting mechanism, so503that the user does not get the option to change the value interactively.504505If you want to let the user configure the default value, but still be506prompted if the option isn't specified on the command line, you can do so507by supplying a callable as the default value. For example, to get a default508from the environment:509510.. code-block:: python511512 import os513514 @click.command()515 @click.option(516 "--username", prompt=True,517 default=lambda: os.environ.get("USER", "")518 )519 def hello(username):520 click.echo(f"Hello, {username}!")521522To describe what the default value will be, set it in ``show_default``.523524.. click:example::525526 import os527528 @click.command()529 @click.option(530 "--username", prompt=True,531 default=lambda: os.environ.get("USER", ""),532 show_default="current user"533 )534 def hello(username):535 click.echo(f"Hello, {username}!")536537.. click:run::538539 invoke(hello, args=["--help"])540541542Callbacks and Eager Options543---------------------------544545Sometimes, you want a parameter to completely change the execution flow.546For instance, this is the case when you want to have a ``--version``547parameter that prints out the version and then exits the application.548549Note: an actual implementation of a ``--version`` parameter that is550reusable is available in Click as :func:`click.version_option`. The code551here is merely an example of how to implement such a flag.552553In such cases, you need two concepts: eager parameters and a callback. An554eager parameter is a parameter that is handled before others, and a555callback is what executes after the parameter is handled. The eagerness556is necessary so that an earlier required parameter does not produce an557error message. For instance, if ``--version`` was not eager and a558parameter ``--foo`` was required and defined before, you would need to559specify it for ``--version`` to work. For more information, see560:ref:`callback-evaluation-order`.561562A callback is a function that is invoked with three parameters: the563current :class:`Context`, the current :class:`Parameter`, and the value.564The context provides some useful features such as quitting the565application and gives access to other already processed parameters.566567Here's an example for a ``--version`` flag:568569.. click:example::570571 def print_version(ctx, param, value):572 if not value or ctx.resilient_parsing:573 return574 click.echo('Version 1.0')575 ctx.exit()576577 @click.command()578 @click.option('--version', is_flag=True, callback=print_version,579 expose_value=False, is_eager=True)580 def hello():581 click.echo('Hello World!')582583The `expose_value` parameter prevents the pretty pointless ``version``584parameter from being passed to the callback. If that was not specified, a585boolean would be passed to the `hello` script. The `resilient_parsing`586flag is applied to the context if Click wants to parse the command line587without any destructive behavior that would change the execution flow. In588this case, because we would exit the program, we instead do nothing.589590What it looks like:591592.. click:run::593594 invoke(hello)595 invoke(hello, args=['--version'])596597598Yes Parameters599--------------600601For dangerous operations, it's very useful to be able to ask a user for602confirmation. This can be done by adding a boolean ``--yes`` flag and603asking for confirmation if the user did not provide it and to fail in a604callback:605606.. click:example::607608 def abort_if_false(ctx, param, value):609 if not value:610 ctx.abort()611612 @click.command()613 @click.option('--yes', is_flag=True, callback=abort_if_false,614 expose_value=False,615 prompt='Are you sure you want to drop the db?')616 def dropdb():617 click.echo('Dropped all tables!')618619And what it looks like on the command line:620621.. click:run::622623 invoke(dropdb, input=['n'])624 invoke(dropdb, args=['--yes'])625626Because this combination of parameters is quite common, this can also be627replaced with the :func:`confirmation_option` decorator:628629.. click:example::630631 @click.command()632 @click.confirmation_option(prompt='Are you sure you want to drop the db?')633 def dropdb():634 click.echo('Dropped all tables!')635636637Values from Environment Variables638---------------------------------639640A very useful feature of Click is the ability to accept parameters from641environment variables in addition to regular parameters. This allows642tools to be automated much easier. For instance, you might want to pass643a configuration file with a ``--config`` parameter but also support exporting644a ``TOOL_CONFIG=hello.cfg`` key-value pair for a nicer development645experience.646647This is supported by Click in two ways. One is to automatically build648environment variables which is supported for options only. To enable this649feature, the ``auto_envvar_prefix`` parameter needs to be passed to the650script that is invoked. Each command and parameter is then added as an651uppercase underscore-separated variable. If you have a subcommand652called ``run`` taking an option called ``reload`` and the prefix is653``WEB``, then the variable is ``WEB_RUN_RELOAD``.654655Example usage:656657.. click:example::658659 @click.command()660 @click.option('--username')661 def greet(username):662 click.echo(f'Hello {username}!')663664 if __name__ == '__main__':665 greet(auto_envvar_prefix='GREETER')666667And from the command line:668669.. click:run::670671 invoke(greet, env={'GREETER_USERNAME': 'john'},672 auto_envvar_prefix='GREETER')673674When using ``auto_envvar_prefix`` with command groups, the command name675needs to be included in the environment variable, between the prefix and676the parameter name, *i.e.* ``PREFIX_COMMAND_VARIABLE``. If you have a677subcommand called ``run-server`` taking an option called ``host`` and678the prefix is ``WEB``, then the variable is ``WEB_RUN_SERVER_HOST``.679680Example:681682.. click:example::683684 @click.group()685 @click.option('--debug/--no-debug')686 def cli(debug):687 click.echo(f"Debug mode is {'on' if debug else 'off'}")688689 @cli.command()690 @click.option('--username')691 def greet(username):692 click.echo(f"Hello {username}!")693694 if __name__ == '__main__':695 cli(auto_envvar_prefix='GREETER')696697.. click:run::698699 invoke(cli, args=['greet',],700 env={'GREETER_GREET_USERNAME': 'John', 'GREETER_DEBUG': 'false'},701 auto_envvar_prefix='GREETER')702703704The second option is to manually pull values in from specific environment705variables by defining the name of the environment variable on the option.706707Example usage:708709.. click:example::710711 @click.command()712 @click.option('--username', envvar='USERNAME')713 def greet(username):714 click.echo(f"Hello {username}!")715716 if __name__ == '__main__':717 greet()718719And from the command line:720721.. click:run::722723 invoke(greet, env={'USERNAME': 'john'})724725In that case it can also be a list of different environment variables726where the first one is picked.727728Multiple Values from Environment Values729---------------------------------------730731As options can accept multiple values, pulling in such values from732environment variables (which are strings) is a bit more complex. The way733Click solves this is by leaving it up to the type to customize this734behavior. For both ``multiple`` and ``nargs`` with values other than735``1``, Click will invoke the :meth:`ParamType.split_envvar_value` method to736perform the splitting.737738The default implementation for all types is to split on whitespace. The739exceptions to this rule are the :class:`File` and :class:`Path` types740which both split according to the operating system's path splitting rules.741On Unix systems like Linux and OS X, the splitting happens for those on742every colon (``:``), and for Windows, on every semicolon (``;``).743744Example usage:745746.. click:example::747748 @click.command()749 @click.option('paths', '--path', envvar='PATHS', multiple=True,750 type=click.Path())751 def perform(paths):752 for path in paths:753 click.echo(path)754755 if __name__ == '__main__':756 perform()757758And from the command line:759760.. click:run::761762 import os763 invoke(perform, env={"PATHS": f"./foo/bar{os.path.pathsep}./test"})764765Other Prefix Characters766-----------------------767768Click can deal with alternative prefix characters other than ``-`` for769options. This is for instance useful if you want to handle slashes as770parameters ``/`` or something similar. Note that this is strongly771discouraged in general because Click wants developers to stay close to772POSIX semantics. However in certain situations this can be useful:773774.. click:example::775776 @click.command()777 @click.option('+w/-w')778 def chmod(w):779 click.echo(f"writable={w}")780781 if __name__ == '__main__':782 chmod()783784And from the command line:785786.. click:run::787788 invoke(chmod, args=['+w'])789 invoke(chmod, args=['-w'])790791Note that if you are using ``/`` as prefix character and you want to use a792boolean flag you need to separate it with ``;`` instead of ``/``:793794.. click:example::795796 @click.command()797 @click.option('/debug;/no-debug')798 def log(debug):799 click.echo(f"debug={debug}")800801 if __name__ == '__main__':802 log()803804.. _ranges:805806Range Options807-------------808809The :class:`IntRange` type extends the :data:`INT` type to ensure the810value is contained in the given range. The :class:`FloatRange` type does811the same for :data:`FLOAT`.812813If ``min`` or ``max`` is omitted, that side is *unbounded*. Any value in814that direction is accepted. By default, both bounds are *closed*, which815means the boundary value is included in the accepted range. ``min_open``816and ``max_open`` can be used to exclude that boundary from the range.817818If ``clamp`` mode is enabled, a value that is outside the range is set819to the boundary instead of failing. For example, the range ``0, 5``820would return ``5`` for the value ``10``, or ``0`` for the value ``-1``.821When using :class:`FloatRange`, ``clamp`` can only be enabled if both822bounds are *closed* (the default).823824.. click:example::825826 @click.command()827 @click.option("--count", type=click.IntRange(0, 20, clamp=True))828 @click.option("--digit", type=click.IntRange(0, 9))829 def repeat(count, digit):830 click.echo(str(digit) * count)831832.. click:run::833834 invoke(repeat, args=['--count=100', '--digit=5'])835 invoke(repeat, args=['--count=6', '--digit=12'])836837838Callbacks for Validation839------------------------840841.. versionchanged:: 2.0842843If you want to apply custom validation logic, you can do this in the844parameter callbacks. These callbacks can both modify values as well as845raise errors if the validation does not work. The callback runs after846type conversion. It is called for all sources, including prompts.847848In Click 1.0, you can only raise the :exc:`UsageError` but starting with849Click 2.0, you can also raise the :exc:`BadParameter` error, which has the850added advantage that it will automatically format the error message to851also contain the parameter name.852853.. click:example::854855 def validate_rolls(ctx, param, value):856 if isinstance(value, tuple):857 return value858859 try:860 rolls, _, dice = value.partition("d")861 return int(dice), int(rolls)862 except ValueError:863 raise click.BadParameter("format must be 'NdM'")864865 @click.command()866 @click.option(867 "--rolls", type=click.UNPROCESSED, callback=validate_rolls,868 default="1d6", prompt=True,869 )870 def roll(rolls):871 sides, times = rolls872 click.echo(f"Rolling a {sides}-sided dice {times} time(s)")873874.. click:run::875876 invoke(roll, args=["--rolls=42"])877 println()878 invoke(roll, args=["--rolls=2d12"])879 println()880 invoke(roll, input=["42", "2d12"])881882883.. _optional-value:884885Optional Value886--------------887888Providing the value to an option can be made optional, in which case889providing only the option's flag without a value will either show a890prompt or use its ``flag_value``.891892Setting ``is_flag=False, flag_value=value`` tells Click that the option893can still be passed a value, but if only the flag is given the894``flag_value`` is used.895896.. click:example::897898 @click.command()899 @click.option("--name", is_flag=False, flag_value="Flag", default="Default")900 def hello(name):901 click.echo(f"Hello, {name}!")902903.. click:run::904905 invoke(hello, args=[])906 invoke(hello, args=["--name", "Value"])907 invoke(hello, args=["--name"])908909If the option has ``prompt`` enabled, then setting910``prompt_required=False`` tells Click to only show the prompt if the911option's flag is given, instead of if the option is not provided at all.912913.. click:example::914915 @click.command()916 @click.option('--name', prompt=True, prompt_required=False, default="Default")917 def hello(name):918 click.echo(f"Hello {name}!")919920.. click:run::921922 invoke(hello)923 invoke(hello, args=["--name", "Value"])924 invoke(hello, args=["--name"], input="Prompt")925926If ``required=True``, then the option will still prompt if it is not927given, but it will also prompt if only the flag is given.
added:docs/parameter-types.rst+181 added
1.. _parameter-types:23Parameter Types4==================56.. currentmodule:: click78When the parameter type is set using ``type``, Click will leverage the type to make your life easier, for example adding data to your help pages. Most examples are done with options, but types are available to options and arguments.910.. contents::11 :depth: 212 :local:1314Built-in Types Examples15------------------------1617.. _choice-opts:1819Choice20^^^^^^^^^^^^^^^^^^^^^^2122Sometimes, you want to have a parameter be a choice of a list of values.23In that case you can use :class:`Choice` type. It can be instantiated24with a list of valid values. The originally passed choice will be returned,25not the str passed on the command line. Token normalization functions and26``case_sensitive=False`` can cause the two to be different but still match.27:meth:`Choice.normalize_choice` for more info.2829Example:3031.. click:example::3233 import enum3435 class HashType(enum.Enum):36 MD5 = enum.auto()37 SHA1 = enum.auto()3839 @click.command()40 @click.option('--hash-type',41 type=click.Choice(HashType, case_sensitive=False))42 def digest(hash_type: HashType):43 click.echo(hash_type)4445What it looks like:4647.. click:run::4849 invoke(digest, args=['--hash-type=MD5'])50 println()51 invoke(digest, args=['--hash-type=md5'])52 println()53 invoke(digest, args=['--hash-type=foo'])54 println()55 invoke(digest, args=['--help'])5657Any iterable may be passed to :class:`Choice`. If an ``Enum`` is passed, the58names of the enum members will be used as valid choices.5960Choices work with options that have ``multiple=True``. If a ``default``61value is given with ``multiple=True``, it should be a list or tuple of62valid choices.6364Choices should be unique after normalization, see65:meth:`Choice.normalize_choice` for more info.6667.. versionchanged:: 7.168 The resulting value from an option will always be one of the69 originally passed choices regardless of ``case_sensitive``.7071.. _ranges:7273Int and Float Ranges74^^^^^^^^^^^^^^^^^^^^^^^7576The :class:`IntRange` type extends the :data:`INT` type to ensure the77value is contained in the given range. The :class:`FloatRange` type does78the same for :data:`FLOAT`.7980If ``min`` or ``max`` is omitted, that side is *unbounded*. Any value in81that direction is accepted. By default, both bounds are *closed*, which82means the boundary value is included in the accepted range. ``min_open``83and ``max_open`` can be used to exclude that boundary from the range.8485If ``clamp`` mode is enabled, a value that is outside the range is set86to the boundary instead of failing. For example, the range ``0, 5``87would return ``5`` for the value ``10``, or ``0`` for the value ``-1``.88When using :class:`FloatRange`, ``clamp`` can only be enabled if both89bounds are *closed* (the default).9091.. click:example::9293 @click.command()94 @click.option("--count", type=click.IntRange(0, 20, clamp=True))95 @click.option("--digit", type=click.IntRange(0, 9))96 def repeat(count, digit):97 click.echo(str(digit) * count)9899.. click:run::100101 invoke(repeat, args=['--count=100', '--digit=5'])102 invoke(repeat, args=['--count=6', '--digit=12'])103104105Built-in Types Listing106-----------------------107The supported parameter :ref:`click-api-types` are:108109* ``str`` / :data:`click.STRING`: The default parameter type which indicates unicode strings.110111* ``int`` / :data:`click.INT`: A parameter that only accepts integers.112113* ``float`` / :data:`click.FLOAT`: A parameter that only accepts floating point values.114115* ``bool`` / :data:`click.BOOL`: A parameter that accepts boolean values. This is automatically used116 for boolean flags. The string values "1", "true", "t", "yes", "y",117 and "on" convert to ``True``. "0", "false", "f", "no", "n", and118 "off" convert to ``False``.119120* :data:`click.UUID`:121 A parameter that accepts UUID values. This is not automatically122 guessed but represented as :class:`uuid.UUID`.123124* .. autoclass:: Choice125 :noindex:126127* .. autoclass:: DateTime128 :noindex:129130* .. autoclass:: File131 :noindex:132133* .. autoclass:: FloatRange134 :noindex:135136* .. autoclass:: IntRange137 :noindex:138139* .. autoclass:: Path140 :noindex:141142How to Implement Custom Types143-------------------------------144145To implement a custom type, you need to subclass the :class:`ParamType` class. For simple cases, passing a Python function that fails with a `ValueError` is also supported, though discouraged. Override the :meth:`~ParamType.convert` method to convert the value from a string to the correct type.146147The following code implements an integer type that accepts hex and octal148numbers in addition to normal integers, and converts them into regular149integers.150151.. code-block:: python152153 import click154155 class BasedIntParamType(click.ParamType):156 name = "integer"157158 def convert(self, value, param, ctx):159 if isinstance(value, int):160 return value161162 try:163 if value[:2].lower() == "0x":164 return int(value[2:], 16)165 elif value[:1] == "0":166 return int(value, 8)167 return int(value, 10)168 except ValueError:169 self.fail(f"{value!r} is not a valid integer", param, ctx)170171 BASED_INT = BasedIntParamType()172173The :attr:`~ParamType.name` attribute is optional and is used for174documentation. Call :meth:`~ParamType.fail` if conversion fails. The175``param`` and ``ctx`` arguments may be ``None`` in some cases such as176prompts.177178Values from user input or the command line will be strings, but default179values and Python arguments may already be the correct type. The custom180type should check at the top if the value is already valid and pass it181through to support those cases.
added:docs/parameters.md+55 added
1(parameters)=23# Parameters45```{currentmodule} click6```78Click supports only two principle types of parameters for scripts (by design): options and arguments.910## Options1112- Are optional.13- Recommended to use for everything except subcommands, urls, or files.14- Can take a fixed number of arguments. The default is 1. They may be specified multiple times using {ref}`multiple-options`.15- Are fully documented by the help page.16- Have automatic prompting for missing input.17- Can act as flags (boolean or otherwise).18- Can be pulled from environment variables.1920## Arguments2122- Are optional with in reason, but not entirely so.23- Recommended to use for subcommands, urls, or files.24- Can take an arbitrary number of arguments.25- Are not fully documented by the help page since they may be too specific to be automatically documented. For more see {ref}`documenting-arguments`.26- Can be pulled from environment variables but only explicitly named ones. For more see {ref}`environment-variables`.2728On each principle type you can specify {ref}`parameter-types`. Specifying these types helps Click add details to your help pages and help with the handling of those types.2930(parameter-names)=3132## Parameter Names3334Parameters (options and arguments) have a name that will be used as35the Python argument name when calling the decorated function with36values.3738In the example, the argument's name is `filename`. The name must match the python arg name. To provide a different name for use in help text, see {ref}`doc-meta-variables`.39The option's names are `-t` and `--times`. More names are available for options and are covered in {ref}`options`.4041```{eval-rst}42.. click:example::4344 @click.command()45 @click.argument('filename')46 @click.option('-t', '--times', type=int)47 def multi_echo(filename, times):48 """Print value filename multiple times."""49 for x in range(times):50 click.echo(filename)5152.. click:run::5354 invoke(multi_echo, ['--times=3', 'index.txt'], prog_name='multi_echo')55```
deleted:docs/parameters.rst-137 removed
1Parameters2==========34.. currentmodule:: click56Click supports only two types of parameters for scripts (by design): options and arguments.78Options9----------------1011* Are optional.12* Recommended to use for everything except subcommands, urls, or files.13* Can take a fixed number of arguments. The default is 1. They may be specified multiple times using :ref:`multiple-options`.14* Are fully documented by the help page.15* Have automatic prompting for missing input.16* Can act as flags (boolean or otherwise).17* Can be pulled from environment variables.1819Arguments20----------------2122* Are optional with in reason, but not entirely so.23* Recommended to use for subcommands, urls, or files.24* Can take an arbitrary number of arguments.25* Are not fully documented by the help page since they may be too specific to be automatically documented. For more see :ref:`documenting-arguments`.26* Can be pulled from environment variables but only explicitly named ones. For more see :ref:`environment-variables`.2728.. _parameter_names:2930Parameter Names31---------------3233Parameters (options and arguments) have a name that will be used as34the Python argument name when calling the decorated function with35values.3637.. click:example::3839 @click.command()40 @click.argument('filename')41 @click.option('-t', '--times', type=int)42 def multi_echo(filename, times):43 """Print value filename multiple times."""44 for x in range(times):45 click.echo(filename)4647In the above example the argument's name is ``filename``. The name must match the python arg name. To provide a different name for use in help text, see :ref:`doc-meta-variables`.48The option's names are ``-t`` and ``--times``. More names are available for options and are covered in :ref:`options`.4950And what it looks like when run:5152.. click:run::5354 invoke(multi_echo, ['--times=3', 'index.txt'], prog_name='multi_echo')5556Parameter Types57---------------5859The supported parameter types are:6061``str`` / :data:`click.STRING`:62 The default parameter type which indicates unicode strings.6364``int`` / :data:`click.INT`:65 A parameter that only accepts integers.6667``float`` / :data:`click.FLOAT`:68 A parameter that only accepts floating point values.6970``bool`` / :data:`click.BOOL`:71 A parameter that accepts boolean values. This is automatically used72 for boolean flags. The string values "1", "true", "t", "yes", "y",73 and "on" convert to ``True``. "0", "false", "f", "no", "n", and74 "off" convert to ``False``.7576:data:`click.UUID`:77 A parameter that accepts UUID values. This is not automatically78 guessed but represented as :class:`uuid.UUID`.7980.. autoclass:: File81 :noindex:8283.. autoclass:: Path84 :noindex:8586.. autoclass:: Choice87 :noindex:8889.. autoclass:: IntRange90 :noindex:9192.. autoclass:: FloatRange93 :noindex:9495.. autoclass:: DateTime96 :noindex:9798How to Implement Custom Types99-------------------------------100101To implement a custom type, you need to subclass the :class:`ParamType` class. For simple cases, passing a Python function that fails with a `ValueError` is also supported, though discouraged. Override the :meth:`~ParamType.convert` method to convert the value from a string to the correct type.102103The following code implements an integer type that accepts hex and octal104numbers in addition to normal integers, and converts them into regular105integers.106107.. code-block:: python108109 import click110111 class BasedIntParamType(click.ParamType):112 name = "integer"113114 def convert(self, value, param, ctx):115 if isinstance(value, int):116 return value117118 try:119 if value[:2].lower() == "0x":120 return int(value[2:], 16)121 elif value[:1] == "0":122 return int(value, 8)123 return int(value, 10)124 except ValueError:125 self.fail(f"{value!r} is not a valid integer", param, ctx)126127 BASED_INT = BasedIntParamType()128129The :attr:`~ParamType.name` attribute is optional and is used for130documentation. Call :meth:`~ParamType.fail` if conversion fails. The131``param`` and ``ctx`` arguments may be ``None`` in some cases such as132prompts.133134Values from user input or the command line will be strings, but default135values and Python arguments may already be the correct type. The custom136type should check at the top if the value is already valid and pass it137through to support those cases.
modified:docs/prompts.rst+116 added-2 removed
9 unmodified lines
10This can be accomplished with the :func:`prompt` function, which asks for11valid input according to a type, or the :func:`confirm` function, which asks12for confirmation (yes/no).1314.. contents::15 :depth: 216 :local:1718.. _option-prompting:1920Option Prompts21--------------2217Option prompts are integrated into the option interface. See18:ref:`option-prompting` for more information. Internally, it23Option prompts are integrated into the option interface. Internally, it24automatically calls either :func:`prompt` or :func:`confirm` as necessary.2526In some cases, you want parameters that can be provided from the command line,27but if not provided, ask for user input instead. This can be implemented with28Click by defining a prompt string.2930Example:3132.. click:example::3334 @click.command()35 @click.option('--name', prompt=True)36 def hello(name):37 click.echo(f"Hello {name}!")3839And what it looks like:4041.. click:run::4243 invoke(hello, args=['--name=John'])44 invoke(hello, input=['John'])4546If you are not happy with the default prompt string, you can ask for47a different one:4849.. click:example::5051 @click.command()52 @click.option('--name', prompt='Your name please')53 def hello(name):54 click.echo(f"Hello {name}!")5556What it looks like:5758.. click:run::5960 invoke(hello, input=['John'])6162It is advised that prompt not be used in conjunction with the multiple63flag set to True. Instead, prompt in the function interactively.6465By default, the user will be prompted for an input if one was not passed66through the command line. To turn this behavior off, see67:ref:`optional-value`.6869Input Prompts70-------------7172To manually ask for user input, you can use the :func:`prompt` function.
6 unmodified lines
79provided. For instance, the following will only accept floats::8081 value = click.prompt('Please enter a number', default=42.0)8283Optional Prompts84------------------85If the option has ``prompt`` enabled, then setting86``prompt_required=False`` tells Click to only show the prompt if the87option's flag is given, instead of if the option is not provided at all.8889.. click:example::9091 @click.command()92 @click.option('--name', prompt=True, prompt_required=False, default="Default")93 def hello(name):94 click.echo(f"Hello {name}!")9596.. click:run::9798 invoke(hello)99 invoke(hello, args=["--name", "Value"])100 invoke(hello, args=["--name"], input="Prompt")101102If ``required=True``, then the option will still prompt if it is not103given, but it will also prompt if only the flag is given.104105Confirmation Prompts106--------------------107108To ask if a user wants to continue with an action, the :func:`confirm`
6 unmodified lines
115There is also the option to make the function automatically abort the116execution of the program if it does not return ``True``::117118 click.confirm('Do you want to continue?', abort=True)119120Dynamic Defaults for Prompts121----------------------------122123The ``auto_envvar_prefix`` and ``default_map`` options for the context124allow the program to read option values from the environment or a125configuration file. However, this overrides the prompting mechanism, so126that the user does not get the option to change the value interactively.127128If you want to let the user configure the default value, but still be129prompted if the option isn't specified on the command line, you can do so130by supplying a callable as the default value. For example, to get a default131from the environment:132133.. code-block:: python134135 import os136137 @click.command()138 @click.option(139 "--username", prompt=True,140 default=lambda: os.environ.get("USER", "")141 )142 def hello(username):143 click.echo(f"Hello, {username}!")144145To describe what the default value will be, set it in ``show_default``.146147.. click:example::148149 import os150151 @click.command()152 @click.option(153 "--username", prompt=True,154 default=lambda: os.environ.get("USER", ""),155 show_default="current user"156 )157 def hello(username):158 click.echo(f"Hello, {username}!")159160.. click:run::161162 invoke(hello, args=["--help"])
added:docs/quickstart.md+196 added
1# Quickstart23```{currentmodule} click4```56## Install78Install from PyPI:910```console11pip install click12```1314Installing into a virtual environment is highly recommended. We suggest {ref}`virtualenv-heading`.1516## Examples1718Some standalone examples of Click applications are packaged with Click. They are available in the19[examples folder](https://github.com/pallets/click/tree/main/examples) of the repo.2021- [inout](https://github.com/pallets/click/tree/main/examples/inout) : A very simple example of an application that can22 read from files and write to files and also accept input from stdin or write to stdout.23- [validation](https://github.com/pallets/click/tree/main/examples/validation) : A simple example of an application that24 performs custom validation of parameters in different ways.25- [naval](https://github.com/pallets/click/tree/main/examples/naval) : Port of the [docopt](http://docopt.org/) naval26 example.27- [colors](https://github.com/pallets/click/tree/main/examples/colors) : A simple example that colorizes text. Uses28 colorama on Windows.29- [aliases](https://github.com/pallets/click/tree/main/examples/aliases) : An advanced example that implements30 {ref}`aliases`.31- [imagepipe](https://github.com/pallets/click/tree/main/examples/imagepipe) : A complex example that implements some32 {ref}`command-pipelines` . It chains together image processing instructions. Requires pillow.33- [repo](https://github.com/pallets/click/tree/main/examples/repo) : An advanced example that implements a34 Git-/Mercurial-like command line interface.35- [complex](https://github.com/pallets/click/tree/main/examples/complex) : A very advanced example that implements36 loading subcommands dynamically from a plugin folder.37- [termui](https://github.com/pallets/click/tree/main/examples/termui) : A simple example that showcases terminal UI38 helpers provided by click.3940## Basic Concepts - Creating a Command4142Click is based on declaring commands through decorators. Internally, there is a non-decorator interface for advanced use43cases, but it's discouraged for high-level usage.4445A function becomes a Click command line tool by decorating it through {func}`command`. At its simplest, just46decorating a function with this decorator will make it into a callable script:474849```{eval-rst}50.. click:example::51 import click5253 @click.command()54 def hello():55 click.echo('Hello World!')5657What's happening is that the decorator converts the function into a :class:`Command` which then can be invoked:5859.. click:example::60 if __name__ == '__main__':61 hello()6263And what it looks like:6465.. click:run::66 invoke(hello, args=[], prog_name='python hello.py')6768And the corresponding help page:6970.. click:run::71 invoke(hello, args=['--help'], prog_name='python hello.py')72```7374## Echoing7576Why does this example use {func}`echo` instead of the regular {func}`print` function? The answer to this question is77that Click attempts to support different environments consistently and to be very robust even when the environment is78misconfigured. Click wants to be functional at least on a basic level even if everything is completely broken.7980What this means is that the {func}`echo` function applies some error correction in case the terminal is misconfigured81instead of dying with a {exc}`UnicodeError`.8283The echo function also supports color and other styles in output. It will automatically remove styles if the output84stream is a file. On Windows, colorama is automatically installed and used. See {ref}`ansi-colors`.8586If you don't need this, you can also use the `print()` construct / function.8788## Nesting Commands8990Commands can be attached to other commands of type {class}`Group`. This allows arbitrary nesting of scripts. As an91example here is a script that implements two commands for managing databases:9293```{eval-rst}94.. click:example::95 @click.group()96 def cli():97 pass9899 @click.command()100 def initdb():101 click.echo('Initialized the database')102103 @click.command()104 def dropdb():105 click.echo('Dropped the database')106107 cli.add_command(initdb)108 cli.add_command(dropdb)109```110111As you can see, the {func}`group` decorator works like the {func}`command` decorator, but creates a {class}`Group`112object instead which can be given multiple subcommands that can be attached with {meth}`Group.add_command`.113114For simple scripts, it's also possible to automatically attach and create a command by using the {meth}`Group.command`115decorator instead. The above script can instead be written like this:116117```{eval-rst}118.. click:example::119 @click.group()120 def cli():121 pass122123 @cli.command()124 def initdb():125 click.echo('Initialized the database')126127 @cli.command()128 def dropdb():129 click.echo('Dropped the database')130131You would then invoke the :class:`Group` in your entry points or other invocations:132133.. click:example::134 if __name__ == '__main__':135 cli()136```137138## Registering Commands Later139140Instead of using the `@group.command()` decorator, commands can be decorated with the plain `@command()` decorator141and registered with a group later with `group.add_command()`. This could be used to split commands into multiple Python142modules.143144```{code-block} python145 @click.command()146 def greet():147 click.echo("Hello, World!")148```149150```{code-block} python151 @click.group()152 def group():153 pass154155 group.add_command(greet)156```157158## Adding Parameters159160To add parameters, use the {func}`option` and {func}`argument` decorators:161162```{eval-rst}163.. click:example::164 @click.command()165 @click.option('--count', default=1, help='number of greetings')166 @click.argument('name')167 def hello(count, name):168 for x in range(count):169 click.echo(f"Hello {name}!")170171What it looks like:172173.. click:run::174 invoke(hello, args=['--help'], prog_name='python hello.py')175```176177## Switching to Entry Points178179In the code you wrote so far there is a block at the end of the file which looks like this:180`if __name__ == '__main__':`. This is traditionally how a standalone Python file looks like. With Click you can continue181doing that, but a better way is to package your app with an entry point.182183There are two main (and many more) reasons for this:184185The first one is that installers automatically generate executable wrappers for Windows so your command line utilities186work on Windows too.187188The second reason is that entry point scripts work with virtualenv on Unix without the virtualenv having to be189activated. This is a very useful concept which allows you to bundle your scripts with all requirements into a190virtualenv.191192Click is perfectly equipped to work with that and in fact the rest of the documentation will assume that you are writing193applications as distributed packages.194195Look at the {doc}`entry-points` chapter before reading the rest as the examples assume that you will be using entry196points.
deleted:docs/quickstart.rst-206 removed
1Quickstart2==========34.. currentmodule:: click56Install7----------------------8Install from PyPI::910 pip install click1112Installing into a virtual environment is highly recommended. We suggest :ref:`virtualenv-heading`.1314Examples15-----------------------1617Some standalone examples of Click applications are packaged with Click. They are available in the `examples folder <https://github.com/pallets/click/tree/main/examples>`_ of the repo.1819* `inout <https://github.com/pallets/click/tree/main/examples/inout>`_ : A very simple example of an application that can read from files and write to files and also accept input from stdin or write to stdout.20* `validation <https://github.com/pallets/click/tree/main/examples/validation>`_ : A simple example of an application that performs custom validation of parameters in different ways.21* `naval <https://github.com/pallets/click/tree/main/examples/naval>`_ : Port of the `docopt <http://docopt.org/>`_ naval example.22* `colors <https://github.com/pallets/click/tree/main/examples/colors>`_ : A simple example that colorizes text. Uses colorama on Windows.23* `aliases <https://github.com/pallets/click/tree/main/examples/aliases>`_ : An advanced example that implements :ref:`aliases`.24* `imagepipe <https://github.com/pallets/click/tree/main/examples/imagepipe>`_ : A complex example that implements some :ref:`command-pipelines` . It chains together image processing instructions. Requires pillow.25* `repo <https://github.com/pallets/click/tree/main/examples/repo>`_ : An advanced example that implements a Git-/Mercurial-like command line interface.26* `complex <https://github.com/pallets/click/tree/main/examples/complex>`_ : A very advanced example that implements loading subcommands dynamically from a plugin folder.27* `termui <https://github.com/pallets/click/tree/main/examples/termui>`_ : A simple example that showcases terminal UI helpers provided by click.2829Basic Concepts - Creating a Command30-----------------------------------3132Click is based on declaring commands through decorators. Internally, there33is a non-decorator interface for advanced use cases, but it's discouraged34for high-level usage.3536A function becomes a Click command line tool by decorating it through37:func:`click.command`. At its simplest, just decorating a function38with this decorator will make it into a callable script:3940.. click:example::4142 import click4344 @click.command()45 def hello():46 click.echo('Hello World!')4748What's happening is that the decorator converts the function into a49:class:`Command` which then can be invoked::5051 if __name__ == '__main__':52 hello()5354And what it looks like:5556.. click:run::5758 invoke(hello, args=[], prog_name='python hello.py')5960And the corresponding help page:6162.. click:run::6364 invoke(hello, args=['--help'], prog_name='python hello.py')6566Echoing67-------6869Why does this example use :func:`echo` instead of the regular70:func:`print` function? The answer to this question is that Click71attempts to support different environments consistently and to be very72robust even when the environment is misconfigured. Click wants to be73functional at least on a basic level even if everything is completely74broken.7576What this means is that the :func:`echo` function applies some error77correction in case the terminal is misconfigured instead of dying with a78:exc:`UnicodeError`.7980The echo function also supports color and other styles in output. It81will automatically remove styles if the output stream is a file. On82Windows, colorama is automatically installed and used. See83:ref:`ansi-colors`.8485If you don't need this, you can also use the `print()` construct /86function.8788Nesting Commands89----------------9091Commands can be attached to other commands of type :class:`Group`. This92allows arbitrary nesting of scripts. As an example here is a script that93implements two commands for managing databases:9495.. click:example::9697 @click.group()98 def cli():99 pass100101 @click.command()102 def initdb():103 click.echo('Initialized the database')104105 @click.command()106 def dropdb():107 click.echo('Dropped the database')108109 cli.add_command(initdb)110 cli.add_command(dropdb)111112As you can see, the :func:`group` decorator works like the :func:`command`113decorator, but creates a :class:`Group` object instead which can be given114multiple subcommands that can be attached with :meth:`Group.add_command`.115116For simple scripts, it's also possible to automatically attach and create a117command by using the :meth:`Group.command` decorator instead. The above118script can instead be written like this:119120.. click:example::121122 @click.group()123 def cli():124 pass125126 @cli.command()127 def initdb():128 click.echo('Initialized the database')129130 @cli.command()131 def dropdb():132 click.echo('Dropped the database')133134You would then invoke the :class:`Group` in your entry points or other invocations::135136 if __name__ == '__main__':137 cli()138139140Registering Commands Later141--------------------------142143Instead of using the ``@group.command()`` decorator, commands can be144decorated with the plain ``@click.command()`` decorator and registered145with a group later with ``group.add_command()``. This could be used to146split commands into multiple Python modules.147148.. code-block:: python149150 @click.command()151 def greet():152 click.echo("Hello, World!")153154.. code-block:: python155156 @click.group()157 def group():158 pass159160 group.add_command(greet)161162163Adding Parameters164-----------------165166To add parameters, use the :func:`option` and :func:`argument` decorators:167168.. click:example::169170 @click.command()171 @click.option('--count', default=1, help='number of greetings')172 @click.argument('name')173 def hello(count, name):174 for x in range(count):175 click.echo(f"Hello {name}!")176177What it looks like:178179.. click:run::180181 invoke(hello, args=['--help'], prog_name='python hello.py')182183Switching to Entry Points184-------------------------185186In the code you wrote so far there is a block at the end of the file which187looks like this: ``if __name__ == '__main__':``. This is traditionally188how a standalone Python file looks like. With Click you can continue189doing that, but a better way is to package your app with an entry point.190191There are two main (and many more) reasons for this:192193The first one is that installers automatically generate executable194wrappers for Windows so your command line utilities work on Windows too.195196The second reason is that entry point scripts work with virtualenv on Unix197without the virtualenv having to be activated. This is a very useful198concept which allows you to bundle your scripts with all requirements into199a virtualenv.200201Click is perfectly equipped to work with that and in fact the rest of the202documentation will assume that you are writing applications as distributed203packages.204205Look at the :doc:`entry-points` chapter before reading the rest as the examples206assume that you will be using entry points.
added:docs/setuptools.md+7 added
1---2orphan: true3---45# Setuptools Integration67Moved to {doc}`entry-points`.
deleted:docs/setuptools.rst-6 removed
1:orphan:23Setuptools Integration4======================56Moved to :doc:`entry-points`.
added:docs/shell-completion.md+249 added
1(shell-completion)=23# Shell Completion45```{currentmodule} click.shell_completion6```78Click provides tab completion support for Bash (version 4.4 and up), Zsh, and Fish. It is possible to add support for9other shells too, and suggestions can be customized at multiple levels.1011Shell completion suggests command names, option names, and values for choice, file, and path parameter types. Options12are only listed if at least a dash has been entered. Hidden commands and options are not shown.1314```console15$ repo <TAB><TAB>16clone commit copy delete setuser17$ repo clone -<TAB><TAB>18--deep --help --rev --shallow -r19```2021## Enabling Completion2223Completion is only available if a script is installed and invoked through an entry point, not through the `python`24command. See {doc}`entry-points`. Once the executable is installed, calling it with a special environment variable will25put Click in completion mode.2627To enable shell completion, the user needs to register a special function with their shell. The exact script varies28depending on the shell you are using. Click will output it when called with `_{FOO_BAR}_COMPLETE` set to29`{shell}_source`. `{FOO_BAR}` is the executable name in uppercase with dashes replaced by underscores. It is30conventional but not strictly required for environment variable names to be in upper case. This convention helps31distinguish environment variables from regular shell variables and commands, making scripts and configuration files more32readable and easier to maintain. The built-in shells are `bash`, `zsh`, and `fish`.3334Provide your users with the following instructions customized to your program name. This uses `foo-bar` as an example.3536```{eval-rst}37.. tabs::3839 .. group-tab:: Bash4041 Add this to ``~/.bashrc``:4243 .. code-block:: bash4445 eval "$(_FOO_BAR_COMPLETE=bash_source foo-bar)"4647 .. group-tab:: Zsh4849 Add this to ``~/.zshrc``:5051 .. code-block:: zsh5253 eval "$(_FOO_BAR_COMPLETE=zsh_source foo-bar)"5455 .. group-tab:: Fish5657 Add this to ``~/.config/fish/completions/foo-bar.fish``:5859 .. code-block:: fish6061 _FOO_BAR_COMPLETE=fish_source foo-bar | source6263 This is the same file used for the activation script method64 below. For Fish it's probably always easier to use that method.65```6667Using `eval` means that the command is invoked and evaluated every time a shell is started, which can delay shell68responsiveness. To speed it up, write the generated script to a file, then source that. You can generate the files ahead69of time and distribute them with your program to save your users a step.7071```{eval-rst}72.. tabs::7374 .. group-tab:: Bash7576 Save the script somewhere.7778 .. code-block:: bash7980 _FOO_BAR_COMPLETE=bash_source foo-bar > ~/.foo-bar-complete.bash8182 Source the file in ``~/.bashrc``.8384 .. code-block:: bash8586 . ~/.foo-bar-complete.bash8788 .. group-tab:: Zsh8990 Save the script somewhere.9192 .. code-block:: bash9394 _FOO_BAR_COMPLETE=zsh_source foo-bar > ~/.foo-bar-complete.zsh9596 Source the file in ``~/.zshrc``.9798 .. code-block:: bash99100 . ~/.foo-bar-complete.zsh101102 .. group-tab:: Fish103104 Save the script to ``~/.config/fish/completions/foo-bar.fish``:105106 .. code-block:: fish107108 _FOO_BAR_COMPLETE=fish_source foo-bar > ~/.config/fish/completions/foo-bar.fish109```110111After modifying the shell config, you need to start a new shell in order for the changes to be loaded.112113## Custom Type Completion114115When creating a custom {class}`~click.ParamType`, override its {meth}`~click.ParamType.shell_complete` method to provide116shell completion for parameters with the type. The method must return a list of {class}`~CompletionItem` objects.117Besides the value, these objects hold metadata that shell support might use. The built-in implementations use `type` to118indicate special handling for paths, and `help` for shells that support showing a help string next to a suggestion.119120In this example, the type will suggest environment variables that start with the incomplete value.121122```python123class EnvVarType(ParamType):124 name = "envvar"125126 def shell_complete(self, ctx, param, incomplete):127 return [128 CompletionItem(name)129 for name in os.environ if name.startswith(incomplete)130 ]131132@click.command()133@click.option("--ev", type=EnvVarType())134def cli(ev):135 click.echo(os.environ[ev])136```137138## Overriding Value Completion139140Value completions for a parameter can be customized without a custom type by providing a `shell_complete` function. The141function is used instead of any completion provided by the type. It is passed 3 keyword arguments:142143- `ctx` - The current command context.144- `param` - The current parameter requesting completion.145- `incomplete` - The partial word that is being completed. May be an empty string if no characters have been entered146 yet.147148It must return a list of {class}`CompletionItem` objects, or as a shortcut it can return a list of strings.149150In this example, the command will suggest environment variables that start with the incomplete value.151152```python153def complete_env_vars(ctx, param, incomplete):154 return [k for k in os.environ if k.startswith(incomplete)]155156@click.command()157@click.argument("name", shell_complete=complete_env_vars)158def cli(name):159 click.echo(f"Name: {name}")160 click.echo(f"Value: {os.environ[name]}")161```162163## Adding Support for a Shell164165Support can be added for shells that do not come built in. Be sure to check PyPI to see if there's already a package166that adds support for your shell. This topic is very technical, you'll want to look at Click's source to study the167built-in implementations.168169Shell support is provided by subclasses of {class}`ShellComplete` registered with {func}`add_completion_class`. When170Click is invoked in completion mode, it calls {meth}`~ShellComplete.source` to output the completion script, or171{meth}`~ShellComplete.complete` to output completions. The base class provides default implementations that require172implementing some smaller parts.173174First, you'll need to figure out how your shell's completion system works and write a script to integrate it with Click.175It must invoke your program with the environment variable `_{FOO_BAR}_COMPLETE` set to `{shell}_complete` and pass the176complete args and incomplete value. How it passes those values, and the format of the completion response from Click is177up to you.178179In your subclass, set {attr}`ShellComplete.source_template` to the completion script. The default implementation will180perform `%` formatting with the following variables:181182- `complete_func` - A safe name for the completion function defined in the script.183- `complete_var` - The environment variable name for passing the `{shell}_complete` instruction.184- `foo_bar` - The name of the executable being completed.185186The example code is for a made up shell "My Shell" or "mysh" for short.187188```python189from click.shell_completion import add_completion_class190from click.shell_completion import ShellComplete191192_mysh_source = """\193%(complete_func)s {194 response=$(%(complete_var)s=mysh_complete %(foo_bar)s)195 # parse response and set completions somehow196}197call-on-complete %(foo_bar)s %(complete_func)s198"""199200@add_completion_class201class MyshComplete(ShellComplete):202 name = "mysh"203 source_template = _mysh_source204```205206Next, implement {meth}`~ShellComplete.get_completion_args`. This must get, parse, and return the complete args and207incomplete value from the completion script. For example, for the Bash implementation the `COMP_WORDS` env var contains208the command line args as a string, and the `COMP_CWORD` env var contains the index of the incomplete arg. The method209must return a `(args, incomplete)` tuple.210211```python212import os213from click.parser import split_arg_string214215class MyshComplete(ShellComplete):216 ...217218 def get_completion_args(self):219 args = split_arg_string(os.environ["COMP_WORDS"])220221 if os.environ["COMP_PARTIAL"] == "1":222 incomplete = args.pop()223 return args, incomplete224225 return args, ""226```227228Finally, implement {meth}`~ShellComplete.format_completion`. This is called to format each {class}`CompletionItem` into a string. For example, the Bash implementation returns `f"{item.type},{item.value}` (it doesn't support help strings), and the Zsh implementation returns each part separated by a newline, replacing empty help with a `_` placeholder. This format is entirely up to what you parse with your completion script.229230The `type` value is usually `plain`, but it can be another value that the completion script can switch on. For example,231`file` or `dir` can tell the shell to handle path completion, since the shell is better at that than Click.232233```python234class MyshComplete(ShellComplete):235 ...236237 def format_completion(self, item):238 return f"{item.type}\t{item.value}"239```240241With those three things implemented, the new shell support is ready. In case those weren't sufficient, there are more242parts that can be overridden, but that probably isn't necessary.243244The activation instructions will again depend on how your shell works. Use the following to generate the completion245script, then load it into the shell somehow.246247```console248_FOO_BAR_COMPLETE=mysh_source foo-bar249```
deleted:docs/shell-completion.rst-291 removed
1.. currentmodule:: click.shell_completion23Shell Completion4================56Click provides tab completion support for Bash (version 4.4 and up),7Zsh, and Fish. It is possible to add support for other shells too, and8suggestions can be customized at multiple levels.910Shell completion suggests command names, option names, and values for11choice, file, and path parameter types. Options are only listed if at12least a dash has been entered. Hidden commands and options are not13shown.1415.. code-block:: text1617 $ repo <TAB><TAB>18 clone commit copy delete setuser19 $ repo clone -<TAB><TAB>20 --deep --help --rev --shallow -r212223Enabling Completion24-------------------2526Completion is only available if a script is installed and invoked27through an entry point, not through the ``python`` command. See28:doc:`entry-points`. Once the executable is installed, calling it with29a special environment variable will put Click in completion mode.3031To enable shell completion, the user needs to register a special32function with their shell. The exact script varies depending on the33shell you are using. Click will output it when called with34``_{FOO_BAR}_COMPLETE`` set to ``{shell}_source``. ``{FOO_BAR}`` is35the executable name in uppercase with dashes replaced by underscores.36It is conventional but not strictly required for environment variable37names to be in upper case. This convention helps distinguish environment38variables from regular shell variables and commands, making scripts39and configuration files more readable and easier to maintain. The40built-in shells are ``bash``, ``zsh``, and ``fish``.4142Provide your users with the following instructions customized to your43program name. This uses ``foo-bar`` as an example.4445.. tabs::4647 .. group-tab:: Bash4849 Add this to ``~/.bashrc``:5051 .. code-block:: bash5253 eval "$(_FOO_BAR_COMPLETE=bash_source foo-bar)"5455 .. group-tab:: Zsh5657 Add this to ``~/.zshrc``:5859 .. code-block:: zsh6061 eval "$(_FOO_BAR_COMPLETE=zsh_source foo-bar)"6263 .. group-tab:: Fish6465 Add this to ``~/.config/fish/completions/foo-bar.fish``:6667 .. code-block:: fish6869 _FOO_BAR_COMPLETE=fish_source foo-bar | source7071 This is the same file used for the activation script method72 below. For Fish it's probably always easier to use that method.7374Using ``eval`` means that the command is invoked and evaluated every75time a shell is started, which can delay shell responsiveness. To speed76it up, write the generated script to a file, then source that. You can77generate the files ahead of time and distribute them with your program78to save your users a step.7980.. tabs::8182 .. group-tab:: Bash8384 Save the script somewhere.8586 .. code-block:: bash8788 _FOO_BAR_COMPLETE=bash_source foo-bar > ~/.foo-bar-complete.bash8990 Source the file in ``~/.bashrc``.9192 .. code-block:: bash9394 . ~/.foo-bar-complete.bash9596 .. group-tab:: Zsh9798 Save the script somewhere.99100 .. code-block:: bash101102 _FOO_BAR_COMPLETE=zsh_source foo-bar > ~/.foo-bar-complete.zsh103104 Source the file in ``~/.zshrc``.105106 .. code-block:: bash107108 . ~/.foo-bar-complete.zsh109110 .. group-tab:: Fish111112 Save the script to ``~/.config/fish/completions/foo-bar.fish``:113114 .. code-block:: fish115116 _FOO_BAR_COMPLETE=fish_source foo-bar > ~/.config/fish/completions/foo-bar.fish117118After modifying the shell config, you need to start a new shell in order119for the changes to be loaded.120121122Custom Type Completion123----------------------124125When creating a custom :class:`~click.ParamType`, override its126:meth:`~click.ParamType.shell_complete` method to provide shell127completion for parameters with the type. The method must return a list128of :class:`~CompletionItem` objects. Besides the value, these objects129hold metadata that shell support might use. The built-in implementations130use ``type`` to indicate special handling for paths, and ``help`` for131shells that support showing a help string next to a suggestion.132133In this example, the type will suggest environment variables that start134with the incomplete value.135136.. code-block:: python137138 class EnvVarType(ParamType):139 name = "envvar"140141 def shell_complete(self, ctx, param, incomplete):142 return [143 CompletionItem(name)144 for name in os.environ if name.startswith(incomplete)145 ]146147 @click.command()148 @click.option("--ev", type=EnvVarType())149 def cli(ev):150 click.echo(os.environ[ev])151152153Overriding Value Completion154---------------------------155156Value completions for a parameter can be customized without a custom157type by providing a ``shell_complete`` function. The function is used158instead of any completion provided by the type. It is passed 3 keyword159arguments:160161- ``ctx`` - The current command context.162- ``param`` - The current parameter requesting completion.163- ``incomplete`` - The partial word that is being completed. May164 be an empty string if no characters have been entered yet.165166It must return a list of :class:`CompletionItem` objects, or as a167shortcut it can return a list of strings.168169In this example, the command will suggest environment variables that170start with the incomplete value.171172.. code-block:: python173174 def complete_env_vars(ctx, param, incomplete):175 return [k for k in os.environ if k.startswith(incomplete)]176177 @click.command()178 @click.argument("name", shell_complete=complete_env_vars)179 def cli(name):180 click.echo(f"Name: {name}")181 click.echo(f"Value: {os.environ[name]}")182183184Adding Support for a Shell185--------------------------186187Support can be added for shells that do not come built in. Be sure to188check PyPI to see if there's already a package that adds support for189your shell. This topic is very technical, you'll want to look at Click's190source to study the built-in implementations.191192Shell support is provided by subclasses of :class:`ShellComplete`193registered with :func:`add_completion_class`. When Click is invoked in194completion mode, it calls :meth:`~ShellComplete.source` to output the195completion script, or :meth:`~ShellComplete.complete` to output196completions. The base class provides default implementations that197require implementing some smaller parts.198199First, you'll need to figure out how your shell's completion system200works and write a script to integrate it with Click. It must invoke your201program with the environment variable ``_{FOO_BAR}_COMPLETE`` set to202``{shell}_complete`` and pass the complete args and incomplete value.203How it passes those values, and the format of the completion response204from Click is up to you.205206In your subclass, set :attr:`~ShellComplete.source_template` to the207completion script. The default implementation will perform ``%``208formatting with the following variables:209210- ``complete_func`` - A safe name for the completion function defined211 in the script.212- ``complete_var`` - The environment variable name for passing the213 ``{shell}_complete`` instruction.214- ``foo_bar`` - The name of the executable being completed.215216The example code is for a made up shell "My Shell" or "mysh" for short.217218.. code-block:: python219220 from click.shell_completion import add_completion_class221 from click.shell_completion import ShellComplete222223 _mysh_source = """\224 %(complete_func)s {225 response=$(%(complete_var)s=mysh_complete %(foo_bar)s)226 # parse response and set completions somehow227 }228 call-on-complete %(foo_bar)s %(complete_func)s229 """230231 @add_completion_class232 class MyshComplete(ShellComplete):233 name = "mysh"234 source_template = _mysh_source235236Next, implement :meth:`~ShellComplete.get_completion_args`. This must237get, parse, and return the complete args and incomplete value from the238completion script. For example, for the Bash implementation the239``COMP_WORDS`` env var contains the command line args as a string, and240the ``COMP_CWORD`` env var contains the index of the incomplete arg. The241method must return a ``(args, incomplete)`` tuple.242243.. code-block:: python244245 import os246 from click.parser import split_arg_string247248 class MyshComplete(ShellComplete):249 ...250251 def get_completion_args(self):252 args = split_arg_string(os.environ["COMP_WORDS"])253254 if os.environ["COMP_PARTIAL"] == "1":255 incomplete = args.pop()256 return args, incomplete257258 return args, ""259260Finally, implement :meth:`~ShellComplete.format_completion`. This is261called to format each :class:`CompletionItem` into a string. For262example, the Bash implementation returns ``f"{item.type},{item.value}``263(it doesn't support help strings), and the Zsh implementation returns264each part separated by a newline, replacing empty help with a ``_``265placeholder. This format is entirely up to what you parse with your266completion script.267268The ``type`` value is usually ``plain``, but it can be another value269that the completion script can switch on. For example, ``file`` or270``dir`` can tell the shell to handle path completion, since the shell is271better at that than Click.272273.. code-block:: python274275 class MyshComplete(ShellComplete):276 ...277278 def format_completion(self, item):279 return f"{item.type}\t{item.value}"280281With those three things implemented, the new shell support is ready. In282case those weren't sufficient, there are more parts that can be283overridden, but that probably isn't necessary.284285The activation instructions will again depend on how your shell works.286Use the following to generate the completion script, then load it into287the shell somehow.288289.. code-block:: text290291 _FOO_BAR_COMPLETE=mysh_source foo-bar
added:docs/support-multiple-versions.md+62 added
1# Supporting Multiple Versions23If you are a library maintainer, you may want to support multiple versions of4Click. See the Pallets [version policy] for information about our version5numbers and support policy.67[version policy]: https://palletsprojects.com/versions89Most features of Click are stable across releases, and don't require special10handling. However, feature releases may deprecate and change APIs. Occasionally,11a change will require special handling.1213## Use Feature Detection1415Prefer using feature detection. Looking at the version can be tempting, but is16often more brittle or results in more complicated code. Try to use `if` or `try`17blocks to decide whether to use a new or old pattern.1819If you do need to look at the version, use {func}`importlib.metadata.version`,20the standardized way to get versions for any installed Python package.2122## Changes in 8.22324### `ParamType` methods require `ctx`2526In 8.2, several methods of `ParamType` now have a `ctx: click.Context`27argument. Because this changes the signature of the methods from 8.1, it's not28obvious how to support both when subclassing or calling.2930This example uses `ParamType.get_metavar`, and the same technique should be31applicable to other methods such as `get_missing_message`.3233Update your methods overrides to take the new `ctx` argument. Use the34following decorator to wrap each method. In 8.1, it will get the context where35possible and pass it using the 8.2 signature.3637```python38import functools39import typing as t40import click4142F = t.TypeVar("F", bound=t.Callable[..., t.Any])4344def add_ctx_arg(f: F) -> F:45 @functools.wraps(f)46 def wrapper(*args: t.Any, **kwargs: t.Any) -> t.Any:47 if "ctx" not in kwargs:48 kwargs["ctx"] = click.get_current_context(silent=True)4950 return f(*args, **kwargs)5152 return wrapper # type: ignore[return-value]53```5455Here's an example ``ParamType`` subclass which uses this:5657```python58class CommaDelimitedString(click.ParamType):59 @add_ctx_arg60 def get_metavar(self, param: click.Parameter, ctx: click.Context | None) -> str:61 return "TEXT,TEXT,..."62```
added:docs/testing.md+198 added
1# Testing Click Applications23```{eval-rst}4.. currentmodule:: click.testing5```67Click provides the {ref}`click.testing <testing>` module to help you invoke command line applications and check their behavior.89These tools should only be used for testing since they change10the entire interpreter state for simplicity. They are not thread-safe!1112The examples use [pytest](https://docs.pytest.org/en/stable/) style tests.1314```{contents}15:depth: 116:local: true17```1819## Basic Example2021The key pieces are:22 - {class}`CliRunner` - used to invoke commands as command line scripts.23 - {class}`Result` - returned from {meth}`CliRunner.invoke`. Captures output data, exit code, optional exception, and captures the output as bytes and binary data.2425```{code-block} python26:caption: hello.py2728import click2930@click.command()31@click.argument('name')32def hello(name):33 click.echo(f'Hello {name}!')34```3536```{code-block} python37:caption: test_hello.py3839from click.testing import CliRunner40from hello import hello4142def test_hello_world():43 runner = CliRunner()44 result = runner.invoke(hello, ['Peter'])45 assert result.exit_code == 046 assert result.output == 'Hello Peter!\n'47```4849## Subcommands5051A subcommand name must be specified in the `args` parameter {meth}`CliRunner.invoke`:5253```{code-block} python54:caption: sync.py5556import click5758@click.group()59@click.option('--debug/--no-debug', default=False)60def cli(debug):61 click.echo(f"Debug mode is {'on' if debug else 'off'}")6263@cli.command()64def sync():65 click.echo('Syncing')66```6768```{code-block} python69:caption: test_sync.py7071from click.testing import CliRunner72from sync import cli7374def test_sync():75 runner = CliRunner()76 result = runner.invoke(cli, ['--debug', 'sync'])77 assert result.exit_code == 078 assert 'Debug mode is on' in result.output79 assert 'Syncing' in result.output80```8182## Context Settings8384Additional keyword arguments passed to {meth}`CliRunner.invoke` will be used to construct the initial {class}`Context object <click.Context>`.85For example, setting a fixed terminal width equal to 60:8687```{code-block} python88:caption: sync.py8990import click9192@click.group()93def cli():94 pass9596@cli.command()97def sync():98 click.echo('Syncing')99```100101```{code-block} python102:caption: test_sync.py103104from click.testing import CliRunner105from sync import cli106107def test_sync():108 runner = CliRunner()109 result = runner.invoke(cli, ['sync'], terminal_width=60)110 assert result.exit_code == 0111 assert 'Debug mode is on' in result.output112 assert 'Syncing' in result.output113```114115## File System Isolation116117The {meth}`CliRunner.isolated_filesystem` context manager sets the current working directory to a new, empty folder.118119```{code-block} python120:caption: cat.py121122import click123124@click.command()125@click.argument('f', type=click.File())126def cat(f):127 click.echo(f.read())128```129130```{code-block} python131:caption: test_cat.py132133from click.testing import CliRunner134from cat import cat135136def test_cat():137 runner = CliRunner()138 with runner.isolated_filesystem():139 with open('hello.txt', 'w') as f:140 f.write('Hello World!')141142 result = runner.invoke(cat, ['hello.txt'])143 assert result.exit_code == 0144 assert result.output == 'Hello World!\n'145```146147Pass in a path to control where the temporary directory is created.148In this case, the directory will not be removed by Click. Its useful149to integrate with a framework like Pytest that manages temporary files.150151```{code-block} python152:caption: test_cat.py153154from click.testing import CliRunner155from cat import cat156157def test_cat_with_path_specified():158 runner = CliRunner()159 with runner.isolated_filesystem('~/test_folder'):160 with open('hello.txt', 'w') as f:161 f.write('Hello World!')162163 result = runner.invoke(cat, ['hello.txt'])164 assert result.exit_code == 0165 assert result.output == 'Hello World!\n'166```167168## Input Streams169170The test wrapper can provide input data for the input stream (stdin). This is very useful for testing prompts.171172```{code-block} python173:caption: prompt.py174175import click176177@click.command()178@click.option('--foo', prompt=True)179def prompt(foo):180 click.echo(f"foo={foo}")181```182183```{code-block} python184:caption: test_prompt.py185186from click.testing import CliRunner187from prompt import prompt188189def test_prompts():190 runner = CliRunner()191 result = runner.invoke(prompt, input='wau wau\n')192 assert not result.exception193 assert result.output == 'Foo: wau wau\nfoo=wau wau\n'194```195196Prompts will be emulated so they write the input data to197the output stream as well. If hidden input is expected then this198does not happen.
deleted:docs/testing.rst-158 removed
1Testing Click Applications2==========================34.. currentmodule:: click.testing56For basic testing, Click provides the :mod:`click.testing` module which7provides test functionality that helps you invoke command line8applications and check their behavior.910These tools should really only be used for testing as they change11the entire interpreter state for simplicity and are not in any way12thread-safe!1314Basic Testing15-------------1617The basic functionality for testing Click applications is the18:class:`CliRunner` which can invoke commands as command line scripts. The19:meth:`CliRunner.invoke` method runs the command line script in isolation20and captures the output as both bytes and binary data.2122The return value is a :class:`Result` object, which has the captured output23data, exit code, and optional exception attached:2425.. code-block:: python26 :caption: hello.py2728 import click2930 @click.command()31 @click.argument('name')32 def hello(name):33 click.echo(f'Hello {name}!')3435.. code-block:: python36 :caption: test_hello.py3738 from click.testing import CliRunner39 from hello import hello4041 def test_hello_world():42 runner = CliRunner()43 result = runner.invoke(hello, ['Peter'])44 assert result.exit_code == 045 assert result.output == 'Hello Peter!\n'4647For subcommand testing, a subcommand name must be specified in the `args` parameter of :meth:`CliRunner.invoke` method:4849.. code-block:: python50 :caption: sync.py5152 import click5354 @click.group()55 @click.option('--debug/--no-debug', default=False)56 def cli(debug):57 click.echo(f"Debug mode is {'on' if debug else 'off'}")5859 @cli.command()60 def sync():61 click.echo('Syncing')6263.. code-block:: python64 :caption: test_sync.py6566 from click.testing import CliRunner67 from sync import cli6869 def test_sync():70 runner = CliRunner()71 result = runner.invoke(cli, ['--debug', 'sync'])72 assert result.exit_code == 073 assert 'Debug mode is on' in result.output74 assert 'Syncing' in result.output7576Additional keyword arguments passed to ``.invoke()`` will be used to construct the initial Context object.77For example, if you want to run your tests against a fixed terminal width you can use the following::7879 runner = CliRunner()80 result = runner.invoke(cli, ['--debug', 'sync'], terminal_width=60)8182File System Isolation83---------------------8485For basic command line tools with file system operations, the86:meth:`CliRunner.isolated_filesystem` method is useful for setting the87current working directory to a new, empty folder.8889.. code-block:: python90 :caption: cat.py9192 import click9394 @click.command()95 @click.argument('f', type=click.File())96 def cat(f):97 click.echo(f.read())9899.. code-block:: python100 :caption: test_cat.py101102 from click.testing import CliRunner103 from cat import cat104105 def test_cat():106 runner = CliRunner()107 with runner.isolated_filesystem():108 with open('hello.txt', 'w') as f:109 f.write('Hello World!')110111 result = runner.invoke(cat, ['hello.txt'])112 assert result.exit_code == 0113 assert result.output == 'Hello World!\n'114115Pass ``temp_dir`` to control where the temporary directory is created.116The directory will not be removed by Click in this case. This is useful117to integrate with a framework like Pytest that manages temporary files.118119.. code-block:: python120121 def test_keep_dir(tmp_path):122 runner = CliRunner()123124 with runner.isolated_filesystem(temp_dir=tmp_path) as td:125 ...126127128Input Streams129-------------130131The test wrapper can also be used to provide input data for the input132stream (stdin). This is very useful for testing prompts, for instance:133134.. code-block:: python135 :caption: prompt.py136137 import click138139 @click.command()140 @click.option('--foo', prompt=True)141 def prompt(foo):142 click.echo(f"foo={foo}")143144.. code-block:: python145 :caption: test_prompt.py146147 from click.testing import CliRunner148 from prompt import prompt149150 def test_prompts():151 runner = CliRunner()152 result = runner.invoke(prompt, input='wau wau\n')153 assert not result.exception154 assert result.output == 'Foo: wau wau\nfoo=wau wau\n'155156Note that prompts will be emulated so that they write the input data to157the output stream as well. If hidden input is expected then this158obviously does not happen.
added:docs/unicode-support.md+100 added
1# Unicode Support23```{currentmodule} click4```56Click has to take extra care to support Unicode text in different environments.78- The command line in Unix is traditionally bytes, not Unicode. While there are encoding hints, there are some9 situations where this can break. The most common one is SSH connections to machines with different locales.1011 Misconfigured environments can cause a wide range of Unicode problems due to the lack of support for roundtripping12 surrogate escapes. This will not be fixed in Click itself!1314- Standard input and output is opened in text mode by default. Click has to reopen the stream in binary mode in certain15 situations. Because there is no standard way to do this, it might not always work. Primarily this can become a problem16 when testing command-line applications.1718 This is not supported:1920 ```python21 sys.stdin = io.StringIO('Input here')22 sys.stdout = io.StringIO()23 ```2425 Instead you need to do this:2627 ```python28 input = 'Input here'29 in_stream = io.BytesIO(input.encode('utf-8'))30 sys.stdin = io.TextIOWrapper(in_stream, encoding='utf-8')31 out_stream = io.BytesIO()32 sys.stdout = io.TextIOWrapper(out_stream, encoding='utf-8')33 ```3435 Remember in that case, you need to use `out_stream.getvalue()` and not `sys.stdout.getvalue()` if you want to access36 the buffer contents as the wrapper will not forward that method.3738- `sys.stdin`, `sys.stdout` and `sys.stderr` are by default text-based. When Click needs a binary stream, it attempts to39 discover the underlying binary stream.4041- `sys.argv` is always text. This means that the native type for input values to the types in Click is Unicode, not42 bytes.4344 This causes problems if the terminal is incorrectly set and Python does not figure out the encoding. In that case, the45 Unicode string will contain error bytes encoded as surrogate escapes.4647- When dealing with files, Click will always use the Unicode file system API by using the operating system's reported or48 guessed filesystem encoding. Surrogates are supported for filenames, so it should be possible to open files through49 the {func}`File` type even if the environment is misconfigured.5051## Surrogate Handling5253Click does all the Unicode handling in the standard library and is subject to its behavior. Unicode requires extra care.54The reason for this is that the encoding detection is done in the interpreter, and on Linux and certain other operating55systems, its encoding handling is problematic.5657The biggest source of frustration is that Click scripts invoked by init systems, deployment tools, or cron jobs will58refuse to work unless a Unicode locale is exported.5960If Click encounters such an environment it will prevent further execution to force you to set a locale. This is done61because Click cannot know about the state of the system once it's invoked and restore the values before Python's Unicode62handling kicked in.6364If you see something like this error:6566```console67Traceback (most recent call last):68 ...69RuntimeError: Click will abort further execution because Python was70 configured to use ASCII as encoding for the environment. Consult71 https://click.palletsprojects.com/unicode-support/ for mitigation72 steps.73```7475You are dealing with an environment where Python thinks you are restricted to ASCII data. The solution to these problems76is different depending on which locale your computer is running in.7778For instance, if you have a German Linux machine, you can fix the problem by exporting the locale to `de_DE.utf-8`:7980```console81export LC_ALL=de_DE.utf-882export LANG=de_DE.utf-883```8485If you are on a US machine, `en_US.utf-8` is the encoding of choice. On some newer Linux systems, you could also try86`C.UTF-8` as the locale:8788```console89export LC_ALL=C.UTF-890export LANG=C.UTF-891```9293On some systems it was reported that `UTF-8` has to be written as `UTF8` and vice versa. To see which locales are94supported you can invoke `locale -a`.9596You need to export the values before you invoke your Python script.9798In Python 3.7 and later you will no longer get a `RuntimeError` in many cases thanks to {pep}`538` and {pep}`540`, which99changed the default assumption in unconfigured environments. This doesn't change the general issue that your locale may100be misconfigured.
deleted:docs/unicode-support.rst-112 removed
1Unicode Support2===============34.. currentmodule:: click56Click has to take extra care to support Unicode text in different7environments.89* The command line in Unix is traditionally bytes, not Unicode. While10 there are encoding hints, there are some situations where this can11 break. The most common one is SSH connections to machines with12 different locales.1314 Misconfigured environments can cause a wide range of Unicode15 problems due to the lack of support for roundtripping surrogate16 escapes. This will not be fixed in Click itself!1718* Standard input and output is opened in text mode by default. Click19 has to reopen the stream in binary mode in certain situations.20 Because there is no standard way to do this, it might not always21 work. Primarily this can become a problem when testing command-line22 applications.2324 This is not supported::2526 sys.stdin = io.StringIO('Input here')27 sys.stdout = io.StringIO()2829 Instead you need to do this::3031 input = 'Input here'32 in_stream = io.BytesIO(input.encode('utf-8'))33 sys.stdin = io.TextIOWrapper(in_stream, encoding='utf-8')34 out_stream = io.BytesIO()35 sys.stdout = io.TextIOWrapper(out_stream, encoding='utf-8')3637 Remember in that case, you need to use ``out_stream.getvalue()``38 and not ``sys.stdout.getvalue()`` if you want to access the buffer39 contents as the wrapper will not forward that method.4041* ``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` are by default42 text-based. When Click needs a binary stream, it attempts to43 discover the underlying binary stream.4445* ``sys.argv`` is always text. This means that the native type for46 input values to the types in Click is Unicode, not bytes.4748 This causes problems if the terminal is incorrectly set and Python49 does not figure out the encoding. In that case, the Unicode string50 will contain error bytes encoded as surrogate escapes.5152* When dealing with files, Click will always use the Unicode file53 system API by using the operating system's reported or guessed54 filesystem encoding. Surrogates are supported for filenames, so it55 should be possible to open files through the :class:`File` type even56 if the environment is misconfigured.575859Surrogate Handling60------------------6162Click does all the Unicode handling in the standard library and is63subject to its behavior. Unicode requires extra care. The reason for64this is that the encoding detection is done in the interpreter, and on65Linux and certain other operating systems, its encoding handling is66problematic.6768The biggest source of frustration is that Click scripts invoked by init69systems, deployment tools, or cron jobs will refuse to work unless a70Unicode locale is exported.7172If Click encounters such an environment it will prevent further73execution to force you to set a locale. This is done because Click74cannot know about the state of the system once it's invoked and restore75the values before Python's Unicode handling kicked in.7677If you see something like this error::7879 Traceback (most recent call last):80 ...81 RuntimeError: Click will abort further execution because Python was82 configured to use ASCII as encoding for the environment. Consult83 https://click.palletsprojects.com/unicode-support/ for mitigation84 steps.8586You are dealing with an environment where Python thinks you are87restricted to ASCII data. The solution to these problems is different88depending on which locale your computer is running in.8990For instance, if you have a German Linux machine, you can fix the91problem by exporting the locale to ``de_DE.utf-8``::9293 export LC_ALL=de_DE.utf-894 export LANG=de_DE.utf-89596If you are on a US machine, ``en_US.utf-8`` is the encoding of choice.97On some newer Linux systems, you could also try ``C.UTF-8`` as the98locale::99100 export LC_ALL=C.UTF-8101 export LANG=C.UTF-8102103On some systems it was reported that ``UTF-8`` has to be written as104``UTF8`` and vice versa. To see which locales are supported you can105invoke ``locale -a``.106107You need to export the values before you invoke your Python script.108109In Python 3.7 and later you will no longer get a ``RuntimeError`` in110many cases thanks to :pep:`538` and :pep:`540`, which changed the111default assumption in unconfigured environments. This doesn't change the112general issue that your locale may be misconfigured.
added:docs/utils.md+392 added
1# Utilities23```{currentmodule} click4```56Besides the functionality that Click provides to interface with argument parsing and handling, it also provides a bunch7of addon functionality that is useful for writing command line utilities.89## Printing to Stdout1011The most obvious helper is the {func}`echo` function, which in many ways works like the Python `print` statement or12function. The main difference is that it works the same in many different terminal environments.1314Example:1516```python17import click1819click.echo('Hello World!')20```2122It can output both text and binary data. It will emit a trailing newline by default, which needs to be suppressed by23passing `nl=False`:2425```python26click.echo(b'\xe2\x98\x83', nl=False)27```2829Last but not least {func}`echo` uses click's intelligent internal output streams to stdout and stderr which support30unicode output on the Windows console. This means for as long as you are using `click.echo` you can output unicode31characters (there are some limitations on the default font with regards to which characters can be displayed).3233```{versionadded} 6.034```3536Click emulates output streams on Windows to support unicode to the Windows console through separate APIs. For more37information see {doc}`wincmd`.3839```{versionadded} 3.040```4142You can also easily print to standard error by passing `err=True`:4344```python45click.echo('Hello World!', err=True)46```4748(ansi-colors)=4950## ANSI Colors5152```{versionadded} 2.053```5455The {func}`echo` function supports ANSI colors and styles. On Windows this uses [colorama](https://pypi.org/project/colorama/).5657Primarily this means that:5859- Click's {func}`echo` function will automatically strip ANSI color codes if the stream is not connected to a terminal.60- the {func}`echo` function will transparently connect to the terminal on Windows and translate ANSI codes to terminal61 API calls. This means that colors will work on Windows the same way they do on other operating systems.6263On Windows, Click uses colorama without calling `colorama.init()`. You can still call that in your code, but it's not64required for Click.6566For styling a string, the {func}`style` function can be used:6768```python69import click7071click.echo(click.style('Hello World!', fg='green'))72click.echo(click.style('Some more text', bg='blue', fg='white'))73click.echo(click.style('ATTENTION', blink=True, bold=True))74```7576The combination of {func}`echo` and {func}`style` is also available in a single function called {func}`secho`:7778```python79click.secho('Hello World!', fg='green')80click.secho('Some more text', bg='blue', fg='white')81click.secho('ATTENTION', blink=True, bold=True)82```8384## Pager Support8586In some situations, you might want to show long texts on the terminal and let a user scroll through it. This can be87achieved by using the {func}`echo_via_pager` function which works similarly to the {func}`echo` function, but always88writes to stdout and, if possible, through a pager.8990Example:9192```{eval-rst}93.. click:example::94 @click.command()95 def less():96 click.echo_via_pager("\n".join(f"Line {idx}" for idx in range(200)))97```9899If you want to use the pager for a lot of text, especially if generating everything in advance would take a lot of time,100you can pass a generator (or generator function) instead of a string:101102```{eval-rst}103.. click:example::104 def _generate_output():105 for idx in range(50000):106 yield f"Line {idx}\n"107108 @click.command()109 def less():110 click.echo_via_pager(_generate_output())111```112113## Screen Clearing114115```{versionadded} 2.0116```117118To clear the terminal screen, you can use the {func}`clear` function that is provided starting with Click 2.0. It does119what the name suggests: it clears the entire visible screen in a platform-agnostic way:120121```python122import click123click.clear()124```125126## Getting Characters from Terminal127128```{versionadded} 2.0129```130131Normally, when reading input from the terminal, you would read from standard input. However, this is buffered input and132will not show up until the line has been terminated. In certain circumstances, you might not want to do that and instead133read individual characters as they are being written.134135For this, Click provides the {func}`getchar` function which reads a single character from the terminal buffer and136returns it as a Unicode character.137138Note that this function will always read from the terminal, even if stdin is instead a pipe.139140Example:141142```python143import click144145click.echo('Continue? [yn] ', nl=False)146c = click.getchar()147click.echo()148if c == 'y':149 click.echo('We will go on')150elif c == 'n':151 click.echo('Abort!')152else:153 click.echo('Invalid input :(')154```155156Note that this reads raw input, which means that things like arrow keys will show up in the platform's native escape157format. The only characters translated are `^C` and `^D` which are converted into keyboard interrupts and end of file158exceptions respectively. This is done because otherwise, it's too easy to forget about that and to create scripts that159cannot be properly exited.160161## Waiting for Key Press162163```{versionadded} 2.0164```165166Sometimes, it's useful to pause until the user presses any key on the keyboard. This is especially useful on Windows167where `cmd.exe` will close the window at the end of the command execution by default, instead of waiting.168169In click, this can be accomplished with the {func}`pause` function. This function will print a quick message to the170terminal (which can be customized) and wait for the user to press a key. In addition to that, it will also become a NOP171(no operation instruction) if the script is not run interactively.172173Example:174175```python176import click177click.pause()178```179180## Launching Editors181182```{versionadded} 2.0183```184185Click supports launching editors automatically through {func}`edit`. This is very useful for asking users for multi-line186input. It will automatically open the user's defined editor or fall back to a sensible default. If the user closes the187editor without saving, the return value will be `None`, otherwise the entered text.188189Example usage:190191```python192import click193194def get_commit_message():195 MARKER = '# Everything below is ignored\n'196 message = click.edit('\n\n' + MARKER)197 if message is not None:198 return message.split(MARKER, 1)[0].rstrip('\n')199```200201Alternatively, the function can also be used to launch editors for files by a specific filename. In this case, the202return value is always `None`.203204Example usage:205206```python207import click208click.edit(filename='/etc/passwd')209```210211## Launching Applications212213```{versionadded} 2.0214```215216Click supports launching applications through {func}`launch`. This can be used to open the default application217associated with a URL or filetype. This can be used to launch web browsers or picture viewers, for instance. In addition218to this, it can also launch the file manager and automatically select the provided file.219220Example usage:221222```python223click.launch("https://click.palletsprojects.com/")224click.launch("/my/downloaded/file.txt", locate=True)225```226227## Printing Filenames228229Because filenames might not be Unicode, formatting them can be a bit tricky.230231The way this works with click is through the {func}`format_filename` function. It does a best-effort conversion of the232filename to Unicode and will never fail. This makes it possible to use these filenames in the context of a full Unicode233string.234235Example:236237```python238click.echo(f"Path: {click.format_filename(b'foo.txt')}")239```240241## Standard Streams242243For command line utilities, it's very important to get access to input and output streams reliably. Python generally244provides access to these streams through `sys.stdout` and friends, but unfortunately, there are API differences between2452.x and 3.x, especially with regards to how these streams respond to Unicode and binary data.246247Because of this, click provides the {func}`get_binary_stream` and {func}`get_text_stream` functions, which produce248consistent results with different Python versions and for a wide variety of terminal configurations.249250The end result is that these functions will always return a functional stream object (except in very odd cases; see251{doc}`/unicode-support`).252253Example:254255```python256import click257258stdin_text = click.get_text_stream('stdin')259stdout_binary = click.get_binary_stream('stdout')260```261262```{versionadded} 6.0263```264265Click now emulates output streams on Windows to support unicode to the Windows console through separate APIs. For more266information see {doc}`wincmd`.267268## Intelligent File Opening269270```{versionadded} 3.0271```272273Starting with Click 3.0 the logic for opening files from the {func}`File` type is exposed through the {func}`open_file`274function. It can intelligently open stdin/stdout as well as any other file.275276Example:277278```python279import click280281stdout = click.open_file('-', 'w')282test_file = click.open_file('test.txt', 'w')283```284285If stdin or stdout are returned, the return value is wrapped in a special file where the context manager will prevent286the closing of the file. This makes the handling of standard streams transparent and you can always use it like this:287288```python289with click.open_file(filename, 'w') as f:290 f.write('Hello World!\n')291```292293## Finding Application Folders294295```{versionadded} 2.0296```297298Very often, you want to open a configuration file that belongs to your application. However, different operating systems299store these configuration files in different locations depending on their standards. Click provides a300{func}`get_app_dir` function which returns the most appropriate location for per-user config files for your application301depending on the OS.302303Example usage:304305```python306import os307import click308import ConfigParser309310APP_NAME = 'My Application'311def read_config():312cfg = os.path.join(click.get_app_dir(APP_NAME), 'config.ini')313parser = ConfigParser.RawConfigParser()314parser.read([cfg])315rv = {}316for section in parser.sections():317 for key, value in parser.items(section):318 rv[f"{section}.{key}"] = value319return rv320```321322## Showing Progress Bars323324Sometimes, you have command line scripts that need to process a lot of data, but you want to quickly show the user some325progress about how long that will take. Click supports simple progress bar rendering for that through the326{func}`progressbar` function.327328```{note} If you find that you have requirements beyond what Click's progress bar supports, try using [tqdm](https://tqdm.github.io/).329```330331The basic usage is very simple: the idea is that you have an iterable that you want to operate on. For each item in the332iterable it might take some time to do processing. So say you have a loop like this:333334```python335for user in all_the_users_to_process:336 modify_the_user(user)337```338339To hook this up with an automatically updating progress bar, all you need to do is to change the code to this:340341```python342import click343344with click.progressbar(all_the_users_to_process) as bar:345 for user in bar:346 modify_the_user(user)347```348349Click will then automatically print a progress bar to the terminal and calculate the remaining time for you. The350calculation of remaining time requires that the iterable has a length. If it does not have a length but you know the351length, you can explicitly provide it:352353```python354with click.progressbar(all_the_users_to_process,355 length=number_of_users) as bar:356 for user in bar:357 modify_the_user(user)358```359360Note that {func}`progressbar` updates the bar *after* each iteration of the loop. So code like this will render361correctly:362363```python364import time365366with click.progressbar([1, 2, 3]) as bar:367 for x in bar:368 print(f"sleep({x})...")369 time.sleep(x)370```371372Another useful feature is to associate a label with the progress bar which will be shown preceding the progress bar:373374```python375with click.progressbar(all_the_users_to_process,376 label='Modifying user accounts',377 length=number_of_users) as bar:378 for user in bar:379 modify_the_user(user)380```381382Sometimes, one may need to iterate over an external iterator, and advance the progress bar irregularly. To do so, you383need to specify the length (and no iterable), and use the update method on the context return value instead of iterating384directly over it:385386```python387with click.progressbar(length=total_size,388 label='Unzipping archive') as bar:389 for archive in zip_file:390 archive.extract()391 bar.update(archive.size)392```
deleted:docs/utils.rst-408 removed
1Utilities2=========34.. currentmodule:: click56Besides the functionality that Click provides to interface with argument7parsing and handling, it also provides a bunch of addon functionality that8is useful for writing command line utilities.91011Printing to Stdout12------------------1314The most obvious helper is the :func:`echo` function, which in many ways15works like the Python ``print`` statement or function. The main difference is16that it works the same in many different terminal environments.1718Example::1920 import click2122 click.echo('Hello World!')2324It can output both text and binary data. It will emit a trailing newline25by default, which needs to be suppressed by passing ``nl=False``::2627 click.echo(b'\xe2\x98\x83', nl=False)2829Last but not least :func:`echo` uses click's intelligent internal output30streams to stdout and stderr which support unicode output on the Windows31console. This means for as long as you are using `click.echo` you can32output unicode characters (there are some limitations on the default font33with regards to which characters can be displayed).3435.. versionadded:: 6.03637Click emulates output streams on Windows to support unicode to the38Windows console through separate APIs. For more information see39:doc:`wincmd`.4041.. versionadded:: 3.04243You can also easily print to standard error by passing ``err=True``::4445 click.echo('Hello World!', err=True)464748.. _ansi-colors:4950ANSI Colors51-----------5253.. versionadded:: 2.05455The :func:`echo` function supports ANSI colors and styles. On Windows56this uses `colorama`_.5758Primarily this means that:5960- Click's :func:`echo` function will automatically strip ANSI color codes61 if the stream is not connected to a terminal.62- the :func:`echo` function will transparently connect to the terminal on63 Windows and translate ANSI codes to terminal API calls. This means64 that colors will work on Windows the same way they do on other65 operating systems.6667On Windows, Click uses colorama without calling ``colorama.init()``. You68can still call that in your code, but it's not required for Click.6970For styling a string, the :func:`style` function can be used::7172 import click7374 click.echo(click.style('Hello World!', fg='green'))75 click.echo(click.style('Some more text', bg='blue', fg='white'))76 click.echo(click.style('ATTENTION', blink=True, bold=True))7778The combination of :func:`echo` and :func:`style` is also available in79a single function called :func:`secho`::8081 click.secho('Hello World!', fg='green')82 click.secho('Some more text', bg='blue', fg='white')83 click.secho('ATTENTION', blink=True, bold=True)848586.. _colorama: https://pypi.org/project/colorama/8788Pager Support89-------------9091In some situations, you might want to show long texts on the terminal and92let a user scroll through it. This can be achieved by using the93:func:`echo_via_pager` function which works similarly to the :func:`echo`94function, but always writes to stdout and, if possible, through a pager.9596Example:9798.. click:example::99100 @click.command()101 def less():102 click.echo_via_pager("\n".join(f"Line {idx}" for idx in range(200)))103104If you want to use the pager for a lot of text, especially if generating everything in advance would take a lot of time, you can pass a generator (or generator function) instead of a string:105106.. click:example::107 def _generate_output():108 for idx in range(50000):109 yield f"Line {idx}\n"110111 @click.command()112 def less():113 click.echo_via_pager(_generate_output())114115116Screen Clearing117---------------118119.. versionadded:: 2.0120121To clear the terminal screen, you can use the :func:`clear` function that122is provided starting with Click 2.0. It does what the name suggests: it123clears the entire visible screen in a platform-agnostic way:124125::126127 import click128 click.clear()129130131Getting Characters from Terminal132--------------------------------133134.. versionadded:: 2.0135136Normally, when reading input from the terminal, you would read from137standard input. However, this is buffered input and will not show up until138the line has been terminated. In certain circumstances, you might not want139to do that and instead read individual characters as they are being written.140141For this, Click provides the :func:`getchar` function which reads a single142character from the terminal buffer and returns it as a Unicode character.143144Note that this function will always read from the terminal, even if stdin145is instead a pipe.146147Example::148149 import click150151 click.echo('Continue? [yn] ', nl=False)152 c = click.getchar()153 click.echo()154 if c == 'y':155 click.echo('We will go on')156 elif c == 'n':157 click.echo('Abort!')158 else:159 click.echo('Invalid input :(')160161Note that this reads raw input, which means that things like arrow keys162will show up in the platform's native escape format. The only characters163translated are ``^C`` and ``^D`` which are converted into keyboard164interrupts and end of file exceptions respectively. This is done because165otherwise, it's too easy to forget about that and to create scripts that166cannot be properly exited.167168169Waiting for Key Press170---------------------171172.. versionadded:: 2.0173174Sometimes, it's useful to pause until the user presses any key on the175keyboard. This is especially useful on Windows where ``cmd.exe`` will176close the window at the end of the command execution by default, instead177of waiting.178179In click, this can be accomplished with the :func:`pause` function. This180function will print a quick message to the terminal (which can be181customized) and wait for the user to press a key. In addition to that,182it will also become a NOP (no operation instruction) if the script is not183run interactively.184185Example::186187 import click188 click.pause()189190191Launching Editors192-----------------193194.. versionadded:: 2.0195196Click supports launching editors automatically through :func:`edit`. This197is very useful for asking users for multi-line input. It will198automatically open the user's defined editor or fall back to a sensible199default. If the user closes the editor without saving, the return value200will be ``None``, otherwise the entered text.201202Example usage::203204 import click205206 def get_commit_message():207 MARKER = '# Everything below is ignored\n'208 message = click.edit('\n\n' + MARKER)209 if message is not None:210 return message.split(MARKER, 1)[0].rstrip('\n')211212Alternatively, the function can also be used to launch editors for files by213a specific filename. In this case, the return value is always `None`.214215Example usage::216217 import click218 click.edit(filename='/etc/passwd')219220221Launching Applications222----------------------223224.. versionadded:: 2.0225226Click supports launching applications through :func:`launch`. This can be227used to open the default application associated with a URL or filetype.228This can be used to launch web browsers or picture viewers, for instance.229In addition to this, it can also launch the file manager and automatically230select the provided file.231232Example usage::233234 click.launch("https://click.palletsprojects.com/")235 click.launch("/my/downloaded/file.txt", locate=True)236237238Printing Filenames239------------------240241Because filenames might not be Unicode, formatting them can be a bit242tricky.243244The way this works with click is through the :func:`format_filename`245function. It does a best-effort conversion of the filename to Unicode and246will never fail. This makes it possible to use these filenames in the247context of a full Unicode string.248249Example::250251 click.echo(f"Path: {click.format_filename(b'foo.txt')}")252253254Standard Streams255----------------256257For command line utilities, it's very important to get access to input and258output streams reliably. Python generally provides access to these259streams through ``sys.stdout`` and friends, but unfortunately, there are260API differences between 2.x and 3.x, especially with regards to how these261streams respond to Unicode and binary data.262263Because of this, click provides the :func:`get_binary_stream` and264:func:`get_text_stream` functions, which produce consistent results with265different Python versions and for a wide variety of terminal configurations.266267The end result is that these functions will always return a functional268stream object (except in very odd cases; see :doc:`/unicode-support`).269270Example::271272 import click273274 stdin_text = click.get_text_stream('stdin')275 stdout_binary = click.get_binary_stream('stdout')276277.. versionadded:: 6.0278279Click now emulates output streams on Windows to support unicode to the280Windows console through separate APIs. For more information see281:doc:`wincmd`.282283284Intelligent File Opening285------------------------286287.. versionadded:: 3.0288289Starting with Click 3.0 the logic for opening files from the :class:`File`290type is exposed through the :func:`open_file` function. It can291intelligently open stdin/stdout as well as any other file.292293Example::294295 import click296297 stdout = click.open_file('-', 'w')298 test_file = click.open_file('test.txt', 'w')299300If stdin or stdout are returned, the return value is wrapped in a special301file where the context manager will prevent the closing of the file. This302makes the handling of standard streams transparent and you can always use303it like this::304305 with click.open_file(filename, 'w') as f:306 f.write('Hello World!\n')307308309Finding Application Folders310---------------------------311312.. versionadded:: 2.0313314Very often, you want to open a configuration file that belongs to your315application. However, different operating systems store these configuration316files in different locations depending on their standards. Click provides317a :func:`get_app_dir` function which returns the most appropriate location318for per-user config files for your application depending on the OS.319320Example usage::321322 import os323 import click324 import ConfigParser325326 APP_NAME = 'My Application'327328 def read_config():329 cfg = os.path.join(click.get_app_dir(APP_NAME), 'config.ini')330 parser = ConfigParser.RawConfigParser()331 parser.read([cfg])332 rv = {}333 for section in parser.sections():334 for key, value in parser.items(section):335 rv[f"{section}.{key}"] = value336 return rv337338339Showing Progress Bars340---------------------341342Sometimes, you have command line scripts that need to process a lot of data,343but you want to quickly show the user some progress about how long that344will take. Click supports simple progress bar rendering for that through345the :func:`progressbar` function.346347.. note::348349 If you find that you have requirements beyond what Click's progress350 bar supports, try using `tqdm`_.351352 .. _tqdm: https://tqdm.github.io/353354The basic usage is very simple: the idea is that you have an iterable that355you want to operate on. For each item in the iterable it might take some356time to do processing. So say you have a loop like this::357358 for user in all_the_users_to_process:359 modify_the_user(user)360361To hook this up with an automatically updating progress bar, all you need362to do is to change the code to this::363364 import click365366 with click.progressbar(all_the_users_to_process) as bar:367 for user in bar:368 modify_the_user(user)369370Click will then automatically print a progress bar to the terminal and371calculate the remaining time for you. The calculation of remaining time372requires that the iterable has a length. If it does not have a length373but you know the length, you can explicitly provide it::374375 with click.progressbar(all_the_users_to_process,376 length=number_of_users) as bar:377 for user in bar:378 modify_the_user(user)379380Note that :func:`progressbar` updates the bar *after* each iteration of the381loop. So code like this will render correctly::382383 import time384385 with click.progressbar([1, 2, 3]) as bar:386 for x in bar:387 print(f"sleep({x})...")388 time.sleep(x)389390Another useful feature is to associate a label with the progress bar which391will be shown preceding the progress bar::392393 with click.progressbar(all_the_users_to_process,394 label='Modifying user accounts',395 length=number_of_users) as bar:396 for user in bar:397 modify_the_user(user)398399Sometimes, one may need to iterate over an external iterator, and advance the400progress bar irregularly. To do so, you need to specify the length (and no401iterable), and use the update method on the context return value instead of402iterating directly over it::403404 with click.progressbar(length=total_size,405 label='Unzipping archive') as bar:406 for archive in zip_file:407 archive.extract()408 bar.update(archive.size)
added:docs/virtualenv.md+58 added
1(virtualenv-heading)=23# Virtualenv45## Why Use Virtualenv?67You should use [Virtualenv](https://virtualenv.pypa.io/en/latest/) because:89- It allows you to install multiple versions of the same dependency.10- If you have an operating system version of Python, it prevents you from changing its dependencies and potentially11 messing up your os.1213## How to Use Virtualenv1415Create your project folder, then a virtualenv within it:1617```console18$ mkdir myproject19$ cd myproject20$ python3 -m venv .venv21```2223Now, whenever you want to work on a project, you only have to activate the corresponding environment.242526```{eval-rst}27.. tabs::2829 .. group-tab:: OSX/Linux3031 .. code-block:: text3233 $ . .venv/bin/activate34 (venv) $3536 .. group-tab:: Windows3738 .. code-block:: text3940 > .venv\scripts\activate41 (venv) >42```4344You are now using your virtualenv (notice how the prompt of your shell has changed to show the active environment).4546To install packages in the virtual environment:4748```console49$ pip install click50```5152And if you want to stop using the virtualenv, use the following command:5354```console55$ deactivate56```5758After doing this, the prompt of your shell should be as familiar as before.
deleted:docs/virtualenv.rst-54 removed
1.. _virtualenv-heading:23Virtualenv4=========================56Why Use Virtualenv?7-------------------------89You should use `Virtualenv <https://virtualenv.pypa.io/en/latest/>`_ because:1011* It allows you to install multiple versions of the same dependency.1213* If you have an operating system version of Python, it prevents you from changing its dependencies and potentially messing up your os.1415How to Use Virtualenv16-----------------------------1718Create your project folder, then a virtualenv within it::1920 $ mkdir myproject21 $ cd myproject22 $ python3 -m venv .venv2324Now, whenever you want to work on a project, you only have to activate the25corresponding environment.2627.. tabs::2829 .. group-tab:: OSX/Linux3031 .. code-block:: text3233 $ . .venv/bin/activate34 (venv) $3536 .. group-tab:: Windows3738 .. code-block:: text3940 > .venv\scripts\activate41 (venv) >424344You are now using your virtualenv (notice how the prompt of your shell has changed to show the active environment).4546To install packages in the virtual environment::4748 $ pip install click4950And if you want to stop using the virtualenv, use the following command::5152 $ deactivate5354After doing this, the prompt of your shell should be as familiar as before.
added:docs/why.md+106 added
1# Why Click?23There are so many libraries out there for writing command line utilities; why does Click exist?45This question is easy to answer: because there is not a single command line utility for Python out there which ticks the6following boxes:78- Is lazily composable without restrictions.9- Supports implementation of Unix/POSIX command line conventions.10- Supports loading values from environment variables out of the box.11- Support for prompting of custom values.12- Is fully nestable and composable.13- Supports file handling out of the box.14- Comes with useful common helpers (getting terminal dimensions, ANSI colors, fetching direct keyboard input, screen15 clearing, finding config paths, launching apps and editors, etc.).1617There are many alternatives to Click; the obvious ones are `optparse` and `argparse` from the standard library. Have a18look to see if something else resonates with you.1920Click actually implements its own parsing of arguments and does not use `optparse` or `argparse` following the21`optparse` parsing behavior. The reason it's not based on `argparse` is that `argparse` does not allow proper nesting of22commands by design and has some deficiencies when it comes to POSIX compliant argument handling.2324Click is designed to be fun and customizable but not overly flexible. For instance, the customizability of help pages is25constrained. This constraint is intentional because Click promises multiple Click instances will continue to function as26intended when strung together.2728Too much customizability would break this promise.2930Click was written to support the [Flask](https://palletsprojects.com/p/flask/) microframework ecosystem because no tool31could provide it with the functionality it needed.3233To get an understanding of what Click is all about, I strongly recommend looking at the {ref}`complex-guide` chapter.3435## Why not Argparse?3637Click is internally based on `optparse` instead of `argparse`. This is an implementation detail that a user does not38have to be concerned with. Click is not based on `argparse` because it has some behaviors that make handling arbitrary39command line interfaces hard:4041- `argparse` has built-in behavior to guess if something is an argument or an option. This becomes a problem when42 dealing with incomplete command lines; the behaviour becomes unpredictable without full knowledge of a command line.43 This goes against Click's ambitions of dispatching to subparsers.44- `argparse` does not support disabling interspersed arguments. Without this feature, it's not possible to safely45 implement Click's nested parsing.4647## Why not Docopt etc.?4849Docopt, and many tools like it, are cool in how they work, but very few of these tools deal with nesting of commands and50composability in a way like Click. To the best of the developer's knowledge, Click is the first Python library that aims51to create a level of composability of applications that goes beyond what the system itself supports.5253Docopt, for instance, acts by parsing your help pages and then parsing according to those rules. The side effect of this54is that docopt is quite rigid in how it handles the command line interface. The upside of docopt is that it gives you55strong control over your help page; the downside is that due to this it cannot rewrap your output for the current56terminal width, and it makes translations hard. On top of that, docopt is restricted to basic parsing. It does not57handle argument dispatching and callback invocation or types. This means there is a lot of code that needs to be written58in addition to the basic help page to handle the parsing results.5960Most of all, however, it makes composability hard. While docopt does support dispatching to subcommands, it, for61instance, does not directly support any kind of automatic subcommand enumeration based on what's available or it does62not enforce subcommands to work in a consistent way.6364This is fine, but it's different from how Click wants to work. Click aims to support fully composable command line user65interfaces by doing the following:6667- Click does not just parse, it also dispatches to the appropriate code.68- Click has a strong concept of an invocation context that allows subcommands to respond to data from the parent69 command.70- Click has strong information available for all parameters and commands, so it can generate unified help pages for the71 full CLI and assist the user in converting the input data as necessary.72- Click has a strong understanding of what types are, and it can give the user consistent error messages if something73 goes wrong. A subcommand written by a different developer will not suddenly die with a different error message because74 it's manually handled.75- Click has enough meta information available for its whole program to evolve over time and improve the user experience76 without forcing developers to adjust their programs. For instance, if Click decides to change how help pages are77 formatted, all Click programs will automatically benefit from this.7879The aim of Click is to make composable systems. Whereas, the aim of docopt is to build the most beautiful and80hand-crafted command line interfaces. These two goals conflict with one another in subtle ways. Click actively prevents81people from implementing certain patterns in order to achieve unified command line interfaces. For instance, as a82developer, you are given very little choice in formatting your help pages.8384## Why Hardcoded Behaviors?8586The other question is why Click goes away from optparse and hardcodes certain behaviors instead of staying configurable.87There are multiple reasons for this. The biggest one is that too much configurability makes it hard to achieve a88consistent command line experience.8990The best example for this is optparse's `callback` functionality for accepting an arbitrary number of arguments. Due to91syntactical ambiguities on the command line, there is no way to implement fully variadic arguments. There are always92tradeoffs that need to be made and in case of `argparse` these tradeoffs have been critical enough, that a system like93Click cannot even be implemented on top of it.9495In this particular case, Click attempts to stay with a handful of accepted paradigms for building command line96interfaces that can be well documented and tested.9798## Why No Auto Correction?99100The question came up why Click does not auto correct parameters given that even optparse and `argparse` support101automatic expansion of long arguments. The reason for this is that it's a liability for backwards compatibility. If102people start relying on automatically modified parameters and someone adds a new parameter in the future, the script103might stop working. These kinds of problems are hard to find, so Click does not attempt to be magical about this.104105This sort of behavior however can be implemented on a higher level to support things such as explicit aliases. For more106information see {ref}`aliases`.
deleted:docs/why.rst-146 removed
1Why Click?2==========34There are so many libraries out there for writing command line utilities;5why does Click exist?67This question is easy to answer: because there is not a single command8line utility for Python out there which ticks the following boxes:910* Is lazily composable without restrictions.11* Supports implementation of Unix/POSIX command line conventions.12* Supports loading values from environment variables out of the box.13* Support for prompting of custom values.14* Is fully nestable and composable.15* Supports file handling out of the box.16* Comes with useful common helpers (getting terminal dimensions,17 ANSI colors, fetching direct keyboard input, screen clearing,18 finding config paths, launching apps and editors, etc.).1920There are many alternatives to Click; the obvious ones are ``optparse``21and ``argparse`` from the standard library. Have a look to see if something22else resonates with you.2324Click actually implements its own parsing of arguments and does not use25``optparse`` or ``argparse`` following the ``optparse`` parsing behavior.26The reason it's not based on ``argparse`` is that ``argparse`` does not27allow proper nesting of commands by design and has some deficiencies when28it comes to POSIX compliant argument handling.2930Click is designed to be fun and customizable but not overly flexible.31For instance, the customizability of help pages is constrained. This32constraint is intentional because Click promises multiple Click instances33will continue to function as intended when strung together.3435Too much customizability would break this promise.3637Click was written to support the `Flask <https://palletsprojects.com/p/flask/>`_38microframework ecosystem because no tool could provide it with the39functionality it needed.4041To get an understanding of what Click is all about, I strongly recommend42looking at the :ref:`complex-guide` chapter.4344Why not Argparse?45-----------------4647Click is internally based on ``optparse`` instead of ``argparse``. This48is an implementation detail that a user does not have to be concerned49with. Click is not based on ``argparse`` because it has some behaviors that50make handling arbitrary command line interfaces hard:5152* ``argparse`` has built-in behavior to guess if something is an53 argument or an option. This becomes a problem when dealing with54 incomplete command lines; the behaviour becomes unpredictable55 without full knowledge of a command line. This goes against Click's56 ambitions of dispatching to subparsers.57* ``argparse`` does not support disabling interspersed arguments. Without58 this feature, it's not possible to safely implement Click's nested59 parsing.6061Why not Docopt etc.?62--------------------6364Docopt, and many tools like it, are cool in how they work, but very few of65these tools deal with nesting of commands and composability in a way like66Click. To the best of the developer's knowledge, Click is the first67Python library that aims to create a level of composability of applications68that goes beyond what the system itself supports.6970Docopt, for instance, acts by parsing your help pages and then parsing71according to those rules. The side effect of this is that docopt is quite72rigid in how it handles the command line interface. The upside of docopt73is that it gives you strong control over your help page; the downside is74that due to this it cannot rewrap your output for the current terminal75width, and it makes translations hard. On top of that, docopt is restricted76to basic parsing. It does not handle argument dispatching and callback77invocation or types. This means there is a lot of code that needs to be78written in addition to the basic help page to handle the parsing results.7980Most of all, however, it makes composability hard. While docopt does81support dispatching to subcommands, it, for instance, does not directly82support any kind of automatic subcommand enumeration based on what's83available or it does not enforce subcommands to work in a consistent way.8485This is fine, but it's different from how Click wants to work. Click aims86to support fully composable command line user interfaces by doing the87following:8889- Click does not just parse, it also dispatches to the appropriate code.90- Click has a strong concept of an invocation context that allows91 subcommands to respond to data from the parent command.92- Click has strong information available for all parameters and commands,93 so it can generate unified help pages for the full CLI and94 assist the user in converting the input data as necessary.95- Click has a strong understanding of what types are, and it can give the user96 consistent error messages if something goes wrong. A subcommand97 written by a different developer will not suddenly die with a98 different error message because it's manually handled.99- Click has enough meta information available for its whole program100 to evolve over time and improve the user experience without101 forcing developers to adjust their programs. For instance, if Click102 decides to change how help pages are formatted, all Click programs103 will automatically benefit from this.104105The aim of Click is to make composable systems. Whereas, the aim of docopt106is to build the most beautiful and hand-crafted command line interfaces.107These two goals conflict with one another in subtle ways. Click108actively prevents people from implementing certain patterns in order to109achieve unified command line interfaces. For instance, as a developer, you110are given very little choice in formatting your help pages.111112113Why Hardcoded Behaviors?114------------------------115116The other question is why Click goes away from optparse and hardcodes117certain behaviors instead of staying configurable. There are multiple118reasons for this. The biggest one is that too much configurability makes119it hard to achieve a consistent command line experience.120121The best example for this is optparse's ``callback`` functionality for122accepting an arbitrary number of arguments. Due to syntactical ambiguities123on the command line, there is no way to implement fully variadic arguments.124There are always tradeoffs that need to be made and in case of125``argparse`` these tradeoffs have been critical enough, that a system like126Click cannot even be implemented on top of it.127128In this particular case, Click attempts to stay with a handful of accepted129paradigms for building command line interfaces that can be well documented130and tested.131132133Why No Auto Correction?134-----------------------135136The question came up why Click does not auto correct parameters given that137even optparse and ``argparse`` support automatic expansion of long arguments.138The reason for this is that it's a liability for backwards compatibility.139If people start relying on automatically modified parameters and someone140adds a new parameter in the future, the script might stop working. These141kinds of problems are hard to find, so Click does not attempt to be magical142about this.143144This sort of behavior however can be implemented on a higher level to145support things such as explicit aliases. For more information see146:ref:`aliases`.
added:docs/wincmd.md+47 added
1# Windows Console Notes23```{versionadded} 6.04```56Click emulates output streams on Windows to support unicode to the Windows console through separate APIs and we perform7different decoding of parameters.89Here is a brief overview of how this works and what it means to you.1011## Unicode Arguments1213Click internally is generally based on the concept that any argument can come in as either byte string or unicode string14and conversion is performed to the type expected value as late as possible. This has some advantages as it allows us to15accept the data in the most appropriate form for the operating system and Python version.1617This caused some problems on Windows where initially the wrong encoding was used and garbage ended up in your input18data. We not only fixed the encoding part, but we also now extract unicode parameters from `sys.argv`.1920There is also another limitation with this: if `sys.argv` was modified prior to invoking a click handler, we have to21fall back to the regular byte input in which case not all unicode values are available but only a subset of the codepage22used for parameters.2324## Unicode Output and Input2526Unicode output and input on Windows is implemented through the concept of a dispatching text stream. What this means is27that when click first needs a text output (or input) stream on windows it goes through a few checks to figure out of a28windows console is connected or not. If no Windows console is present then the text output stream is returned as such29and the encoding for that stream is set to `utf-8` like on all platforms.3031However if a console is connected the stream will instead be emulated and use the cmd.exe unicode APIs to output text32information. In this case the stream will also use `utf-16-le` as internal encoding. However there is some hackery going33on that the underlying raw IO buffer is still bypassing the unicode APIs and byte output through an indirection is still34possible.3536- This unicode support is limited to `click.echo`, `click.prompt` as well as `click.get_text_stream`.37- Depending on if unicode values or byte strings are passed the control flow goes completely different places internally38 which can have some odd artifacts if data partially ends up being buffered. Click attempts to protect against that by39 manually always flushing but if you are mixing and matching different string types to `stdout` or `stderr` you will40 need to manually flush.41- The raw output stream is set to binary mode, which is a global operation on Windows, so `print` calls will be42 affected. Prefer `click.echo` over `print`.43- On Windows 7 and below, there is a limitation where at most 64k characters can be written in one call in binary mode.44 In this situation, `sys.stdout` and `sys.stderr` are replaced with wrappers that work around the limitation.4546Another important thing to note is that the Windows console's default fonts do not support a lot of characters which47means that you are mostly limited to international letters but no emojis or special characters.
deleted:docs/wincmd.rst-64 removed
1Windows Console Notes2=====================34.. versionadded:: 6.056Click emulates output streams on Windows to support unicode to the7Windows console through separate APIs and we perform different decoding of8parameters.910Here is a brief overview of how this works and what it means to you.1112Unicode Arguments13-----------------1415Click internally is generally based on the concept that any argument can16come in as either byte string or unicode string and conversion is17performed to the type expected value as late as possible. This has some18advantages as it allows us to accept the data in the most appropriate form19for the operating system and Python version.2021This caused some problems on Windows where initially the wrong encoding22was used and garbage ended up in your input data. We not only fixed the23encoding part, but we also now extract unicode parameters from `sys.argv`.2425There is also another limitation with this: if `sys.argv` was modified26prior to invoking a click handler, we have to fall back to the regular27byte input in which case not all unicode values are available but only a28subset of the codepage used for parameters.2930Unicode Output and Input31------------------------3233Unicode output and input on Windows is implemented through the concept of34a dispatching text stream. What this means is that when click first needs35a text output (or input) stream on windows it goes through a few checks to36figure out of a windows console is connected or not. If no Windows37console is present then the text output stream is returned as such and the38encoding for that stream is set to ``utf-8`` like on all platforms.3940However if a console is connected the stream will instead be emulated and41use the cmd.exe unicode APIs to output text information. In this case the42stream will also use ``utf-16-le`` as internal encoding. However there is43some hackery going on that the underlying raw IO buffer is still bypassing44the unicode APIs and byte output through an indirection is still possible.4546* This unicode support is limited to ``click.echo``, ``click.prompt`` as47 well as ``click.get_text_stream``.48* Depending on if unicode values or byte strings are passed the control49 flow goes completely different places internally which can have some50 odd artifacts if data partially ends up being buffered. Click51 attempts to protect against that by manually always flushing but if52 you are mixing and matching different string types to ``stdout`` or53 ``stderr`` you will need to manually flush.54* The raw output stream is set to binary mode, which is a global55 operation on Windows, so ``print`` calls will be affected. Prefer56 ``click.echo`` over ``print``.57* On Windows 7 and below, there is a limitation where at most 64k58 characters can be written in one call in binary mode. In this59 situation, ``sys.stdout`` and ``sys.stderr`` are replaced with60 wrappers that work around the limitation.6162Another important thing to note is that the Windows console's default63fonts do not support a lot of characters which means that you are mostly64limited to international letters but no emojis or special characters.
modified:examples/aliases/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-aliases"3version = "1.0.0"4description = "Click aliases example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
modified:examples/colors/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-colors"3version = "1.0.0"4description = "Click colors example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
modified:examples/completion/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-completion"3version = "1.0.0"4description = "Click completion example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
modified:examples/complex/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-complex"3version = "1.0.0"4description = "Click complex example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
modified:examples/imagepipe/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-imagepipe"3version = "1.0.0"4description = "Click imagepipe example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8 "pillow",9]
10 unmodified lines
modified:examples/inout/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-inout"3version = "1.0.0"4description = "Click inout example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
modified:examples/naval/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-naval"3version = "1.0.0"4description = "Click naval example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
modified:examples/repo/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-repo"3version = "1.0.0"4description = "Click repo example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
modified:examples/termui/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-termui"3version = "1.0.0"4description = "Click termui example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
modified:examples/validation/pyproject.toml+1 added-1 removed
1[project]2name = "click-example-validation"3version = "1.0.0"4description = "Click validation example"5requires-python = ">=3.8"5requires-python = ">=3.10"6dependencies = [7 "click>=8.1",8]9
9 unmodified lines
deleted:requirements/build.in-1 removed
1build
deleted:requirements/build.txt-12 removed
1#2# This file is autogenerated by pip-compile with Python 3.133# by the following command:4#5# pip-compile build.in6#7build==1.2.2.post18 # via -r build.in9packaging==24.110 # via build11pyproject-hooks==1.2.012 # via build
deleted:requirements/dev.in-5 removed
1-r docs.txt2-r tests.txt3-r typing.txt4pre-commit5tox
deleted:requirements/dev.txt-150 removed
1#2# This file is autogenerated by pip-compile with Python 3.133# by the following command:4#5# pip-compile dev.in6#7alabaster==1.0.08 # via sphinx9babel==2.16.010 # via sphinx11build==1.2.2.post112 # via pip-tools13cachetools==5.5.014 # via tox15certifi==2024.8.3016 # via requests17cfgv==3.4.018 # via pre-commit19chardet==5.2.020 # via tox21charset-normalizer==3.4.022 # via requests23click==8.1.724 # via25 # pip-compile-multi26 # pip-tools27colorama==0.4.628 # via tox29distlib==0.3.930 # via virtualenv31docutils==0.21.232 # via33 # sphinx34 # sphinx-tabs35filelock==3.16.136 # via37 # tox38 # virtualenv39identify==2.6.140 # via pre-commit41idna==3.1042 # via requests43imagesize==1.4.144 # via sphinx45iniconfig==2.0.046 # via pytest47jinja2==3.1.448 # via sphinx49markupsafe==3.0.250 # via jinja251mypy==1.13.052 # via -r typing.in53mypy-extensions==1.0.054 # via mypy55nodeenv==1.9.156 # via57 # pre-commit58 # pyright59packaging==24.160 # via61 # build62 # pallets-sphinx-themes63 # pyproject-api64 # pytest65 # sphinx66 # tox67pallets-sphinx-themes==2.3.068 # via -r docs.in69pip-compile-multi==2.6.470 # via -r dev.in71pip-tools==7.4.172 # via pip-compile-multi73platformdirs==4.3.674 # via75 # tox76 # virtualenv77pluggy==1.5.078 # via79 # pytest80 # tox81pre-commit==4.0.182 # via -r dev.in83pygments==2.18.084 # via85 # sphinx86 # sphinx-tabs87pyproject-api==1.8.088 # via tox89pyproject-hooks==1.2.090 # via91 # build92 # pip-tools93pyright==1.1.38694 # via -r typing.in95pytest==8.3.396 # via -r tests.in97pyyaml==6.0.298 # via pre-commit99requests==2.32.3100 # via sphinx101snowballstemmer==2.2.0102 # via sphinx103sphinx==8.1.3104 # via105 # -r docs.in106 # pallets-sphinx-themes107 # sphinx-issues108 # sphinx-notfound-page109 # sphinx-tabs110 # sphinxcontrib-log-cabinet111sphinx-issues==5.0.0112 # via -r docs.in113sphinx-notfound-page==1.0.4114 # via pallets-sphinx-themes115sphinx-tabs==3.4.7116 # via -r docs.in117sphinxcontrib-applehelp==2.0.0118 # via sphinx119sphinxcontrib-devhelp==2.0.0120 # via sphinx121sphinxcontrib-htmlhelp==2.1.0122 # via sphinx123sphinxcontrib-jsmath==1.0.1124 # via sphinx125sphinxcontrib-log-cabinet==1.0.1126 # via -r docs.in127sphinxcontrib-qthelp==2.0.0128 # via sphinx129sphinxcontrib-serializinghtml==2.0.0130 # via sphinx131toposort==1.10132 # via pip-compile-multi133tox==4.23.2134 # via -r dev.in135typing-extensions==4.12.2136 # via137 # mypy138 # pyright139urllib3==2.2.3140 # via requests141virtualenv==20.27.0142 # via143 # pre-commit144 # tox145wheel==0.44.0146 # via pip-tools147148# The following packages are considered to be unsafe in a requirements file:149# pip150# setuptools
deleted:requirements/docs.in-4 removed
1pallets-sphinx-themes2sphinx3sphinxcontrib-log-cabinet4sphinx-tabs
deleted:requirements/docs.txt-70 removed
1#2# This file is autogenerated by pip-compile with Python 3.133# by the following command:4#5# pip-compile docs.in6#7alabaster==1.0.08 # via sphinx9babel==2.16.010 # via sphinx11certifi==2024.8.3012 # via requests13charset-normalizer==3.4.014 # via requests15docutils==0.21.216 # via17 # sphinx18 # sphinx-tabs19idna==3.1020 # via requests21imagesize==1.4.122 # via sphinx23jinja2==3.1.424 # via sphinx25markupsafe==3.0.226 # via jinja227packaging==24.128 # via29 # pallets-sphinx-themes30 # sphinx31pallets-sphinx-themes==2.3.032 # via -r docs.in33pygments==2.18.034 # via35 # sphinx36 # sphinx-tabs37requests==2.32.338 # via sphinx39snowballstemmer==2.2.040 # via sphinx41sphinx==8.1.342 # via43 # -r docs.in44 # pallets-sphinx-themes45 # sphinx-issues46 # sphinx-notfound-page47 # sphinx-tabs48 # sphinxcontrib-log-cabinet49sphinx-issues==5.0.050 # via -r docs.in51sphinx-notfound-page==1.0.452 # via pallets-sphinx-themes53sphinx-tabs==3.4.754 # via -r docs.in55sphinxcontrib-applehelp==2.0.056 # via sphinx57sphinxcontrib-devhelp==2.0.058 # via sphinx59sphinxcontrib-htmlhelp==2.1.060 # via sphinx61sphinxcontrib-jsmath==1.0.162 # via sphinx63sphinxcontrib-log-cabinet==1.0.164 # via -r docs.in65sphinxcontrib-qthelp==2.0.066 # via sphinx67sphinxcontrib-serializinghtml==2.0.068 # via sphinx69urllib3==2.2.370 # via requests
deleted:requirements/tests.in-1 removed
1pytest
deleted:requirements/tests.txt-14 removed
1#2# This file is autogenerated by pip-compile with Python 3.133# by the following command:4#5# pip-compile tests.in6#7iniconfig==2.0.08 # via pytest9packaging==24.110 # via pytest11pluggy==1.5.012 # via pytest13pytest==8.3.314 # via -r tests.in
deleted:requirements/typing.in-3 removed
1mypy2pyright3pytest
deleted:requirements/typing.txt-18 removed
1#2# This file is autogenerated by pip-compile with Python 3.133# by the following command:4#5# pip-compile typing.in6#7mypy==1.13.08 # via -r typing.in9mypy-extensions==1.0.010 # via mypy11nodeenv==1.9.112 # via pyright13pyright==1.1.38614 # via -r typing.in15typing-extensions==4.12.216 # via17 # mypy18 # pyright
modified:src/click/__init__.py-1 removed
17 unmodified lines
18from .decorators import command as command19from .decorators import confirmation_option as confirmation_option20from .decorators import group as group21from .decorators import help_option as help_option22from .decorators import HelpOption as HelpOption22from .decorators import make_pass_decorator as make_pass_decorator23from .decorators import option as option24from .decorators import pass_context as pass_context25from .decorators import pass_obj as pass_obj
98 unmodified lines
modified:src/click/_termui_impl.py+110 added-40 removed
8 unmodified lines
9import collections.abc as cabc10import contextlib11import math12import os13import shlex14import sys15import time16import typing as t17from gettext import gettext as _18from io import StringIO19from pathlib import Path20from shutil import which21from types import TracebackType2223from ._compat import _default_text_stdout24from ._compat import CYGWIN
74 unmodified lines
99 raise TypeError("iterable or length is required")100 iterable = t.cast("cabc.Iterable[V]", range(length))101 self.iter: cabc.Iterable[V] = iter(iterable)102 self.length = length100 self.pos = 0103 self.pos: int = 0104 self.avg: list[float] = []105 self.last_eta: float106 self.start: float107 self.start = self.last_eta = time.time()
269 unmodified lines
377 stdout = StringIO()378379 if not isatty(sys.stdin) or not isatty(stdout):380 return _nullpager(stdout, generator, color)378 pager_cmd = (os.environ.get("PAGER", None) or "").strip()379 if pager_cmd:381382 # Split and normalize the pager command into parts.383 pager_cmd_parts = shlex.split(os.environ.get("PAGER", ""), posix=False)384 if pager_cmd_parts:385 if WIN:381 return _tempfilepager(generator, pager_cmd, color)382 return _pipepager(generator, pager_cmd, color)386 if _tempfilepager(generator, pager_cmd_parts, color):387 return388 elif _pipepager(generator, pager_cmd_parts, color):389 return390391 if os.environ.get("TERM") in ("dumb", "emacs"):392 return _nullpager(stdout, generator, color)385 if WIN or sys.platform.startswith("os2"):386 return _tempfilepager(generator, "more <", color)387 if hasattr(os, "system") and os.system("(less) 2>/dev/null") == 0:388 return _pipepager(generator, "less", color)393 if (WIN or sys.platform.startswith("os2")) and _tempfilepager(394 generator, ["more"], color395 ):396 return397 if _pipepager(generator, ["less"], color):398 return399400 import tempfile401402 fd, filename = tempfile.mkstemp()403 os.close(fd)404 try:395 if hasattr(os, "system") and os.system(f'more "{filename}"') == 0:396 return _pipepager(generator, "more", color)405 if _pipepager(generator, ["more"], color):406 return407 return _nullpager(stdout, generator, color)408 finally:409 os.unlink(filename)410411402def _pipepager(generator: cabc.Iterable[str], cmd: str, color: bool | None) -> None:403 """Page through text by feeding it to another program. Invoking a412def _pipepager(413 generator: cabc.Iterable[str], cmd_parts: list[str], color: bool | None414) -> bool:415 """Page through text by feeding it to another program. Invoking a416 pager through this might support colors.417418 Returns `True` if the command was found, `False` otherwise and thus another419 pager should be attempted.420 """421 # Split the command into the invoked CLI and its parameters.422 if not cmd_parts:423 return False424 cmd = cmd_parts[0]425 cmd_params = cmd_parts[1:]426427 cmd_filepath = which(cmd)428 if not cmd_filepath:429 return False430 # Resolves symlinks and produces a normalized absolute path string.431 cmd_path = Path(cmd_filepath).resolve()432 cmd_name = cmd_path.name433434 import subprocess435436 # Make a local copy of the environment to not affect the global one.437 env = dict(os.environ)438410 # If we're piping to less we might support colors under the411 # condition that412 cmd_detail = cmd.rsplit("/", 1)[-1].split()413 if color is None and cmd_detail[0] == "less":414 less_flags = f"{os.environ.get('LESS', '')}{' '.join(cmd_detail[1:])}"439 # If we're piping to less and the user hasn't decided on colors, we enable440 # them by default we find the -R flag in the command line arguments.441 if color is None and cmd_name == "less":442 less_flags = f"{os.environ.get('LESS', '')}{' '.join(cmd_params)}"443 if not less_flags:444 env["LESS"] = "-R"445 color = True446 elif "r" in less_flags or "R" in less_flags:447 color = True448421 c = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, env=env)422 stdin = t.cast(t.BinaryIO, c.stdin)423 encoding = get_best_encoding(stdin)449 c = subprocess.Popen(450 [str(cmd_path)] + cmd_params,451 shell=True,452 stdin=subprocess.PIPE,453 env=env,454 errors="replace",455 text=True,456 )457 assert c.stdin is not None458 try:459 for text in generator:460 if not color:461 text = strip_ansi(text)462429 stdin.write(text.encode(encoding, "replace"))463 c.stdin.write(text)464 except BrokenPipeError:465 # In case the pager exited unexpectedly, ignore the broken pipe error.466 pass467 except Exception as e:
5 unmodified lines
473 raise e474 finally:475 # We must close stdin and wait for the pager to exit before we continue476 try:443 stdin.close()477 c.stdin.close()478 # Close implies flush, so it might throw a BrokenPipeError if the pager479 # process exited already.480 except BrokenPipeError:481 pass
13 unmodified lines
495 pass496 else:497 break498499 return True500466def _tempfilepager(generator: cabc.Iterable[str], cmd: str, color: bool | None) -> None:467 """Page through text by invoking a program on a temporary file."""501502def _tempfilepager(503 generator: cabc.Iterable[str], cmd_parts: list[str], color: bool | None504) -> bool:505 """Page through text by invoking a program on a temporary file.506507 Returns `True` if the command was found, `False` otherwise and thus another508 pager should be attempted.509 """510 # Split the command into the invoked CLI and its parameters.511 if not cmd_parts:512 return False513 cmd = cmd_parts[0]514515 cmd_filepath = which(cmd)516 if not cmd_filepath:517 return False518 # Resolves symlinks and produces a normalized absolute path string.519 cmd_path = Path(cmd_filepath).resolve()520521 import subprocess522 import tempfile523524 fd, filename = tempfile.mkstemp()525 # TODO: This never terminates if the passed generator never terminates.
3 unmodified lines
529 encoding = get_best_encoding(sys.stdout)530 with open_stream(filename, "wb")[0] as f:531 f.write(text.encode(encoding))532 try:479 os.system(f'{cmd} "{filename}"')533 subprocess.call([str(cmd_path), filename])534 except OSError:535 # Command not found536 pass537 finally:538 os.close(fd)539 os.unlink(filename)540541 return True542543544def _nullpager(545 stream: t.TextIO, generator: cabc.Iterable[str], color: bool | None546) -> None:547 """Simply print unformatted text. This is the ultimate fallback."""
25 unmodified lines
573 return rv574 if WIN:575 return "notepad"576 for editor in "sensible-editor", "vim", "nano":518 if os.system(f"which {editor} >/dev/null 2>&1") == 0:577 if which(editor) is not None:578 return editor579 return "vi"580581 def edit_files(self, filenames: cabc.Iterable[str]) -> None:
33 unmodified lines
615 def edit(self, text: str | bytes | bytearray | None) -> str | bytes | None:616 import tempfile617618 if text is None:560 data = b""619 data: bytes | bytearray = b""620 elif isinstance(text, (bytes, bytearray)):621 data = text622 else:623 if text and not text.endswith("\n"):
60 unmodified lines
684 finally:685 null.close()686 elif WIN:687 if locate:629 url = _unquote_file(url.replace('"', ""))630 args = f'explorer /select,"{url}"'688 url = _unquote_file(url)689 args = ["explorer", f"/select,{url}"]690 else:632 url = url.replace('"', "")633 wait_str = "/WAIT" if wait else ""634 args = f'start {wait_str} "" "{url}"'635 return os.system(args)691 args = ["start"]692 if wait:693 args.append("/WAIT")694 args.append("")695 args.append(url)696 try:697 return subprocess.call(args)698 except OSError:699 # Command not found700 return 127701 elif CYGWIN:702 if locate:638 url = os.path.dirname(_unquote_file(url).replace('"', ""))639 args = f'cygstart "{url}"'703 url = _unquote_file(url)704 args = ["cygstart", os.path.dirname(url)]705 else:641 url = url.replace('"', "")642 wait_str = "-w" if wait else ""643 args = f'cygstart {wait_str} "{url}"'644 return os.system(args)706 args = ["cygstart"]707 if wait:708 args.append("-w")709 args.append(url)710 try:711 return subprocess.call(args)712 except OSError:713 # Command not found714 return 127715716 try:717 if locate:718 url = os.path.dirname(_unquote_file(url)) or "."
121 unmodified lines
modified:src/click/_winconsole.py+3 added-2 removed
106 unmodified lines
107 flags: int = PyBUF_WRITABLE if writable else PyBUF_SIMPLE108 PyObject_GetBuffer(py_object(obj), byref(buf), flags)109110 try:111 buffer_type: Array[c_char] = c_char * buf.len112 return buffer_type.from_address(buf.buf)111 buffer_type = c_char * buf.len112 out: Array[c_char] = buffer_type.from_address(buf.buf)113 return out114 finally:115 PyBuffer_Release(byref(buf))116117
179 unmodified lines
modified:src/click/core.py+117 added-60 removed
88 unmodified lines
89 raise RuntimeError(message)909192def batch(iterable: cabc.Iterable[V], batch_size: int) -> list[tuple[V, ...]]:93 return list(zip(*repeat(iter(iterable), batch_size)))93 return list(zip(*repeat(iter(iterable), batch_size), strict=False))949596@contextmanager97def augment_usage_errors(
17 unmodified lines
115def iter_params_for_processing(116 invocation_order: cabc.Sequence[Parameter],117 declaration_order: cabc.Sequence[Parameter],118) -> list[Parameter]:119 """Given a sequence of parameters in the order as should be considered120 for processing and an iterable of parameters that exist, this returns121 a list in the correct order as they should be processed.119 """Returns all declared parameters in the order they should be processed.120121 The declared parameters are re-shuffled depending on the order in which122 they were invoked, as well as the eagerness of each parameters.123124 The invocation order takes precedence over the declaration order. I.e. the125 order in which the user provided them to the CLI is respected.126127 This behavior and its effect on callback evaluation is detailed at:128 https://click.palletsprojects.com/en/stable/advanced/#callback-evaluation-order129 """130131 def sort_key(item: Parameter) -> tuple[bool, float]:132 try:
807 unmodified lines
940 self.epilog = epilog941 self.options_metavar = options_metavar942 self.short_help = short_help943 self.add_help_option = add_help_option944 self._help_option = None945 self.no_args_is_help = no_args_is_help946 self.hidden = hidden947 self.deprecated = deprecated948
72 unmodified lines
1021 all_names.difference_update(param.secondary_opts)1022 return list(all_names)10231024 def get_help_option(self, ctx: Context) -> Option | None:1017 """Returns the help option object."""1018 help_options = self.get_help_option_names(ctx)1025 """Returns the help option object.10261027 Skipped if :attr:`add_help_option` is ``False``.10281029 .. versionchanged:: 8.1.81030 The help option is now cached to avoid creating it multiple times.1031 """1032 help_option_names = self.get_help_option_names(ctx)10331020 if not help_options or not self.add_help_option:1034 if not help_option_names or not self.add_help_option:1035 return None10361023 def show_help(ctx: Context, param: Parameter, value: str) -> None:1024 if value and not ctx.resilient_parsing:1025 echo(ctx.get_help(), color=ctx.color)1026 ctx.exit()1037 # Cache the help option object in private _help_option attribute to1038 # avoid creating it multiple times. Not doing this will break the1039 # callback odering by iter_params_for_processing(), which relies on1040 # object comparison.1041 if self._help_option is None:1042 # Avoid circular import.1043 from .decorators import help_option10441028 return Option(1029 help_options,1030 is_flag=True,1031 is_eager=True,1032 expose_value=False,1033 callback=show_help,1034 help=_("Show this message and exit."),1035 )1045 # Apply help_option decorator and pop resulting option1046 help_option(*help_option_names)(self)1047 self._help_option = self.params.pop() # type: ignore[assignment]10481049 return self._help_option10501051 def make_parser(self, ctx: Context) -> _OptionParser:1052 """Creates the underlying option parser for this command."""1053 parser = _OptionParser(ctx)1054 for param in self.get_params(ctx):
162 unmodified lines
1217 extra_message = (1218 f" {self.deprecated}" if isinstance(self.deprecated, str) else ""1219 )1220 message = _(1207 "DeprecationWarning: The command {name!r} is deprecated."1208 "{extra_message}"1221 "DeprecationWarning: The command {name!r} is deprecated.{extra_message}"1222 ).format(name=self.name, extra_message=extra_message)1223 echo(style(message, fg="red"), err=True)12241225 if self.callback is not None:
389 unmodified lines
16151616 func: t.Callable[..., t.Any] | None = None16171618 if args and callable(args[0]):1606 assert (1607 len(args) == 1 and not kwargs1608 ), "Use 'command(**kwargs)(callable)' to provide arguments."1619 assert len(args) == 1 and not kwargs, (1620 "Use 'command(**kwargs)(callable)' to provide arguments."1621 )1622 (func,) = args1623 args = ()16241625 if self.command_class and kwargs.get("cls") is None:
38 unmodified lines
16641665 func: t.Callable[..., t.Any] | None = None16661667 if args and callable(args[0]):1655 assert (1656 len(args) == 1 and not kwargs1657 ), "Use 'group(**kwargs)(callable)' to provide arguments."1668 assert len(args) == 1 and not kwargs, (1669 "Use 'group(**kwargs)(callable)' to provide arguments."1670 )1671 (func,) = args1672 args = ()16731674 if self.group_class is not None and kwargs.get("cls") is None:
529 unmodified lines
2204 same as the name for options, but the metavar for arguments.2205 """2206 return self.name # type: ignore22072195 def make_metavar(self) -> str:2208 def make_metavar(self, ctx: Context) -> str:2209 if self.metavar is not None:2210 return self.metavar22112199 metavar = self.type.get_metavar(self)2212 metavar = self.type.get_metavar(param=self, ctx=ctx)22132214 if metavar is None:2215 metavar = self.type.name.upper()2216
336 unmodified lines
2553 ) -> None:2554 if help:2555 help = inspect.cleandoc(help)25562544 default_is_missing = "default" not in attrs2557 super().__init__(2558 param_decls, type=type, multiple=multiple, deprecated=deprecated, **attrs2559 )2560
25 unmodified lines
2586 # used as a flag to indicate using prompt or flag_value.2587 self._flag_needs_value = self.prompt is not None and not self.prompt_required25882589 if is_flag is None:2590 # Implicitly a flag because flag_value was set.2591 if flag_value is not None:2579 # Implicitly a flag because flag_value was set.2592 is_flag = True2593 # Not a flag, but when used as a flag it shows a prompt.2594 elif self._flag_needs_value:2582 # Not a flag, but when used as a flag it shows a prompt.2595 is_flag = False2584 else:2585 # Implicitly a flag because flag options were given.2586 is_flag = bool(self.secondary_opts)2596 # Implicitly a flag because flag options were given.2597 elif self.secondary_opts:2598 is_flag = True2599 elif is_flag is False and not self._flag_needs_value:2600 # Not a flag, and prompt is not enabled, can be used as a2601 # flag if flag_value is set.2602 self._flag_needs_value = flag_value is not None26032604 self.default: t.Any | t.Callable[[], t.Any]26052606 if is_flag:2607 # Set missing default for flags if not explicitly required or prompted.2594 if is_flag and default_is_missing and not self.required:2595 if multiple:2596 self.default = ()2597 else:2598 self.default = False2608 if self.default is None and not self.required and not self.prompt:2609 if multiple:2610 self.default = ()2611 else:2612 self.default = False26132614 if flag_value is None:2615 # A boolean flag presence in the command line is enough to set2616 # the value: to the default if it is not blank, or to True2617 # otherwise.2618 flag_value = self.default if self.default else True26192620 self.type: types.ParamType2621 if is_flag and type is None:2602 if flag_value is None:2603 flag_value = not self.default2622 # Re-guess the type from the flag value instead of the2623 # default.2624 self.type = types.convert_type(None, flag_value)26252608 self.is_flag: bool = is_flag2609 self.is_bool_flag: bool = is_flag and isinstance(self.type, types.BoolParamType)2626 self.is_flag: bool = bool(is_flag)2627 self.is_bool_flag: bool = bool(2628 is_flag and isinstance(self.type, types.BoolParamType)2629 )2630 self.flag_value: t.Any = flag_value26312632 # Counting2633 self.count = count2634 if count:2635 if type is None:2636 self.type = types.IntRange(min=0)2617 if default_is_missing:2637 if self.default is None:2638 self.default = 026392640 self.allow_from_autoenv = allow_from_autoenv2641 self.help = help
39 unmodified lines
2681 return info_dict26822683 def get_error_hint(self, ctx: Context) -> str:2684 result = super().get_error_hint(ctx)2665 if self.show_envvar:2685 if self.show_envvar and self.envvar is not None:2686 result += f" (env var: '{self.envvar}')"2687 return result26882689 def _parse_decls(
104 unmodified lines
2794 if any_slashes:2795 any_prefix_is_slash = True27962797 if not self.is_flag and not self.count:2778 rv += f" {self.make_metavar()}"2798 rv += f" {self.make_metavar(ctx=ctx)}"27992800 return rv28012802 rv = [_write_opts(self.opts)]
68 unmodified lines
2871 if show_default_is_str:2872 default_string = f"({self.show_default})"2873 elif isinstance(default_value, (list, tuple)):2874 default_string = ", ".join(str(d) for d in default_value)2875 elif isinstance(default_value, enum.Enum):2876 default_string = default_value.name2877 elif inspect.isfunction(default_value):2878 default_string = _("(dynamic)")2879 elif self.is_bool_flag and self.secondary_opts:2880 # For boolean flags that have distinct True/False opts,
44 unmodified lines
2925 # if we're the default one in which case we return the flag2926 # value as default.2927 if self.is_flag and not self.is_bool_flag:2928 for param in ctx.command.params:2907 if param.name == self.name and param.default:2908 return t.cast(Option, param).flag_value2929 if param.name == self.name and param.default is not None:2930 return t.cast(Option, param).default29312932 return None29332934 return super().get_default(ctx, call=call)
31 unmodified lines
2966 **prompt_kwargs,2967 )29682969 def resolve_envvar_value(self, ctx: Context) -> str | None:2970 """Find which environment variable to read for this option and return2971 its value.29722973 Returns the value of the environment variable if it exists, or ``None``2974 if it does not.29752976 .. caution::29772978 The raw value extracted from the environment is not normalized and2979 is returned as-is. Any normalization or reconciation with the2980 option's type should happen later.2981 """2982 rv = super().resolve_envvar_value(ctx)29832984 if rv is not None:2951 if self.is_flag and self.flag_value:2952 return str(self.flag_value)2985 return rv29862987 if (2988 self.allow_from_autoenv
8 unmodified lines
29972998 return None29993000 def value_from_envvar(self, ctx: Context) -> t.Any | None:3001 """Normalize the value from the environment variable, if it exists."""2969 rv: t.Any | None = self.resolve_envvar_value(ctx)3002 rv: str | None = self.resolve_envvar_value(ctx)30033004 if rv is None:3005 return None30062974 value_depth = (self.nargs != 1) + bool(self.multiple)3007 # Non-boolean flags are more liberal in what they accept. But a flag being a3008 # flag, its envvar value still needs to analyzed to determine if the flag is3009 # activated or not.3010 if self.is_flag and not self.is_bool_flag:3011 # If the flag_value is set and match the envvar value, return it3012 # directly.3013 if self.flag_value is not None and rv == self.flag_value:3014 return self.flag_value3015 # Analyze the envvar value as a boolean to know if the flag is3016 # activated or not.3017 return types.BoolParamType.str_to_bool(rv)30183019 # Split the envvar value if it is allowed to be repeated.3020 value_depth = (self.nargs != 1) + bool(self.multiple)3021 if value_depth > 0:2977 rv = self.type.split_envvar_value(rv)29783022 multi_rv = self.type.split_envvar_value(rv)3023 if self.multiple and self.nargs != 1:2980 rv = batch(rv, self.nargs)3024 multi_rv = batch(multi_rv, self.nargs) # type: ignore[assignment]30253026 return multi_rv30273028 return rv30293030 def consume_value(3031 self, ctx: Context, opts: cabc.Mapping[str, Parameter]
10 unmodified lines
3042 else:3043 value = self.flag_value3044 source = ParameterSource.COMMANDLINE30453046 # A flag which is activated and has a flag_value set, should returns3047 # the latter, unless the value comes from the explicitly sets default.3048 elif (3049 self.is_flag3050 and value is True3051 and not self.is_bool_flag3052 and self.flag_value is not None3053 and source is not ParameterSource.DEFAULT3054 ):3055 value = self.flag_value30563057 elif (3058 self.multiple3059 and value is not None3060 and any(v is _flag_needs_value for v in value)3061 ):
50 unmodified lines
3112 if self.metavar is not None:3113 return self.metavar3114 return self.name.upper() # type: ignore31153059 def make_metavar(self) -> str:3116 def make_metavar(self, ctx: Context) -> str:3117 if self.metavar is not None:3118 return self.metavar3062 var = self.type.get_metavar(self)3119 var = self.type.get_metavar(param=self, ctx=ctx)3120 if not var:3121 var = self.name.upper() # type: ignore3122 if self.deprecated:3123 var += "!"
20 unmodified lines
3144 )3145 return name, [arg], []31463147 def get_usage_pieces(self, ctx: Context) -> list[str]:3091 return [self.make_metavar()]3148 return [self.make_metavar(ctx)]31493150 def get_error_hint(self, ctx: Context) -> str:3094 return f"'{self.make_metavar()}'"3151 return f"'{self.make_metavar(ctx)}'"31523153 def add_to_parser(self, parser: _OptionParser, ctx: Context) -> None:3154 parser.add_argument(dest=self.name, nargs=self.nargs, obj=self)3155
23 unmodified lines
modified:src/click/decorators.py+12 added-26 removed
1from __future__ import annotations23import inspect4import typing as t5from collections import abc5from functools import update_wrapper6from gettext import gettext as _78from .core import Argument
514 unmodified lines
523 kwargs["callback"] = callback524 return option(*param_decls, **kwargs)525526528class HelpOption(Option):527def help_option(*param_decls: str, **kwargs: t.Any) -> t.Callable[[FC], FC]:528 """Pre-configured ``--help`` option which immediately prints the help page529 and exits the program.530531 :param param_decls: One or more option names. Defaults to the single532 value ``"--help"``.533 :param kwargs: Extra arguments are passed to :func:`option`.534 """535533 def __init__(534 self,535 param_decls: abc.Sequence[str] | None = None,536 **kwargs: t.Any,537 ) -> None:538 if not param_decls:539 param_decls = ("--help",)540541 kwargs.setdefault("is_flag", True)542 kwargs.setdefault("expose_value", False)543 kwargs.setdefault("is_eager", True)544 kwargs.setdefault("help", _("Show this message and exit."))545 kwargs.setdefault("callback", self.show_help)546547 super().__init__(param_decls, **kwargs)548549 @staticmethod536 def show_help(ctx: Context, param: Parameter, value: bool) -> None:537 """Callback that print the help page on ``<stdout>`` and exits."""538 if value and not ctx.resilient_parsing:539 echo(ctx.get_help(), color=ctx.color)540 ctx.exit()541542 if not param_decls:543 param_decls = ("--help",)544557def help_option(*param_decls: str, **kwargs: t.Any) -> t.Callable[[FC], FC]:558 """Decorator for the pre-configured ``--help`` option defined above.545 kwargs.setdefault("is_flag", True)546 kwargs.setdefault("expose_value", False)547 kwargs.setdefault("is_eager", True)548 kwargs.setdefault("help", _("Show this message and exit."))549 kwargs.setdefault("callback", show_help)550560 :param param_decls: One or more option names. Defaults to the single561 value ``"--help"``.562 :param kwargs: Extra arguments are passed to :func:`option`.563 """564 kwargs.setdefault("cls", HelpOption)551 return option(*param_decls, **kwargs)
modified:src/click/exceptions.py+6 added-4 removed
113 unmodified lines
114 self,115 message: str,116 ctx: Context | None = None,117 param: Parameter | None = None,118 param_hint: str | None = None,118 param_hint: cabc.Sequence[str] | str | None = None,119 ) -> None:120 super().__init__(message, ctx)121 self.param = param122 self.param_hint = param_hint
27 unmodified lines
150 self,151 message: str | None = None,152 ctx: Context | None = None,153 param: Parameter | None = None,154 param_hint: str | None = None,154 param_hint: cabc.Sequence[str] | str | None = None,155 param_type: str | None = None,156 ) -> None:157 super().__init__(message or "", ctx, param, param_hint)158 self.param_type = param_type159160 def format_message(self) -> str:161 if self.param_hint is not None:162 param_hint: str | None = self.param_hint162 param_hint: cabc.Sequence[str] | str | None = self.param_hint163 elif self.param is not None:164 param_hint = self.param.get_error_hint(self.ctx) # type: ignore165 else:166 param_hint = None
6 unmodified lines
173 param_type = self.param.param_type_name174175 msg = self.message176 if self.param is not None:177 msg_extra = self.param.type.get_missing_message(self.param)177 msg_extra = self.param.type.get_missing_message(178 param=self.param, ctx=self.ctx179 )180 if msg_extra:181 if msg:182 msg += f". {msg_extra}"183 else:
125 unmodified lines
modified:src/click/formatting.py+1 added-1 removed
127 unmodified lines
128 width = FORCED_WIDTH129 if width is None:130 width = max(min(shutil.get_terminal_size().columns, max_width) - 2, 50)131 self.width = width132 self.current_indent = 0132 self.current_indent: int = 0133 self.buffer: list[str] = []134135 def write(self, string: str) -> None:136 """Writes a unicode string into the internal buffer."""
165 unmodified lines
modified:src/click/shell_completion.py+34 added-7 removed
122 unmodified lines
123124%(complete_func)s_setup;125"""126127# See ZshComplete.format_completion below, and issue #2703, before128# changing this script.129#130# (TL;DR: _describe is picky about the format, but this Zsh script snippet131# is already widely deployed. So freeze this script, and use clever-ish132# handling of colons in ZshComplet.format_completion.)133_SOURCE_ZSH = """\134#compdef %(prog_name)s135136%(complete_func)s() {
171 unmodified lines
308 source_template = _SOURCE_BASH309310 @staticmethod311 def _check_version() -> None:312 import shutil313 import subprocess314308 output = subprocess.run(309 ["bash", "-c", 'echo "${BASH_VERSION}"'], stdout=subprocess.PIPE310 )311 match = re.search(r"^(\d+)\.(\d+)\.\d+", output.stdout.decode())315 bash_exe = shutil.which("bash")316317 if bash_exe is None:318 match = None319 else:320 output = subprocess.run(321 [bash_exe, "--norc", "-c", 'echo "${BASH_VERSION}"'],322 stdout=subprocess.PIPE,323 )324 match = re.search(r"^(\d+)\.(\d+)\.\d+", output.stdout.decode())325326 if match is not None:327 major, minor = match.groups()328329 if major < "4" or major == "4" and minor < "4":
48 unmodified lines
378379 return args, incomplete380381 def format_completion(self, item: CompletionItem) -> str:369 return f"{item.type}\n{item.value}\n{item.help if item.help else '_'}"382 help_ = item.help or "_"383 # The zsh completion script uses `_describe` on items with help384 # texts (which splits the item help from the item value at the385 # first unescaped colon) and `compadd` on items without help386 # text (which uses the item value as-is and does not support387 # colon escaping). So escape colons in the item value if and388 # only if the item help is not the sentinel "_" value, as used389 # by the completion script.390 #391 # (The zsh completion script is potentially widely deployed, and392 # thus harder to fix than this method.)393 #394 # See issue #1812 and issue #2703 for further context.395 value = item.value.replace(":", r"\:") if help_ != "_" else item.value396 return f"{item.type}\n{value}\n{help_}"397398399class FishComplete(ShellComplete):400 """Shell completion for Fish."""
186 unmodified lines
587588 with cmd.make_context(589 name, args, parent=ctx, resilient_parsing=True590 ) as sub_ctx:564 args = ctx._protected_args + ctx.args591 ctx = sub_ctx592 args = ctx._protected_args + ctx.args593 else:594 sub_ctx = ctx595596 while args:
9 unmodified lines
606 allow_extra_args=True,607 allow_interspersed_args=False,608 resilient_parsing=True,609 ) as sub_sub_ctx:583 args = sub_ctx.args610 sub_ctx = sub_sub_ctx611 args = sub_ctx.args612613 ctx = sub_ctx614 args = [*sub_ctx._protected_args, *sub_ctx.args]615 else:
50 unmodified lines
modified:src/click/testing.py+24 added-2 removed
97 unmodified lines
98 self.output: io.BytesIO = io.BytesIO()99 self.stdout: io.BytesIO = BytesIOCopy(copy_to=self.output)100 self.stderr: io.BytesIO = BytesIOCopy(copy_to=self.output)101102 def __del__(self) -> None:103 """104 Guarantee that embedded file-like objects are closed in a105 predictable order, protecting against races between106 self.output being closed and other streams being flushed on close107108 .. versionadded:: 8.2.2109 """110 self.stderr.close()111 self.stdout.close()112 self.output.close()113114115class _NamedTextIOWrapper(io.TextIOWrapper):116 def __init__(117 self, buffer: t.BinaryIO, name: str, mode: str, **kwargs: t.Any118 ) -> None:
8 unmodified lines
127 @property128 def mode(self) -> str:129 return self._mode130131 def __next__(self) -> str: # type: ignore132 try:133 line = super().__next__()134 except StopIteration as e:135 raise EOFError() from e136 return line137138139def make_input_stream(140 input: str | bytes | t.IO[t.Any] | None, charset: str141) -> t.BinaryIO:142 # Is already an input stream.
216 unmodified lines
359360 @_pause_echo(echo_input) # type: ignore361 def visible_input(prompt: str | None = None) -> str:362 sys.stdout.write(prompt or "")344 val = text_input.readline().rstrip("\r\n")363 val = next(text_input).rstrip("\r\n")364 sys.stdout.write(f"{val}\n")365 sys.stdout.flush()366 return val367368 @_pause_echo(echo_input) # type: ignore369 def hidden_input(prompt: str | None = None) -> str:370 sys.stdout.write(f"{prompt or ''}\n")371 sys.stdout.flush()353 return text_input.readline().rstrip("\r\n")372 return next(text_input).rstrip("\r\n")373374 @_pause_echo(echo_input) # type: ignore375 def _getchar(echo: bool) -> str:376 char = sys.stdin.read(1)
16 unmodified lines
393 old_visible_prompt_func = termui.visible_prompt_func394 old_hidden_prompt_func = termui.hidden_prompt_func395 old__getchar_func = termui._getchar396 old_should_strip_ansi = utils.should_strip_ansi # type: ignore397 old__compat_should_strip_ansi = _compat.should_strip_ansi398 termui.visible_prompt_func = visible_input399 termui.hidden_prompt_func = hidden_input400 termui._getchar = _getchar401 utils.should_strip_ansi = should_strip_ansi # type: ignore
26 unmodified lines
428 termui.visible_prompt_func = old_visible_prompt_func429 termui.hidden_prompt_func = old_hidden_prompt_func430 termui._getchar = old__getchar_func431 utils.should_strip_ansi = old_should_strip_ansi # type: ignore432 _compat.should_strip_ansi = old__compat_should_strip_ansi433 formatting.FORCED_WIDTH = old_forced_width434435 def invoke(436 self,
91 unmodified lines
528 exit_code = 1529 exc_info = sys.exc_info()530 finally:531 sys.stdout.flush()532 sys.stderr.flush()533 stdout = outstreams[0].getvalue()534 stderr = outstreams[1].getvalue()535 output = outstreams[2].getvalue()536
41 unmodified lines
modified:src/click/types.py+164 added-64 removed
1from __future__ import annotations23import collections.abc as cabc4import enum5import os6import stat7import sys8import typing as t
14 unmodified lines
23 from .core import Context24 from .core import Parameter25 from .shell_completion import CompletionItem2627ParamTypeValue = t.TypeVar("ParamTypeValue")282930class ParamType:31 """Represents the type of a parameter. Validates and converts values32 from the command line or Python into the correct type.33
54 unmodified lines
88 ) -> t.Any:89 if value is not None:90 return self.convert(value, param, ctx)9189 def get_metavar(self, param: Parameter) -> str | None:92 def get_metavar(self, param: Parameter, ctx: Context) -> str | None:93 """Returns the metavar default for this param if it provides one."""9492 def get_missing_message(self, param: Parameter) -> str | None:95 def get_missing_message(self, param: Parameter, ctx: Context | None) -> str | None:96 """Optionally might return extra information about a missing97 parameter.9899 .. versionadded:: 2.0
129 unmodified lines
229 def __repr__(self) -> str:230 return "STRING"231232230class Choice(ParamType):233class Choice(ParamType, t.Generic[ParamTypeValue]):234 """The choice type allows a value to be checked against a fixed set232 of supported values. All of these values have to be strings.235 of supported values.236234 You should only pass a list or tuple of choices. Other iterables235 (like generators) may lead to surprising results.237 You may pass any iterable value which will be converted to a tuple238 and thus will only be iterated once.239237 The resulting value will always be one of the originally passed choices238 regardless of ``case_sensitive`` or any ``ctx.token_normalize_func``239 being specified.240 The resulting value will always be one of the originally passed choices.241 See :meth:`normalize_choice` for more info on the mapping of strings242 to choices. See :ref:`choice-opts` for an example.243241 See :ref:`choice-opts` for an example.242244 :param case_sensitive: Set to false to make choices case245 insensitive. Defaults to true.246247 .. versionchanged:: 8.2.0248 Non-``str`` ``choices`` are now supported. It can additionally be any249 iterable. Before you were not recommended to pass anything but a list or250 tuple.251252 .. versionadded:: 8.2.0253 Choice normalization can be overridden via :meth:`normalize_choice`.254 """255256 name = "choice"257258 def __init__(250 self, choices: cabc.Sequence[str], case_sensitive: bool = True259 self, choices: cabc.Iterable[ParamTypeValue], case_sensitive: bool = True260 ) -> None:252 self.choices = choices261 self.choices: cabc.Sequence[ParamTypeValue] = tuple(choices)262 self.case_sensitive = case_sensitive263264 def to_info_dict(self) -> dict[str, t.Any]:265 info_dict = super().to_info_dict()266 info_dict["choices"] = self.choices267 info_dict["case_sensitive"] = self.case_sensitive268 return info_dict269270 def _normalized_mapping(271 self, ctx: Context | None = None272 ) -> cabc.Mapping[ParamTypeValue, str]:273 """274 Returns mapping where keys are the original choices and the values are275 the normalized values that are accepted via the command line.276277 This is a simple wrapper around :meth:`normalize_choice`, use that278 instead which is supported.279 """280 return {281 choice: self.normalize_choice(282 choice=choice,283 ctx=ctx,284 )285 for choice in self.choices286 }287288 def normalize_choice(self, choice: ParamTypeValue, ctx: Context | None) -> str:289 """290 Normalize a choice value, used to map a passed string to a choice.291 Each choice must have a unique normalized value.292293 By default uses :meth:`Context.token_normalize_func` and if not case294 sensitive, convert it to a casefolded value.295296 .. versionadded:: 8.2.0297 """298 normed_value = choice.name if isinstance(choice, enum.Enum) else str(choice)299300 if ctx is not None and ctx.token_normalize_func is not None:301 normed_value = ctx.token_normalize_func(normed_value)302303 if not self.case_sensitive:304 normed_value = normed_value.casefold()305306 return normed_value307261 def get_metavar(self, param: Parameter) -> str:308 def get_metavar(self, param: Parameter, ctx: Context) -> str | None:309 if param.param_type_name == "option" and not param.show_choices: # type: ignore310 choice_metavars = [311 convert_type(type(choice)).name.upper() for choice in self.choices312 ]313 choices_str = "|".join([*dict.fromkeys(choice_metavars)])314 else:268 choices_str = "|".join([str(i) for i in self.choices])315 choices_str = "|".join(316 [str(i) for i in self._normalized_mapping(ctx=ctx).values()]317 )318319 # Use curly braces to indicate a required argument.320 if param.required and param.param_type_name == "argument":321 return f"{{{choices_str}}}"322323 # Use square braces to indicate an option or optional argument.324 return f"[{choices_str}]"325277 def get_missing_message(self, param: Parameter) -> str:278 return _("Choose from:\n\t{choices}").format(choices=",\n\t".join(self.choices))326 def get_missing_message(self, param: Parameter, ctx: Context | None) -> str:327 """328 Message shown when no choice is passed.329330 .. versionchanged:: 8.2.0 Added ``ctx`` argument.331 """332 return _("Choose from:\n\t{choices}").format(333 choices=",\n\t".join(self._normalized_mapping(ctx=ctx).values())334 )335336 def convert(337 self, value: t.Any, param: Parameter | None, ctx: Context | None282 ) -> t.Any:283 # Match through normalization and case sensitivity284 # first do token_normalize_func, then lowercase285 # preserve original `value` to produce an accurate message in286 # `self.fail`287 normed_value = value288 normed_choices = {choice: choice for choice in self.choices}338 ) -> ParamTypeValue:339 """340 For a given value from the parser, normalize it and find its341 matching normalized value in the list of choices. Then return the342 matched "original" choice.343 """344 normed_value = self.normalize_choice(choice=value, ctx=ctx)345 normalized_mapping = self._normalized_mapping(ctx=ctx)346290 if ctx is not None and ctx.token_normalize_func is not None:291 normed_value = ctx.token_normalize_func(value)292 normed_choices = {293 ctx.token_normalize_func(normed_choice): original294 for normed_choice, original in normed_choices.items()295 }347 try:348 return next(349 original350 for original, normalized in normalized_mapping.items()351 if normalized == normed_value352 )353 except StopIteration:354 self.fail(355 self.get_invalid_choice_message(value=value, ctx=ctx),356 param=param,357 ctx=ctx,358 )359297 if not self.case_sensitive:298 normed_value = normed_value.casefold()299 normed_choices = {300 normed_choice.casefold(): original301 for normed_choice, original in normed_choices.items()302 }303304 if normed_value in normed_choices:305 return normed_choices[normed_value]306307 self.fail(self.get_invalid_choice_message(value), param, ctx)308309 def get_invalid_choice_message(self, value: t.Any) -> str:360 def get_invalid_choice_message(self, value: t.Any, ctx: Context | None) -> str:361 """Get the error message when the given choice is invalid.362363 :param value: The invalid value.364365 .. versionadded:: 8.2366 """316 choices_str = ", ".join(map(repr, self.choices))367 choices_str = ", ".join(map(repr, self._normalized_mapping(ctx=ctx).values()))368 return ngettext(369 "{value!r} is not {choice}.",370 "{value!r} is not one of {choices}.",371 len(self.choices),
60 unmodified lines
432 info_dict = super().to_info_dict()433 info_dict["formats"] = self.formats434 return info_dict435385 def get_metavar(self, param: Parameter) -> str:436 def get_metavar(self, param: Parameter, ctx: Context) -> str | None:437 return f"[{'|'.join(self.formats)}]"438439 def _try_to_convert_date(self, value: t.Any, format: str) -> datetime | None:440 try:
210 unmodified lines
651 def _clamp(self, bound: float, dir: t.Literal[1, -1], open: bool) -> float:652 if not open:653 return bound654604 # Could use Python 3.9's math.nextafter here, but clamping an655 # Could use math.nextafter here, but clamping an656 # open float range doesn't seem to be particularly useful. It's657 # left up to the user to write a callback to do it if needed.658 raise RuntimeError("Clamping is not supported for open bounds.")659660661class BoolParamType(ParamType):662 name = "boolean"663613 def convert(614 self, value: t.Any, param: Parameter | None, ctx: Context | None615 ) -> t.Any:616 if value in {False, True}:617 return bool(value)664 bool_states: dict[str, bool] = {665 "1": True,666 "0": False,667 "yes": True,668 "no": False,669 "true": True,670 "false": False,671 "on": True,672 "off": False,673 "t": True,674 "f": False,675 "y": True,676 "n": False,677 # Absence of value is considered False.678 "": False,679 }680 """A mapping of string values to boolean states.681619 norm = value.strip().lower()682 Mapping is inspired by :py:attr:`configparser.ConfigParser.BOOLEAN_STATES`683 and extends it.684621 if norm in {"1", "true", "t", "yes", "y", "on"}:622 return True685 .. caution::686 String values are lower-cased, as the ``str_to_bool`` comparison function687 below is case-insensitive.688624 if norm in {"0", "false", "f", "no", "n", "off"}:625 return False689 .. warning::690 The mapping is not exhaustive, and does not cover all possible boolean strings691 representations. It will remains as it is to avoid endless bikeshedding.692627 self.fail(628 _("{value!r} is not a valid boolean.").format(value=value), param, ctx629 )693 Future work my be considered to make this mapping user-configurable from public694 API.695 """696697 @staticmethod698 def str_to_bool(value: str | bool) -> bool | None:699 """Convert a string to a boolean value.700701 If the value is already a boolean, it is returned as-is. If the value is a702 string, it is stripped of whitespaces and lower-cased, then checked against703 the known boolean states pre-defined in the `BoolParamType.bool_states` mapping704 above.705706 Returns `None` if the value does not match any known boolean state.707 """708 if isinstance(value, bool):709 return value710 return BoolParamType.bool_states.get(value.strip().lower())711712 def convert(713 self, value: t.Any, param: Parameter | None, ctx: Context | None714 ) -> bool:715 normalized = self.str_to_bool(value)716 if normalized is None:717 self.fail(718 _(719 "{value!r} is not a valid boolean. Recognized values: {states}"720 ).format(value=value, states=", ".join(sorted(self.bool_states))),721 param,722 ctx,723 )724 return normalized725726 def __repr__(self) -> str:727 return "BOOL"728729
39 unmodified lines
769 file lazily for reading, it is still opened temporarily for validation, but770 will not be held open until first IO. lazy is mainly useful when opening771 for writing to avoid creating the file until it is needed.772678 Starting with Click 2.0, files can also be opened atomically in which679 case all writes go into a separate file in the same folder and upon680 completion the file will be moved over to the original location. This681 is useful if a file regularly read by other users is modified.773 Files can also be opened atomically in which case all writes go into a774 separate file in the same folder and upon completion the file will775 be moved over to the original location. This is useful if a file776 regularly read by other users is modified.777778 See :ref:`file-args` for more information.779780 .. versionchanged:: 2.0781 Added the ``atomic`` parameter.782 """783784 name = "filename"785 envvar_list_splitter: t.ClassVar[str] = os.path.pathsep
317 unmodified lines
1103 param=param,1104 ctx=ctx,1105 )11061009 return tuple(ty(x, param, ctx) for ty, x in zip(self.types, value))1107 return tuple(1108 ty(x, param, ctx) for ty, x in zip(self.types, value, strict=False)1109 )111011111112def convert_type(ty: t.Any | None, default: t.Any | None = None) -> ParamType:1113 """Find the most appropriate :class:`ParamType` for the given Python
96 unmodified lines
modified:src/click/utils.py+1 added-1 removed
275 unmodified lines
276 return277278 # Convert non bytes/text into the native string type.279 if message is not None and not isinstance(message, (str, bytes, bytearray)):280 out: str | bytes | None = str(message)280 out: str | bytes | bytearray | None = str(message)281 else:282 out = message283284 if nl:
343 unmodified lines
modified:tests/typing/typing_aliased_group.py+1 added-1 removed
1"""Example from https://click.palletsprojects.com/en/8.1.x/advanced/#command-aliases"""1"""Example from https://click.palletsprojects.com/en/stable/advanced/#command-aliases"""23from __future__ import annotations45from typing_extensions import assert_type
41 unmodified lines
modified:tests/typing/typing_confirmation_option.py+1 added-1 removed
1"""From https://click.palletsprojects.com/en/8.1.x/options/#yes-parameters"""1"""From https://click.palletsprojects.com/en/stable/options/#yes-parameters"""23from typing_extensions import assert_type45import click
9 unmodified lines
modified:tests/typing/typing_options.py+1 added-1 removed
1"""From https://click.palletsprojects.com/en/8.1.x/quickstart/#adding-parameters"""1"""From https://click.palletsprojects.com/en/stable/quickstart/#adding-parameters"""23from typing_extensions import assert_type45import click
11 unmodified lines
modified:tests/typing/typing_version_option.py+1 added-1 removed
1"""2From https://click.palletsprojects.com/en/8.1.x/options/#callbacks-and-eager-options.2From https://click.palletsprojects.com/en/stable/options/#callbacks-and-eager-options.3"""45from typing_extensions import assert_type6
10 unmodified lines
modified:tests/test_arguments.py+12 added-16 removed
61 unmodified lines
62 assert result.exception is None63 assert result.output.splitlines() == ["name=peter id=1"]646566def test_nargs_mismatch_with_tuple_type():67 with pytest.raises(ValueError, match="nargs.*must be 2.*but it was 3"):6869 @click.command()70 @click.argument("test", type=(str, int), nargs=3)71 def cli(_):72 pass737475def test_nargs_err(runner):76 @click.command()77 @click.argument("x")78 def copy(x):
11 unmodified lines
90def test_bytes_args(runner, monkeypatch):91 @click.command()92 @click.argument("arg")93 def from_bytes(arg):85 assert isinstance(86 arg, str87 ), "UTF-8 encoded argument should be implicitly converted to Unicode"94 assert isinstance(arg, str), (95 "UTF-8 encoded argument should be implicitly converted to Unicode"96 )9798 # Simulate empty locale environment variables99 monkeypatch.setattr(sys, "getfilesystemencoding", lambda: "utf-8")100 monkeypatch.setattr(sys, "getdefaultencoding", lambda: "utf-8")
105 unmodified lines
206 else:207 assert result.return_value == expect208209201def test_envvar_flag_value(runner):202 @click.command()203 # is_flag is implicitly true204 @click.option("--upper", flag_value="upper", envvar="UPPER")205 def cmd(upper):206 click.echo(upper)207 return upper208209 # For whatever value of the `env` variable, if it exists, the flag should be `upper`210 result = runner.invoke(cmd, env={"UPPER": "whatever"})211 assert result.output.strip() == "upper"212213210def test_nargs_envvar_only_if_values_empty(runner):211 @click.command()212 @click.argument("arg", envvar="X", nargs=-1)213 def cli(arg):
257 unmodified lines
modified:tests/test_basic.py+88 added-5 removed
1from __future__ import annotations23import enum4import os5from itertools import chain67import pytest
213 unmodified lines
221 result = runner.invoke(cli, args, standalone_mode=False)222 assert result.return_value is expect223224222@pytest.mark.parametrize("default", [True, False])223@pytest.mark.parametrize(("args", "expect"), [(["--f"], True), ([], False)])225@pytest.mark.parametrize(226 ("default", "args", "expect"),227 (228 (True, ["--f"], True),229 (True, [], True),230 (False, ["--f"], True),231 (False, [], False),232 ),233)234def test_boolean_flag(runner, default, args, expect):235 @click.command()236 @click.option("--f", is_flag=True, default=default)237 def cli(f):238 return f239230 if default:231 expect = not expect232240 result = runner.invoke(cli, args, standalone_mode=False)241 assert result.return_value is expect242243
165 unmodified lines
409 result = runner.invoke(cli, ["--help"])410 assert "{foo|bar|baz}" in result.output411412413def test_choice_argument_enum(runner):414 class MyEnum(str, enum.Enum):415 FOO = "foo-value"416 BAR = "bar-value"417 BAZ = "baz-value"418419 @click.command()420 @click.argument("method", type=click.Choice(MyEnum, case_sensitive=False))421 def cli(method: MyEnum):422 assert isinstance(method, MyEnum)423 click.echo(method)424425 result = runner.invoke(cli, ["foo"])426 assert result.output == "foo-value\n"427 assert not result.exception428429 result = runner.invoke(cli, ["meh"])430 assert result.exit_code == 2431 assert (432 "Invalid value for '{foo|bar|baz}': 'meh' is not one of 'foo',"433 " 'bar', 'baz'." in result.output434 )435436 result = runner.invoke(cli, ["--help"])437 assert "{foo|bar|baz}" in result.output438439440def test_choice_argument_custom_type(runner):441 class MyClass:442 def __init__(self, value: str) -> None:443 self.value = value444445 def __str__(self) -> str:446 return self.value447448 @click.command()449 @click.argument(450 "method", type=click.Choice([MyClass("foo"), MyClass("bar"), MyClass("baz")])451 )452 def cli(method: MyClass):453 assert isinstance(method, MyClass)454 click.echo(method)455456 result = runner.invoke(cli, ["foo"])457 assert not result.exception458 assert result.output == "foo\n"459460 result = runner.invoke(cli, ["meh"])461 assert result.exit_code == 2462 assert (463 "Invalid value for '{foo|bar|baz}': 'meh' is not one of 'foo',"464 " 'bar', 'baz'." in result.output465 )466467 result = runner.invoke(cli, ["--help"])468 assert "{foo|bar|baz}" in result.output469470471def test_choice_argument_none(runner):472 @click.command()473 @click.argument(474 "method", type=click.Choice(["not-none", None], case_sensitive=False)475 )476 def cli(method: str | None):477 assert isinstance(method, str) or method is None478 click.echo(method)479480 result = runner.invoke(cli, ["not-none"])481 assert not result.exception482 assert result.output == "not-none\n"483484 # None is not yet supported.485 result = runner.invoke(cli, ["none"])486 assert result.exception487488489def test_datetime_option_default(runner):490 @click.command()491 @click.option("--start_date", type=click.DateTime())492 def cli(start_date):
166 unmodified lines
modified:tests/test_chain.py+2 added-2 removed
161 unmodified lines
162163 return processor164165 result = runner.invoke(cli, args, input=input)166 assert not result.exception167 assert result.output.splitlines() == expect166 # last two lines are '' and 'Aborted!'167 assert result.output.splitlines()[:-2] == expect168169170def test_args_and_chain(runner):171 @click.group(chain=True)
74 unmodified lines
modified:tests/test_commands.py+132 added
299 unmodified lines
300 result = runner.invoke(cli, ["b"], default_map={"b": {"x": 3}})301 assert result.exit_code == 0302303304@pytest.mark.parametrize(305 ("invocation_order", "declaration_order", "expected_order"),306 [307 # Non-eager options.308 ([], ["-a"], ["-a"]),309 (["-a"], ["-a"], ["-a"]),310 ([], ["-a", "-c"], ["-a", "-c"]),311 (["-a"], ["-a", "-c"], ["-a", "-c"]),312 (["-c"], ["-a", "-c"], ["-c", "-a"]),313 ([], ["-c", "-a"], ["-c", "-a"]),314 (["-a"], ["-c", "-a"], ["-a", "-c"]),315 (["-c"], ["-c", "-a"], ["-c", "-a"]),316 (["-a", "-c"], ["-a", "-c"], ["-a", "-c"]),317 (["-c", "-a"], ["-a", "-c"], ["-c", "-a"]),318 # Eager options.319 ([], ["-b"], ["-b"]),320 (["-b"], ["-b"], ["-b"]),321 ([], ["-b", "-d"], ["-b", "-d"]),322 (["-b"], ["-b", "-d"], ["-b", "-d"]),323 (["-d"], ["-b", "-d"], ["-d", "-b"]),324 ([], ["-d", "-b"], ["-d", "-b"]),325 (["-b"], ["-d", "-b"], ["-b", "-d"]),326 (["-d"], ["-d", "-b"], ["-d", "-b"]),327 (["-b", "-d"], ["-b", "-d"], ["-b", "-d"]),328 (["-d", "-b"], ["-b", "-d"], ["-d", "-b"]),329 # Mixed options.330 ([], ["-a", "-b", "-c", "-d"], ["-b", "-d", "-a", "-c"]),331 (["-a"], ["-a", "-b", "-c", "-d"], ["-b", "-d", "-a", "-c"]),332 (["-b"], ["-a", "-b", "-c", "-d"], ["-b", "-d", "-a", "-c"]),333 (["-c"], ["-a", "-b", "-c", "-d"], ["-b", "-d", "-c", "-a"]),334 (["-d"], ["-a", "-b", "-c", "-d"], ["-d", "-b", "-a", "-c"]),335 (["-a", "-b"], ["-a", "-b", "-c", "-d"], ["-b", "-d", "-a", "-c"]),336 (["-b", "-a"], ["-a", "-b", "-c", "-d"], ["-b", "-d", "-a", "-c"]),337 (["-d", "-c"], ["-a", "-b", "-c", "-d"], ["-d", "-b", "-c", "-a"]),338 (["-c", "-d"], ["-a", "-b", "-c", "-d"], ["-d", "-b", "-c", "-a"]),339 (["-a", "-b", "-c", "-d"], ["-a", "-b", "-c", "-d"], ["-b", "-d", "-a", "-c"]),340 (["-b", "-d", "-a", "-c"], ["-a", "-b", "-c", "-d"], ["-b", "-d", "-a", "-c"]),341 ([], ["-b", "-d", "-e", "-a", "-c"], ["-b", "-d", "-e", "-a", "-c"]),342 (["-a", "-d"], ["-b", "-d", "-e", "-a", "-c"], ["-d", "-b", "-e", "-a", "-c"]),343 (["-c", "-d"], ["-b", "-d", "-e", "-a", "-c"], ["-d", "-b", "-e", "-c", "-a"]),344 ],345)346def test_iter_params_for_processing(347 invocation_order, declaration_order, expected_order348):349 parameters = {350 "-a": click.Option(["-a"]),351 "-b": click.Option(["-b"], is_eager=True),352 "-c": click.Option(["-c"]),353 "-d": click.Option(["-d"], is_eager=True),354 "-e": click.Option(["-e"], is_eager=True),355 }356357 invocation_params = [parameters[opt_id] for opt_id in invocation_order]358 declaration_params = [parameters[opt_id] for opt_id in declaration_order]359 expected_params = [parameters[opt_id] for opt_id in expected_order]360361 assert (362 click.core.iter_params_for_processing(invocation_params, declaration_params)363 == expected_params364 )365366367def test_help_param_priority(runner):368 """Cover the edge-case in which the eagerness of help option was not369 respected, because it was internally generated multiple times.370371 See: https://github.com/pallets/click/pull/2811372 """373374 def print_and_exit(ctx, param, value):375 if value:376 click.echo(f"Value of {param.name} is: {value}")377 ctx.exit()378379 @click.command(context_settings={"help_option_names": ("--my-help",)})380 @click.option("-a", is_flag=True, expose_value=False, callback=print_and_exit)381 @click.option(382 "-b", is_flag=True, expose_value=False, callback=print_and_exit, is_eager=True383 )384 def cli():385 pass386387 # --my-help is properly called and stop execution.388 result = runner.invoke(cli, ["--my-help"])389 assert "Value of a is: True" not in result.stdout390 assert "Value of b is: True" not in result.stdout391 assert "--my-help" in result.stdout392 assert result.exit_code == 0393394 # -a is properly called and stop execution.395 result = runner.invoke(cli, ["-a"])396 assert "Value of a is: True" in result.stdout397 assert "Value of b is: True" not in result.stdout398 assert "--my-help" not in result.stdout399 assert result.exit_code == 0400401 # -a takes precedence over -b and stop execution.402 result = runner.invoke(cli, ["-a", "-b"])403 assert "Value of a is: True" not in result.stdout404 assert "Value of b is: True" in result.stdout405 assert "--my-help" not in result.stdout406 assert result.exit_code == 0407408 # --my-help is eager by default so takes precedence over -a and stop409 # execution, whatever the order.410 for args in [["-a", "--my-help"], ["--my-help", "-a"]]:411 result = runner.invoke(cli, args)412 assert "Value of a is: True" not in result.stdout413 assert "Value of b is: True" not in result.stdout414 assert "--my-help" in result.stdout415 assert result.exit_code == 0416417 # Both -b and --my-help are eager so they're called in the order they're418 # invoked by the user.419 result = runner.invoke(cli, ["-b", "--my-help"])420 assert "Value of a is: True" not in result.stdout421 assert "Value of b is: True" in result.stdout422 assert "--my-help" not in result.stdout423 assert result.exit_code == 0424425 # But there was a bug when --my-help is called before -b, because the426 # --my-help option created by click via help_option_names is internally427 # created twice and is not the same object, breaking the priority order428 # produced by iter_params_for_processing.429 result = runner.invoke(cli, ["--my-help", "-b"])430 assert "Value of a is: True" not in result.stdout431 assert "Value of b is: True" not in result.stdout432 assert "--my-help" in result.stdout433 assert result.exit_code == 0434435436def test_unprocessed_options(runner):437 @click.command(context_settings=dict(ignore_unknown_options=True))438 @click.argument("args", nargs=-1, type=click.UNPROCESSED)439 @click.option("--verbose", "-v", count=True)
108 unmodified lines
modified:tests/test_formatting.py+1 added-1 removed
246 unmodified lines
247248249def test_formatting_custom_type_metavar(runner):250 class MyType(click.ParamType):251 def get_metavar(self, param):251 def get_metavar(self, param: click.Parameter, ctx: click.Context):252 return "MY_TYPE"253254 @click.command("foo")255 @click.help_option()
113 unmodified lines
modified:tests/test_imports.py+16 added-14 removed
25 unmodified lines
26"""2728ALLOWED_IMPORTS = {29 "__future__",30 "weakref",31 "os",32 "struct",30 "codecs",31 "collections",32 "collections.abc",35 "sys",33 "configparser",34 "contextlib",35 "datetime",36 "enum",37 "errno",38 "fcntl",39 "functools",38 "stat",39 "re",40 "codecs",40 "gettext",41 "inspect",42 "itertools",42 "io",43 "itertools",44 "os",45 "re",46 "shutil",47 "stat",48 "struct",49 "sys",50 "threading",45 "errno",46 "fcntl",47 "datetime",48 "enum",49 "typing",51 "types",51 "gettext",52 "typing",53 "weakref",54}5556if WIN:57 ALLOWED_IMPORTS.update(["ctypes", "ctypes.wintypes", "msvcrt", "time"])
14 unmodified lines
modified:tests/test_info_dict.py+2 added-2 removed
104 unmodified lines
105 id="UNPROCESSED ParamType",106 ),107 pytest.param(*STRING_PARAM_TYPE, id="STRING ParamType"),108 pytest.param(109 click.Choice(["a", "b"]),109 click.Choice(("a", "b")),110 {111 "param_type": "Choice",112 "name": "choice",113 "choices": ["a", "b"],113 "choices": ("a", "b"),114 "case_sensitive": True,115 },116 id="Choice ParamType",117 ),
158 unmodified lines
modified:tests/test_normalization.py+30 added-5 removed
15 unmodified lines
161718def test_choice_normalization(runner):19 @click.command(context_settings=CONTEXT_SETTINGS)20 @click.option("--choice", type=click.Choice(["Foo", "Bar"]))21 def cli(choice):22 click.echo(choice)20 @click.option(21 "--method",22 type=click.Choice(23 ["SCREAMING_SNAKE_CASE", "snake_case", "PascalCase", "kebab-case"],24 case_sensitive=False,25 ),26 )27 def cli(method):28 click.echo(method)2924 result = runner.invoke(cli, ["--CHOICE", "FOO"])25 assert result.output == "Foo\n"30 result = runner.invoke(cli, ["--METHOD=snake_case"])31 assert not result.exception, result.output32 assert result.output == "snake_case\n"3334 # Even though it's case sensitive, the choice's original value is preserved35 result = runner.invoke(cli, ["--method=pascalcase"])36 assert not result.exception, result.output37 assert result.output == "PascalCase\n"3839 result = runner.invoke(cli, ["--method=meh"])40 assert result.exit_code == 241 assert (42 "Invalid value for '--method': 'meh' is not one of "43 "'screaming_snake_case', 'snake_case', 'pascalcase', 'kebab-case'."44 ) in result.output4546 result = runner.invoke(cli, ["--help"])47 assert (48 "--method [screaming_snake_case|snake_case|pascalcase|kebab-case]"49 in result.output50 )515253def test_command_normalization(runner):54 @click.group(context_settings=CONTEXT_SETTINGS)55 def cli():56 pass
7 unmodified lines
modified:tests/test_options.py+427 added-5 removed
1import enum2import os3import re4import sys56if sys.version_info < (3, 11):7 enum.StrEnum = enum.Enum # type: ignore[assignment]89import pytest1011import click12from click import Option
238 unmodified lines
251 assert not result.exception252 assert result.output == "foo|bar\n"253254250def test_trailing_blanks_boolean_envvar(runner):255@pytest.mark.parametrize(256 ("name", "value", "expected"),257 (258 # Lower-cased variations of value.259 ("SHOUT", "true", True),260 ("SHOUT", "false", False),261 # Title-cased variations of value.262 ("SHOUT", "True", True),263 ("SHOUT", "False", False),264 # Upper-cased variations of value.265 ("SHOUT", "TRUE", True),266 ("SHOUT", "FALSE", False),267 # Random-cased variations of value.268 ("SHOUT", "TruE", True),269 ("SHOUT", "truE", True),270 ("SHOUT", "FaLsE", False),271 ("SHOUT", "falsE", False),272 # Extra spaces around the value.273 ("SHOUT", "true ", True),274 ("SHOUT", " true", True),275 ("SHOUT", " true ", True),276 ("SHOUT", "false ", False),277 ("SHOUT", " false", False),278 ("SHOUT", " false ", False),279 # Integer variations.280 ("SHOUT", "1", True),281 ("SHOUT", "0", False),282 # Alternative states.283 ("SHOUT", "t", True),284 ("SHOUT", "f", False),285 ("SHOUT", "y", True),286 ("SHOUT", "n", False),287 ("SHOUT", "yes", True),288 ("SHOUT", "no", False),289 ("SHOUT", "on", True),290 ("SHOUT", "off", False),291 # Blank value variations.292 ("SHOUT", None, False),293 ("SHOUT", "", False),294 ("SHOUT", " ", False),295 ("SHOUT", " ", False),296 # Variable names are not stripped of spaces and so don't match the297 # flag, which then naturraly takes its default value.298 ("SHOUT ", "True", False),299 ("SHOUT ", "False", False),300 (" SHOUT ", "True", False),301 (" SHOUT ", "False", False),302 # Same for random and reverse environment variable names: they are not303 # recognized by the option.304 ("RANDOM", "True", False),305 ("NO_SHOUT", "True", False),306 ("NO_SHOUT", "False", False),307 ),308)309def test_boolean_envvar_normalization(runner, name, value, expected):310 @click.command()311 @click.option("--shout/--no-shout", envvar="SHOUT")312 def cli(shout):313 click.echo(f"shout: {shout!r}")314256 result = runner.invoke(cli, [], env={"SHOUT": " true "})315 result = runner.invoke(cli, [], env={name: value})316 assert result.exit_code == 0258 assert result.output == "shout: True\n"317 assert result.output == f"shout: {expected}\n"318319320@pytest.mark.parametrize(321 ("name", "value"),322 (323 ("SHOUT", "tr ue"),324 ("SHOUT", "10"),325 ("SHOUT", "01"),326 ("SHOUT", "00"),327 ("SHOUT", "11"),328 ("SHOUT", "randomstring"),329 ("SHOUT", "None"),330 ),331)332def test_boolean_envvar_bad_values(runner, name, value):333 @click.command()334 @click.option("--shout/--no-shout", envvar="SHOUT")335 def cli(shout):336 click.echo(f"shout: {shout!r}")337338 result = runner.invoke(cli, [], env={name: value})339 assert result.exit_code == 2340 assert (341 f"Invalid value for '--shout': {value!r} is not a valid boolean."342 in result.output343 )344345346def test_multiple_default_help(runner):347 @click.command()348 @click.option("--arg1", multiple=True, default=("foo", "bar"), show_default=True)349 @click.option("--arg2", multiple=True, default=(1, 2), type=int, show_default=True)
326 unmodified lines
676 result = runner.invoke(cli)677 assert result.exit_code == 2678 assert "Error: Missing option '--foo' (env var: 'bar')." in result.output679680 cli = click.Command(681 "cli", params=[click.Option(["--foo"], show_envvar=True, required=True)]682 )683 result = runner.invoke(cli)684 assert result.exit_code == 2685 assert "Error: Missing option '--foo'." in result.output686687688def test_case_insensitive_choice(runner):689 @click.command()690 @click.option("--foo", type=click.Choice(["Orange", "Apple"], case_sensitive=False))691 def cmd(foo):
123 unmodified lines
815 assert "I am a help text" in result.output816 assert "you wont see me" not in result.output817818819@pytest.mark.parametrize("custom_class", (True, False))820@pytest.mark.parametrize(821 ("name_specs", "expected"),822 (823 (824 ("-h", "--help"),825 " -h, --help Show this message and exit.\n",826 ),827 (828 ("-h",),829 " -h Show this message and exit.\n"830 " --help Show this message and exit.\n",831 ),832 (833 ("--help",),834 " --help Show this message and exit.\n",835 ),836 ),837)838def test_help_option_custom_names_and_class(runner, custom_class, name_specs, expected):839 class CustomHelpOption(click.Option):840 pass841842 option_attrs = {}843 if custom_class:844 option_attrs["cls"] = CustomHelpOption845846 @click.command()847 @click.help_option(*name_specs, **option_attrs)848 def cmd():849 pass850851 for arg in name_specs:852 result = runner.invoke(cmd, [arg])853 assert not result.exception854 assert result.exit_code == 0855 assert expected in result.output856857858def test_bool_flag_with_type(runner):859 @click.command()860 @click.option("--shout/--no-shout", default=False, type=bool)861 def cmd(shout):
237 unmodified lines
1099 assert param.type is click.INT110011011102@pytest.mark.parametrize(1103 ("opt_params", "pass_flag", "expected"),1104 [1105 # Effect of the presence/absence of flag depending on type1106 ({"type": bool}, False, False),1107 ({"type": bool}, True, True),1108 ({"type": click.BOOL}, False, False),1109 ({"type": click.BOOL}, True, True),1110 ({"type": str}, False, "False"),1111 ({"type": str}, True, "True"),1112 # Effects of default value1113 ({"type": bool, "default": True}, False, True),1114 ({"type": bool, "default": True}, True, True),1115 ({"type": bool, "default": False}, False, False),1116 ({"type": bool, "default": False}, True, True),1117 ({"type": bool, "default": None}, False, False),1118 ({"type": bool, "default": None}, True, True),1119 ({"type": click.BOOL, "default": True}, False, True),1120 ({"type": click.BOOL, "default": True}, True, True),1121 ({"type": click.BOOL, "default": False}, False, False),1122 ({"type": click.BOOL, "default": False}, True, True),1123 ({"type": click.BOOL, "default": None}, False, False),1124 ({"type": click.BOOL, "default": None}, True, True),1125 ({"type": str, "default": True}, False, "True"),1126 ({"type": str, "default": True}, True, "True"),1127 ({"type": str, "default": False}, False, "False"),1128 ({"type": str, "default": False}, True, "True"),1129 ({"type": str, "default": "foo"}, False, "foo"),1130 ({"type": str, "default": "foo"}, True, "foo"),1131 ({"type": str, "default": None}, False, "False"),1132 ({"type": str, "default": None}, True, "True"),1133 # Effects of flag_value1134 ({"type": bool, "flag_value": True}, False, False),1135 ({"type": bool, "flag_value": True}, True, True),1136 ({"type": bool, "flag_value": False}, False, False),1137 ({"type": bool, "flag_value": False}, True, False),1138 ({"type": bool, "flag_value": None}, False, False),1139 ({"type": bool, "flag_value": None}, True, True),1140 ({"type": click.BOOL, "flag_value": True}, False, False),1141 ({"type": click.BOOL, "flag_value": True}, True, True),1142 ({"type": click.BOOL, "flag_value": False}, False, False),1143 ({"type": click.BOOL, "flag_value": False}, True, False),1144 ({"type": click.BOOL, "flag_value": None}, False, False),1145 ({"type": click.BOOL, "flag_value": None}, True, True),1146 ({"type": str, "flag_value": True}, False, "False"),1147 ({"type": str, "flag_value": True}, True, "True"),1148 ({"type": str, "flag_value": False}, False, "False"),1149 ({"type": str, "flag_value": False}, True, "False"),1150 ({"type": str, "flag_value": "foo"}, False, "False"),1151 ({"type": str, "flag_value": "foo"}, True, "foo"),1152 ({"type": str, "flag_value": None}, False, "False"),1153 ({"type": str, "flag_value": None}, True, "True"),1154 # Not passing --foo returns the default value as-is1155 ({"type": bool, "default": True, "flag_value": True}, False, True),1156 ({"type": bool, "default": True, "flag_value": False}, False, True),1157 ({"type": bool, "default": False, "flag_value": True}, False, False),1158 ({"type": bool, "default": False, "flag_value": False}, False, False),1159 ({"type": bool, "default": None, "flag_value": True}, False, False),1160 ({"type": bool, "default": None, "flag_value": False}, False, False),1161 ({"type": str, "default": True, "flag_value": True}, False, "True"),1162 ({"type": str, "default": True, "flag_value": False}, False, "True"),1163 ({"type": str, "default": False, "flag_value": True}, False, "False"),1164 ({"type": str, "default": False, "flag_value": False}, False, "False"),1165 ({"type": str, "default": "foo", "flag_value": True}, False, "foo"),1166 ({"type": str, "default": "foo", "flag_value": False}, False, "foo"),1167 ({"type": str, "default": "foo", "flag_value": "bar"}, False, "foo"),1168 ({"type": str, "default": "foo", "flag_value": None}, False, "foo"),1169 ({"type": str, "default": None, "flag_value": True}, False, "False"),1170 ({"type": str, "default": None, "flag_value": False}, False, "False"),1171 # Passing --foo returns the explicitly set flag_value1172 ({"type": bool, "default": True, "flag_value": True}, True, True),1173 ({"type": bool, "default": True, "flag_value": False}, True, False),1174 ({"type": bool, "default": False, "flag_value": True}, True, True),1175 ({"type": bool, "default": False, "flag_value": False}, True, False),1176 ({"type": bool, "default": None, "flag_value": True}, True, True),1177 ({"type": bool, "default": None, "flag_value": False}, True, False),1178 ({"type": str, "default": True, "flag_value": True}, True, "True"),1179 ({"type": str, "default": True, "flag_value": False}, True, "False"),1180 ({"type": str, "default": False, "flag_value": True}, True, "True"),1181 ({"type": str, "default": False, "flag_value": False}, True, "False"),1182 ({"type": str, "default": "foo", "flag_value": True}, True, "True"),1183 ({"type": str, "default": "foo", "flag_value": False}, True, "False"),1184 ({"type": str, "default": "foo", "flag_value": "bar"}, True, "bar"),1185 ({"type": str, "default": "foo", "flag_value": None}, True, "foo"),1186 ({"type": str, "default": None, "flag_value": True}, True, "True"),1187 ({"type": str, "default": None, "flag_value": False}, True, "False"),1188 ],1189)1190def test_flag_value_and_default(runner, opt_params, pass_flag, expected):1191 @click.command()1192 @click.option("--foo", is_flag=True, **opt_params)1193 def cmd(foo):1194 click.echo(repr(foo))11951196 result = runner.invoke(cmd, ["--foo"] if pass_flag else [])1197 assert result.output == f"{expected!r}\n"119811991200@pytest.mark.parametrize(1201 "opts",1202 [1203 {"type": bool, "default": "foo"},1204 {"type": bool, "flag_value": "foo"},1205 {"type": click.BOOL, "default": "foo"},1206 {"type": click.BOOL, "flag_value": "foo"},1207 ],1208)1209def test_invalid_flag_definition(runner, opts):1210 @click.command()1211 @click.option("--foo", is_flag=True, **opts)1212 def cmd(foo):1213 click.echo(foo)12141215 result = runner.invoke(cmd, ["--foo"])1216 assert (1217 "Error: Invalid value for '--foo': 'foo' is not a valid boolean"1218 in result.output1219 )122012211222@pytest.mark.parametrize(1223 ("flag_value", "envvar_value", "expected"),1224 [1225 # Envvar is set to false, so the flag default value is returned.1226 ("bar", "False", "False"),1227 # Same as above with alternative states and blank values.1228 ("bar", "0", "False"),1229 ("bar", "f", "False"),1230 ("bar", "", "False"),1231 # Envvar is set to true, so the flag_value is returned.1232 ("bar", "True", "bar"),1233 ("bar", "1", "bar"),1234 ("bar", "t", "bar"),1235 # So far we have the same cases as the test_flag_value_and_default1236 # test case. Now instead of passing a boolean-like value, let's use1237 # the flag_value as the envvar value.1238 ("bar", "bar", "bar"),1239 # flag_value is expected to be the exact same in the envvar for the flag to be1240 # activated.1241 ("bar", " bar ", "False"),1242 ("bar", "BAR", "False"),1243 ("bar", "random", "False"),1244 ("bar", "bar random", "False"),1245 ("bar", "random bar", "False"),1246 ("BAR", "BAR", "BAR"),1247 ("BAR", "bar", "False"),1248 (" bar ", " bar ", " bar "),1249 (" bar ", "bar", "False"),1250 (" bar ", "BAR", "False"),1251 ],1252)1253def test_envvar_flag_value(runner, flag_value, envvar_value, expected):1254 """Ensure that flag_value is recognized by the envvar."""12551256 @click.command()1257 @click.option(1258 "--upper", type=str, is_flag=True, flag_value=flag_value, envvar="UPPER"1259 )1260 def cmd(upper):1261 click.echo(repr(upper))12621263 result = runner.invoke(cmd, env={"UPPER": envvar_value})1264 assert result.exit_code == 01265 assert result.output == f"{expected!r}\n"126612671268@pytest.mark.parametrize(1269 ("option", "expected"),1270 [1271 # Not boolean flags1272 pytest.param(Option(["-a"], type=int), False, id="int option"),
6 unmodified lines
1279 pytest.param(Option(["-a/-A"]), True, id="secondary option [implicit flag]"),1280 pytest.param(Option(["-a"], flag_value=True), True, id="bool flag_value"),1281 ],1282)986def test_is_bool_flag_is_correctly_set(option, expected):1283def test_bool_flag_auto_detection(option, expected):1284 assert option.is_bool_flag is expected128512861287@pytest.mark.parametrize(
9 unmodified lines
12971298 assert message in str(e.value)129913001301def test_non_flag_with_non_negatable_default(runner):1302 class NonNegatable:1303 def __bool__(self):1304 raise ValueError("Cannot negate this object")13051306 @click.command()1307 @click.option("--foo", default=NonNegatable())1308 def cmd(foo):1309 pass13101311 result = runner.invoke(cmd)1312 assert result.exit_code == 0131313141315class HashType(enum.Enum):1316 MD5 = enum.auto()1317 SHA1 = enum.auto()131813191320class Number(enum.IntEnum):1321 ONE = enum.auto()1322 TWO = enum.auto()132313241325class Letter(enum.StrEnum):1326 A = enum.auto()1327 B = enum.auto()132813291330class Color(enum.Flag):1331 RED = enum.auto()1332 GREEN = enum.auto()1333 BLUE = enum.auto()133413351336class ColorInt(enum.IntFlag):1337 RED = enum.auto()1338 GREEN = enum.auto()1339 BLUE = enum.auto()134013411342@pytest.mark.parametrize(1343 ("choices", "metavars"),1344 [1345 pytest.param(["foo", "bar"], "[TEXT]", id="text choices"),1346 pytest.param([1, 2], "[INTEGER]", id="int choices"),1347 pytest.param([1.0, 2.0], "[FLOAT]", id="float choices"),1348 pytest.param([True, False], "[BOOLEAN]", id="bool choices"),1349 pytest.param(["foo", 1], "[TEXT|INTEGER]", id="text/int choices"),1350 pytest.param(HashType, "[HASHTYPE]", id="enum choices"),1351 pytest.param(Number, "[NUMBER]", id="int enum choices"),1352 pytest.param(Letter, "[LETTER]", id="str enum choices"),1353 pytest.param(Color, "[COLOR]", id="flag enum choices"),1354 pytest.param(ColorInt, "[COLORINT]", id="int flag enum choices"),1355 ],1356)1357def test_usage_show_choices(runner, choices, metavars):1358 """When show_choices=False is set, the --help output
14 unmodified lines
1373 def cli_without_choices(g):1374 pass13751376 result = runner.invoke(cli_with_choices, ["--help"])1034 assert f"[{'|'.join([str(i) for i in choices])}]" in result.output1377 assert (1378 f"[{'|'.join(i.name if isinstance(i, enum.Enum) else str(i) for i in choices)}]"1379 in result.output1380 )13811382 result = runner.invoke(cli_without_choices, ["--help"])1383 assert metavars in result.output138413851386@pytest.mark.parametrize(1387 ("choices", "default", "default_string"),1388 [1389 (["foo", "bar"], "bar", "bar"),1390 # The default value is not enforced to be in the choices.1391 (["foo", "bar"], "random", "random"),1392 # None cannot be a default value as-is: it left the default value as unset.1393 (["foo", "bar"], None, None),1394 ([0, 1], 0, "0"),1395 # Values are not coerced to the type of the choice, even if equivalent.1396 ([0, 1], 0.0, "0.0"),1397 ([1, 2], 2, "2"),1398 ([1.0, 2.0], 2, "2"),1399 ([1.0, 2.0], 2.0, "2.0"),1400 ([True, False], True, "True"),1401 ([True, False], False, "False"),1402 (["foo", 1], "foo", "foo"),1403 (["foo", 1], 1, "1"),1404 # Enum choices are rendered as their names.1405 # See: https://github.com/pallets/click/issues/29111406 (HashType, HashType.SHA1, "SHA1"),1407 # Enum choices allow defaults strings that are their names.1408 (HashType, "SHA1", "SHA1"),1409 (Number, Number.TWO, "TWO"),1410 (Letter, Letter.B, "B"),1411 (Color, Color.GREEN, "GREEN"),1412 (ColorInt, ColorInt.GREEN, "GREEN"),1413 ],1414)1415def test_choice_default_rendering(runner, choices, default, default_string):1416 @click.command()1417 @click.option("-g", type=click.Choice(choices), default=default, show_default=True)1418 def cli_with_choices(g):1419 pass14201421 # Check that the default value is kept normalized to the type of the choice.1422 assert cli_with_choices.params[0].default == default14231424 result = runner.invoke(cli_with_choices, ["--help"])1425 extra_usage = f"[default: {default_string}]"1426 if default_string is None:1427 assert extra_usage not in result.output1428 else:1429 assert extra_usage in result.output143014311432@pytest.mark.parametrize(1433 "opts_one,opts_two",1434 [1435 # No duplicate shortnames1436 (
15 unmodified lines
1452 pass14531454 with pytest.warns(UserWarning):1455 runner.invoke(cli, [])145614571458@pytest.mark.parametrize(1459 ("multiple", "nargs", "default", "expected_message"),1460 [1461 (1462 False, # multiple1463 2, # nargs1464 42, # default (not a list)1465 "'default' must be a list when 'nargs' != 1.",1466 ),1467 (1468 True, # multiple1469 2, # nargs1470 [1471 "test string which is not a list in the list"1472 ], # default (list of non-lists)1473 "'default' must be a list of lists when 'multiple' is true"1474 " and 'nargs' != 1.",1475 ),1476 ],1477)1478def test_default_type_error_raises(multiple, nargs, default, expected_message):1479 with pytest.raises(ValueError, match=expected_message):1480 click.Option(1481 ["--test"],1482 multiple=multiple,1483 nargs=nargs,1484 default=default,1485 )
modified:tests/test_shell_completion.py+105 added
1import textwrap2import warnings3from collections.abc import Mapping45import pytest67import click.shell_completion
33 unmodified lines
41 assert _get_words(cli, [], "") == ["x", "y"]42 assert _get_words(cli, [], "-") == ["-a", "--help"]434445@pytest.mark.parametrize(46 ("args", "word", "expect"),47 [48 ([], "", ["get"]),49 (["get"], "", ["full"]),50 (["get", "full"], "", ["data"]),51 (["get", "full"], "-", ["--verbose", "--help"]),52 (["get", "full", "data"], "", []),53 (["get", "full", "data"], "-", ["-a", "--help"]),54 ],55)56def test_nested_group(args: list[str], word: str, expect: list[str]) -> None:57 cli = Group(58 "cli",59 commands=[60 Group(61 "get",62 commands=[63 Group(64 "full",65 params=[Option(["--verbose"])],66 commands=[Command("data", params=[Option(["-a"])])],67 )68 ],69 )70 ],71 )72 assert _get_words(cli, args, word) == expect737475def test_group_command_same_option():76 cli = Group(77 "cli", params=[Option(["-a"])], commands=[Command("x", params=[Option(["-a"])])]78 )
289 unmodified lines
368 result = runner.invoke(cli, env=env)369 assert result.output == expect370371372@pytest.mark.parametrize(373 ("env", "expect"),374 [375 (376 {"COMP_WORDS": "", "COMP_CWORD": "0"},377 textwrap.dedent(378 """\379 plain380 a381 _382 plain383 b384 bee385 plain386 c\\:d387 cee:dee388 plain389 c:e390 _391 """392 ),393 ),394 (395 {"COMP_WORDS": "a c", "COMP_CWORD": "1"},396 textwrap.dedent(397 """\398 plain399 c\\:d400 cee:dee401 plain402 c:e403 _404 """405 ),406 ),407 (408 {"COMP_WORDS": "a c:", "COMP_CWORD": "1"},409 textwrap.dedent(410 """\411 plain412 c\\:d413 cee:dee414 plain415 c:e416 _417 """418 ),419 ),420 ],421)422@pytest.mark.usefixtures("_patch_for_completion")423def test_zsh_full_complete_with_colons(424 runner, env: Mapping[str, str], expect: str425) -> None:426 cli = Group(427 "cli",428 commands=[429 Command("a"),430 Command("b", help="bee"),431 Command("c:d", help="cee:dee"),432 Command("c:e"),433 ],434 )435 result = runner.invoke(436 cli,437 env={438 **env,439 "_CLI_COMPLETE": "zsh_complete",440 },441 )442 assert result.output == expect443444445@pytest.mark.usefixtures("_patch_for_completion")446def test_context_settings(runner):447 def complete(ctx, param, incomplete):448 return ctx.obj["choices"]449
111 unmodified lines
modified:tests/test_termui.py+2 added-2 removed
240 unmodified lines
241 @click.option("-f", default=__file__, prompt="file", type=click.File(**file_kwargs))242 def cli(f):243 click.echo(f.name)244245 result = runner.invoke(cli)245 result = runner.invoke(cli, input="\n")246 assert result.output == f"file [{__file__}]: \n{__file__}\n"247248249def test_secho(runner):
200 unmodified lines
450 ("prompt", "input", "default", "expect"),451 [452 (True, "password\npassword", None, "password"),453 ("Confirm Password", "password\npassword\n", None, "password"),454 (True, "", "", ""),454 (True, "\n\n", "", ""),455 (False, None, None, None),456 ],457)458def test_confirmation_prompt(runner, prompt, input, default, expect):
29 unmodified lines
modified:tests/test_testing.py+20 added-1 removed
446 unmodified lines
447 runner = CliRunner()448449 with runner.isolation() as (_, err, _):450 click.echo("\udce2", err=True, nl=False)451 assert err.getvalue() == b"\\udce2"452453454def test_isolation_flushes_unflushed_stderr():455 """An un-flushed write to stderr, as with `print(..., file=sys.stderr)`, will end up456 flushed by the runner at end of invocation.457 """458 runner = CliRunner()459460 with runner.isolation() as (_, err, _):461 click.echo("\udce2", err=True, nl=False)452 assert err.getvalue() == b"\\udce2"462 assert err.getvalue() == b"\\udce2"463464 @click.command()465 def cli():466 # set end="", flush=False so that it's totally clear that we won't get any467 # auto-flush behaviors468 print("gyarados gyarados gyarados", file=sys.stderr, end="", flush=False)469470 result = runner.invoke(cli)471 assert result.stderr == "gyarados gyarados gyarados"
modified:tests/test_types.py+7 added-2 removed
224 unmodified lines
225)226def test_file_surrogates(type, tmp_path):227 path = tmp_path / "\udcff"228229 # - common case: �': No such file or directory230 # - special case: Illegal byte sequence231 # The spacial case is seen with rootless Podman. The root cause is most232 # likely that the path is handled by a user-space program (FUSE).233 match = r"(�': No such file or directory|Illegal byte sequence)"229 with pytest.raises(click.BadParameter, match="�': No such file or directory"):234 with pytest.raises(click.BadParameter, match=match):235 type.convert(path, None, None)236237238def test_file_error_surrogates():
13 unmodified lines
252253254def test_choice_get_invalid_choice_message():255 choice = click.Choice(["a", "b", "c"])251 message = choice.get_invalid_choice_message("d")256 message = choice.get_invalid_choice_message("d", ctx=None)257 assert message == "'d' is not one of 'a', 'b', 'c'."
modified:tests/test_utils.py+51 added-33 removed
1import os2import pathlib3import stat4import subprocess5import sys6from collections import namedtuple7from contextlib import nullcontext8from functools import partial9from io import StringIO10from pathlib import Path11from tempfile import tempdir12from unittest.mock import patch1314import pytest1516import click._termui_impl
94 unmodified lines
111 assert click.format_filename(b"foo.txt") == "foo.txt"112 assert click.format_filename(b"/x/foo.txt") == "/x/foo.txt"113 assert click.format_filename("/x/foo.txt") == "/x/foo.txt"114 assert click.format_filename("/x/foo.txt", shorten=True) == "foo.txt"110 assert click.format_filename(b"/x/\xff.txt", shorten=True) == "�.txt"115 assert click.format_filename("/x/\ufffd.txt", shorten=True) == "�.txt"116117118def test_prompts(runner):119 @click.command()
58 unmodified lines
178 out, err = capsys.readouterr()179 assert out == "Password:\ninterrupted\n"180181182def test_prompts_eof(runner):183 """If too few lines of input are given, prompt should exit, not hang."""184185 @click.command186 def echo():187 for _ in range(3):188 click.echo(click.prompt("", type=int))189190 # only provide two lines of input for three prompts191 result = runner.invoke(echo, input="1\n2\n")192 assert result.exit_code == 1193194195def _test_gen_func():196 yield "a"197 yield "b"198 yield "c"
30 unmodified lines
229230231@pytest.mark.skipif(WIN, reason="Different behavior on windows.")232@pytest.mark.parametrize(233 "pager_cmd", ["cat", "cat ", " cat ", "less", " less", " less "]234)235@pytest.mark.parametrize(236 "test",237 [238 # We need to pass a parameter function instead of a plain param239 # as pytest.mark.parametrize will reuse the parameters causing the
42 unmodified lines
282 description="Exception in generator function argument",283 test_input=lambda: _test_gen_func_fails,284 # Because generator throws early on, the pager did not have285 # a chance yet to write the file.265 expected_pager=None,286 expected_pager="",287 expected_stdout="",288 expected_stderr="",289 expected_error=RuntimeError,290 ),
1 unmodified line
292 description="Exception in generator argument",293 test_input=lambda: _test_gen_func_fails,294 # Because generator throws early on, the pager did not have a295 # chance yet to write the file.275 expected_pager=None,296 expected_pager="",297 expected_stdout="",298 expected_stderr="",299 expected_error=RuntimeError,300 ),
26 unmodified lines
327 expected_error=None,328 ),329 ],330)310def test_echo_via_pager(monkeypatch, capfd, test):311 pager_out_tmp = f"{tempdir}/pager_out.txt"312313 if os.path.exists(pager_out_tmp):314 os.remove(pager_out_tmp)315316 monkeypatch.setitem(os.environ, "PAGER", f"cat > {pager_out_tmp}")331def test_echo_via_pager(monkeypatch, capfd, pager_cmd, test):332 monkeypatch.setitem(os.environ, "PAGER", pager_cmd)333 monkeypatch.setattr(click._termui_impl, "isatty", lambda x: True)334335 test_input = test.test_input()336 expected_pager = test.expected_pager337 expected_stdout = test.expected_stdout338 expected_stderr = test.expected_stderr339 expected_error = test.expected_error340325 if expected_error:326 with pytest.raises(expected_error):327 click.echo_via_pager(test_input)328 else:329 click.echo_via_pager(test_input)341 check_raise = pytest.raises(expected_error) if expected_error else nullcontext()342343 pager_out_tmp = Path(tempdir) / "pager_out.txt"344 pager_out_tmp.unlink(missing_ok=True)345 with pager_out_tmp.open("w") as f:346 force_subprocess_stdout = patch.object(347 subprocess,348 "Popen",349 partial(subprocess.Popen, stdout=f),350 )351 with force_subprocess_stdout:352 with check_raise:353 click.echo_via_pager(test_input)354355 out, err = capfd.readouterr()356333 if os.path.exists(pager_out_tmp):334 with open(pager_out_tmp) as f:335 pager = f.read()336 else:337 # The pager process was not started or has been338 # terminated before it could finish writing339 pager = None357 pager = pager_out_tmp.read_text()358341 assert (342 pager == expected_pager343 ), f"Unexpected pager output in test case '{test.description}'"344 assert (345 out == expected_stdout346 ), f"Unexpected stdout in test case '{test.description}'"347 assert (348 err == expected_stderr349 ), f"Unexpected stderr in test case '{test.description}'"359 assert pager == expected_pager, (360 f"Unexpected pager output in test case '{test.description}'"361 )362 assert out == expected_stdout, (363 f"Unexpected stdout in test case '{test.description}'"364 )365 assert err == expected_stderr, (366 f"Unexpected stderr in test case '{test.description}'"367 )368369370def test_echo_color_flag(monkeypatch, capfd):371 isatty = True
214 unmodified lines
586 expected = list(map(str, range(10)))587 p = tmpdir.mkdir("testdir").join("testfile")588 p.write("\n".join(expected))589 with p.open() as f:572 for e_line, a_line in zip(expected, click.utils.KeepOpenFile(f)):590 for e_line, a_line in zip(expected, click.utils.KeepOpenFile(f), strict=False):591 assert e_line == a_line.strip()592593594def test_iter_lazyfile(tmpdir):
1 unmodified line
596 p = tmpdir.mkdir("testdir").join("testfile")597 p.write("\n".join(expected))598 with p.open() as f:599 with click.utils.LazyFile(f.name) as lf:582 for e_line, a_line in zip(expected, lf):600 for e_line, a_line in zip(expected, lf, strict=False):601 assert e_line == a_line.strip()602603604class MockMain:
67 unmodified lines
modified:.gitignore-4 removed
1.idea/2.vscode/3.venv*/4venv*/5.env*/6env*/3__pycache__/4dist/5.coverage*6htmlcov/
2 unmodified lines
modified:.pre-commit-config.yaml+6 added-2 removed
1repos:2 - repo: https://github.com/astral-sh/ruff-pre-commit3 rev: v0.7.13 rev: 9aeda5d1f4bbd212c557da1ea78eca9e8c829e19 # frozen: v0.11.134 hooks:5 - id: ruff6 - id: ruff-format7 - repo: https://github.com/astral-sh/uv-pre-commit8 rev: a621b109bab2e7e832d98c88fd3e83399f4e6657 # frozen: 0.7.129 hooks:10 - id: uv-lock11 - repo: https://github.com/pre-commit/pre-commit-hooks8 rev: v5.0.012 rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.013 hooks:14 - id: check-merge-conflict15 - id: debug-statements16 - id: fix-byte-order-marker
2 unmodified lines
modified:.readthedocs.yaml+14 added-10 removed
1version: 22# Do not specify sphinx key here to be in full control of build steps.3# https://docs.readthedocs.com/platform/stable/build-customization.html#extend-or-override-the-build-process45build:3 os: ubuntu-22.046 os: ubuntu-24.047 tools:5 python: '3.12'6python:7 install:8 - requirements: requirements/docs.txt9 - method: pip10 path: .11sphinx:12 builder: dirhtml13 fail_on_warning: true8 python: '3.13'9 jobs:10 install:11 - echo "Installing dependencies"12 - asdf plugin add uv13 - asdf install uv latest14 - asdf global uv latest15 build:16 html:17 - uv run --group docs sphinx-build -W -b dirhtml docs $READTHEDOCS_OUTPUT/html
modified:CHANGES.rst+60 added-13 removed
1.. currentmodule:: click23Version 8.2.24-------------56Released 2025-07-3178- Fix reconciliation of `default`, `flag_value` and `type` parameters for9 flag options, as well as parsing and normalization of environment variables.10 :issue:`2952` :pr:`2956`11- Fix typing issue in ``BadParameter`` and ``MissingParameter`` exceptions for the12 parameter ``param_hint`` that did not allow for a sequence of string where the13 underlying functino ``_join_param_hints`` allows for it. :issue:`2777` :pr:`2990`14- Use the value of ``Enum`` choices to render their default value in help15 screen. Refs :issue:`2911` :pr:`3004`16- Fix completion for the Z shell (``zsh``) for completion items containing17 colons. :issue:`2703` :pr:`2846`18- Don't include envvar in error hint when not configured. :issue:`2971` :pr:`2972`19- Fix a rare race in ``click.testing.StreamMixer``'s finalization that manifested20 as a ``ValueError`` on close in a multi-threaded test session.21 :issue:`2993` :pr:`2991`2223Version 8.2.124-------------2526Released 2025-05-202728- Fix flag value handling for flag options with a provided type. :issue:`2894`29 :issue:`2897` :pr:`2930`30- Fix shell completion for nested groups. :issue:`2906` :pr:`2907`31- Flush ``sys.stderr`` at the end of ``CliRunner.invoke``. :issue:`2682`32- Fix EOF handling for stdin input in CliRunner. :issue:`2787`3334Version 8.2.035-------------366Unreleased37Released 2025-05-10388- Drop support for Python 3.7. :pr:`2588`39- Drop support for Python 3.7, 3.8, and 3.9. :pr:`2588` :pr:`2893`40- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.10 :pr:`326`11- Use ``flit_core`` instead of ``setuptools`` as build backend.41 :pr:`2438`42- Use ``flit_core`` instead of ``setuptools`` as build backend. :pr:`2543`43- Deprecate the ``__version__`` attribute. Use feature detection, or44 ``importlib.metadata.version("click")``, instead. :issue:`2598`45- ``BaseCommand`` is deprecated. ``Command`` is the base class for all46 commands. :issue:`2589`
24 unmodified lines
71 items used in ``get_help_record`` to render help text. :issue:`2516`72 :pr:`2517`73- Keep stdout and stderr streams independent in ``CliRunner``. Always74 collect stderr output and never raise an exception. Add a new44 output` stream to simulate what the user sees in its terminal. Removes75 output stream to simulate what the user sees in its terminal. Removes76 the ``mix_stderr`` parameter in ``CliRunner``. :issue:`2522` :pr:`2523`77- ``Option.show_envvar`` now also shows environment variable in error messages.78 :issue:`2695` :pr:`2696`79- ``Context.close`` will be called on exit. This results in all80 ``Context.call_on_close`` callbacks and context managers added via81 ``Context.with_resource`` to be closed on exit as well. :pr:`2680`82- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609`83- A ``UserWarning`` will be shown when multiple parameters attempt to use the53 same name. :issue:`2396``84 same name. :issue:`2396`85- When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value``86 will always be used instead of the value of the environment variable.87 :issue:`2746` :pr:`2788`88- Add ``Choice.get_invalid_choice_message`` method for customizing the
1 unmodified line
90- If help is shown because ``no_args_is_help`` is enabled (defaults to ``True``91 for groups, ``False`` for commands), the exit code is 2 instead of 0.92 :issue:`1489` :pr:`1489`93- Contexts created during shell completion are closed properly, fixing63 ``ResourceWarning``s when using ``click.File``. :issue:`2644` :pr:`2800`94 a ``ResourceWarning`` when using ``click.File``. :issue:`2644` :pr:`2800`95 :pr:`2767`96- ``click.edit(filename)`` now supports passing an iterable of filenames in97 case the editor supports editing multiple files at once. Its return type98 is now also typed: ``AnyStr`` if ``text`` is passed, otherwise ``None``.
19 unmodified lines
118 ``(Deprecated) help`` to ``help (DEPRECATED)``.119 - Parameters cannot be required nor prompted or an error is raised.120 - A warning will be printed when something deprecated is used.12191- Add a ``catch_exceptions`` parameter to :class:`CliRunner`. If92 ``catch_exceptions`` is not passed to :meth:`CliRunner.invoke`,93 the value from :class:`CliRunner`. :issue:`2817` :pr:`2818`122- Add a ``catch_exceptions`` parameter to ``CliRunner``. If123 ``catch_exceptions`` is not passed to ``CliRunner.invoke``, the value124 from ``CliRunner`` is used. :issue:`2817` :pr:`2818`125- ``Option.flag_value`` will no longer have a default value set based on126 ``Option.default`` if ``Option.is_flag`` is ``False``. This results in127 ``Option.default`` not needing to implement `__bool__`. :pr:`2829`128- Incorrect ``click.edit`` typing has been corrected. :pr:`2804`129- ``Choice`` is now generic and supports any iterable value.130 This allows you to use enums and other non-``str`` values. :pr:`2796`131 :issue:`605`132- Fix setup of help option's defaults when using a custom class on its133 decorator. Removes ``HelpOption``. :issue:`2832` :pr:`2840`134135Version 8.1.8136-------------137102Unreleased138Released 2024-12-19139140- Fix an issue with type hints for ``click.open_file()``. :issue:`2717`141- Fix issue where error message for invalid ``click.Path`` displays on142 multiple lines. :issue:`2697`
4 unmodified lines
147- Show correct value for flag default when using ``default_map``.148 :issue:`2632`149- Fix ``click.echo(color=...)`` passing ``color`` to coloroma so it can be150 forced on Windows. :issue:`2606`.115- show correct auto complete value for nargs option in combination with116 flag option :issue:`2813`151- More robust bash version check, fixing problem on Windows with git-bash.152 :issue:`2638`153- Cache the help option generated by the ``help_option_names`` setting to154 respect its eagerness. :pr:`2811`155- Replace uses of ``os.system`` with ``subprocess.Popen``. :issue:`1476`156- Exceptions generated during a command will use the context's ``color``157 setting when being displayed. :issue:`2193`158- Error message when defining option with invalid name is more descriptive.159 :issue:`2452`160- Refactor code generating default ``--help`` option to deduplicate code.161 :pr:`2563`162- Test ``CLIRunner`` resets patched ``_compat.should_strip_ansi``.163 :issue:`2732`164165166Version 8.1.7167-------------
1100 unmodified lines
deleted:CONTRIBUTING.rst-216 removed
1How to contribute to Click2==========================34Thank you for considering contributing to Click!567Support questions8-----------------910Please don't use the issue tracker for this. The issue tracker is a tool11to address bugs and feature requests in Click itself. Use one of the12following resources for questions about using Click or issues with your13own code:1415- The ``#get-help`` channel on our Discord chat:16 https://discord.gg/pallets17- The mailing list flask@python.org for long term discussion or larger18 issues.19- Ask on `Stack Overflow`_. Search with Google first using:20 ``site:stackoverflow.com python click {search term, exception message, etc.}``2122.. _Stack Overflow: https://stackoverflow.com/questions/tagged/python-click?tab=Frequent232425Reporting issues26----------------2728Include the following information in your post:2930- Describe what you expected to happen.31- If possible, include a `minimal reproducible example`_ to help us32 identify the issue. This also helps check that the issue is not with33 your own code.34- Describe what actually happened. Include the full traceback if there35 was an exception.36- List your Python and Click versions. If possible, check if this37 issue is already fixed in the latest releases or the latest code in38 the repository.3940.. _minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example414243Submitting patches44------------------4546If there is not an open issue for what you want to submit, prefer47opening one for discussion before working on a PR. You can work on any48issue that doesn't have an open PR linked to it or a maintainer assigned49to it. These show up in the sidebar. No need to ask if you can work on50an issue that interests you.5152Include the following in your patch:5354- Use `Black`_ to format your code. This and other tools will run55 automatically if you install `pre-commit`_ using the instructions56 below.57- Include tests if your patch adds or changes code. Make sure the test58 fails without your patch.59- Update any relevant docs pages and docstrings. Docs pages and60 docstrings should be wrapped at 72 characters.61- Add an entry in ``CHANGES.rst``. Use the same style as other62 entries. Also include ``.. versionchanged::`` inline changelogs in63 relevant docstrings.6465.. _Black: https://black.readthedocs.io66.. _pre-commit: https://pre-commit.com676869First time setup70~~~~~~~~~~~~~~~~7172- Download and install the `latest version of git`_.73- Configure git with your `username`_ and `email`_.7475 .. code-block:: text7677 $ git config --global user.name 'your name'78 $ git config --global user.email 'your email'7980- Make sure you have a `GitHub account`_.81- Fork Click to your GitHub account by clicking the `Fork`_ button.82- `Clone`_ the main repository locally.8384 .. code-block:: text8586 $ git clone https://github.com/pallets/click87 $ cd click8889- Add your fork as a remote to push your work to. Replace90 ``{username}`` with your username. This names the remote "fork", the91 default Pallets remote is "origin".9293 .. code-block:: text9495 $ git remote add fork https://github.com/{username}/click9697- Create a virtualenv.9899 .. code-block:: text100101 $ python3 -m venv env102 $ . env/bin/activate103104 On Windows, activating is different.105106 .. code-block:: text107108 > env\Scripts\activate109110- Install the development dependencies, then install Click in111 editable mode.112113 .. code-block:: text114115 $ pip install -r requirements/dev.txt && pip install -e .116117- Install the pre-commit hooks.118119 .. code-block:: text120121 $ pre-commit install122123.. _latest version of git: https://git-scm.com/downloads124.. _username: https://docs.github.com/en/github/using-git/setting-your-username-in-git125.. _email: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address126.. _GitHub account: https://github.com/join127.. _Fork: https://github.com/pallets/click/fork128.. _Clone: https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#step-2-create-a-local-clone-of-your-fork129130131Start coding132~~~~~~~~~~~~133134- Create a branch to identify the issue you would like to work on. If135 you're submitting a bug or documentation fix, branch off of the136 latest ".x" branch.137138 .. code-block:: text139140 $ git fetch origin141 $ git checkout -b your-branch-name origin/8.1.x142143 If you're submitting a feature addition or change, branch off of the144 "main" branch.145146 .. code-block:: text147148 $ git fetch origin149 $ git checkout -b your-branch-name origin/main150151- Using your favorite editor, make your changes,152 `committing as you go`_.153- Include tests that cover any code changes you make. Make sure the154 test fails without your patch. Run the tests as described below.155- Push your commits to your fork on GitHub and156 `create a pull request`_. Link to the issue being addressed with157 ``fixes #123`` in the pull request.158159 .. code-block:: text160161 $ git push --set-upstream fork your-branch-name162163.. _committing as you go: https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes164.. _create a pull request: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request165166167Running the tests168~~~~~~~~~~~~~~~~~169170Run the basic test suite with pytest.171172.. code-block:: text173174 $ pytest175176This runs the tests for the current environment, which is usually177sufficient. CI will run the full suite when you submit your pull178request. You can run the full test suite with tox if you don't want to179wait.180181.. code-block:: text182183 $ tox184185186Running test coverage187~~~~~~~~~~~~~~~~~~~~~188189Generating a report of lines that do not have test coverage can indicate190where to start contributing. Run ``pytest`` using ``coverage`` and191generate a report.192193.. code-block:: text194195 $ pip install coverage196 $ coverage run -m pytest197 $ coverage html198199Open ``htmlcov/index.html`` in your browser to explore the report.200201Read more about `coverage <https://coverage.readthedocs.io>`__.202203204Building the docs205~~~~~~~~~~~~~~~~~206207Build the docs in the ``docs`` directory using Sphinx.208209.. code-block:: text210211 $ cd docs212 $ make html213214Open ``_build/html/index.html`` in your browser to view the docs.215216Read more about `Sphinx <https://www.sphinx-doc.org/en/stable/>`__.
modified:pyproject.toml+120 added-14 removed
1[project]2name = "click"3version = "8.2.0.dev"3version = "8.2.2"4description = "Composable command line interface toolkit"5readme = "README.md"6license = {file = "LICENSE.txt"}6license = "BSD-3-Clause"7license-files = ["LICENSE.txt"]8maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]9classifiers = [10 "Development Status :: 5 - Production/Stable",11 "Intended Audience :: Developers",11 "License :: OSI Approved :: BSD License",12 "Operating System :: OS Independent",13 "Programming Language :: Python",14 "Typing :: Typed",15]16requires-python = ">=3.8"16requires-python = ">=3.10"17dependencies = [18 "colorama; platform_system == 'Windows'",19]2021[project.urls]22Donate = "https://palletsprojects.com/donate"23Documentation = "https://click.palletsprojects.com/"24Changes = "https://click.palletsprojects.com/changes/"24Changes = "https://click.palletsprojects.com/page/changes/"25Source = "https://github.com/pallets/click/"26Chat = "https://discord.gg/pallets"2728[dependency-groups]29dev = [30 "ruff",31 "tox",32 "tox-uv",33]34docs = [35 "myst-parser",36 "pallets-sphinx-themes",37 "sphinx",38 "sphinx-tabs",39 "sphinxcontrib-log-cabinet",40]41docs-auto = [42 "sphinx-autobuild",43]44gha-update = [45 "gha-update ; python_full_version >= '3.12'",46]47pre-commit = [48 "pre-commit",49 "pre-commit-uv",50]51tests = [52 "pytest",53]54typing = [55 "mypy",56 "pyright",57 "pytest",58]5960[build-system]61requires = ["flit_core<4"]62build-backend = "flit_core.buildapi"63
2 unmodified lines
6667[tool.flit.sdist]68include = [69 "docs/",38 "requirements/",70 "tests/",71 "CHANGES.rst",41 "tox.ini",72 "uv.lock"73]74exclude = [75 "docs/_build/",76]7778[tool.uv]79default-groups = ["dev", "pre-commit", "tests", "typing"]8081[tool.pytest.ini_options]82testpaths = ["tests"]83filterwarnings = [84 "error",
5 unmodified lines
9091[tool.coverage.paths]92source = ["src", "*/site-packages"]9394[tool.coverage.report]95exclude_also = [96 "if t.TYPE_CHECKING",97 "raise NotImplementedError",98 ": \\.{3}",99]100101[tool.mypy]61python_version = "3.8"62files = ["src/click", "tests/typing"]102python_version = "3.10"103files = ["src", "tests/typing"]104show_error_codes = true105pretty = true106strict = true107
3 unmodified lines
111]112ignore_missing_imports = true113114[tool.pyright]74pythonVersion = "3.8"75include = ["src/click", "tests/typing"]115pythonVersion = "3.10"116include = ["src", "tests/typing"]117typeCheckingMode = "basic"118119[tool.ruff]120extend-exclude = ["examples/"]
10 unmodified lines
131 "I", # isort132 "UP", # pyupgrade133 "W", # pycodestyle warning134]135ignore = [136 "UP038", # keep isinstance tuple137]138139[tool.ruff.lint.isort]140force-single-line = true141order-by-type = false14299[tool.gha-update]100tag-only = [101 "slsa-framework/slsa-github-generator",143[tool.tox]144env_list = [145 "py3.13", "py3.12", "py3.11", "py3.10",146 "pypy3.11",147 "style",148 "typing",149 "docs",150]151152[tool.tox.env_run_base]153description = "pytest on latest dependency versions"154runner = "uv-venv-lock-runner"155package = "wheel"156wheel_build_env = ".pkg"157constrain_package_deps = true158use_frozen_constraints = true159dependency_groups = ["tests"]160commands = [[161 "pytest", "-v", "--tb=short", "--basetemp={env_tmp_dir}",162 {replace = "posargs", default = [], extend = true},163]]164165[tool.tox.env.style]166description = "run all pre-commit hooks on all files"167dependency_groups = ["pre-commit"]168skip_install = true169commands = [["pre-commit", "run", "--all-files"]]170171[tool.tox.env.typing]172description = "run static type checkers"173dependency_groups = ["typing"]174commands = [175 ["mypy"],176]177178[tool.tox.env.docs]179description = "build docs"180dependency_groups = ["docs"]181commands = [["sphinx-build", "-E", "-W", "-b", "dirhtml", "docs", "docs/_build/dirhtml"]]182183[tool.tox.env.docs-auto]184description = "continuously rebuild docs and start a local server"185dependency_groups = ["docs", "docs-auto"]186commands = [["sphinx-autobuild", "-W", "-b", "dirhtml", "--watch", "src", "docs", "docs/_build/dirhtml"]]187188[tool.tox.env.update-actions]189description = "update GitHub Actions pins"190labels = ["update"]191dependency_groups = ["gha-update"]192skip_install = true193commands = [["gha-update"]]194195[tool.tox.env.update-pre_commit]196description = "update pre-commit pins"197labels = ["update"]198dependency_groups = ["pre-commit"]199skip_install = true200commands = [["pre-commit", "autoupdate", "--freeze", "-j4"]]201202[tool.tox.env.update-requirements]203description = "update uv lock"204labels = ["update"]205dependency_groups = []206no_default_groups = true207skip_install = true208commands = [["uv", "lock", {replace = "posargs", default = ["-U"], extend = true}]]
modified:README.md+11 added-1 removed
1# $ click_1<div align="center"><img src="https://raw.githubusercontent.com/pallets/click/refs/heads/stable/docs/_static/click-name.svg" alt="" height="150"></div>23# Click45Click is a Python package for creating beautiful command line interfaces6in a composable way with as little code as necessary. It's the "Command7Line Interface Creation Kit". It's highly configurable but comes with8sensible defaults out of the box.
42 unmodified lines
51allow the maintainers to devote more time to the projects, [please52donate today][].5354[please donate today]: https://palletsprojects.com/donate5556## Contributing5758See our [detailed contributing documentation][contrib] for many ways to59contribute, including reporting issues, requesting features, asking or answering60questions, and making PRs.6162[contrib]: https://palletsprojects.com/contributing/
deleted:tox.ini-61 removed
1[tox]2envlist =3 py3{13,12,11,10,9,8}4 pypy3105 style6 typing7 docs8skip_missing_interpreters = true910[testenv]11package = wheel12wheel_build_env = .pkg13constrain_package_deps = true14use_frozen_constraints = true15deps = -r requirements/tests.txt16commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs}1718[testenv:style]19deps = pre-commit20skip_install = true21commands = pre-commit run --all-files2223[testenv:typing]24deps = -r requirements/typing.txt25commands =26 mypy --platform linux27 mypy --platform darwin28 mypy --platform win3229 pyright tests/typing --pythonplatform Linux30 pyright tests/typing --pythonplatform Darwin31 pyright tests/typing --pythonplatform Windows32 pyright --verifytypes click --ignoreexternal --pythonplatform Linux33 pyright --verifytypes click --ignoreexternal --pythonplatform Darwin34 pyright --verifytypes click --ignoreexternal --pythonplatform Windows3536[testenv:docs]37deps = -r requirements/docs.txt38commands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml3940[testenv:update-actions]41labels = update42deps = gha-update43commands = gha-update4445[testenv:update-pre_commit]46labels = update47deps = pre-commit48skip_install = true49commands = pre-commit autoupdate -j45051[testenv:update-requirements]52labels = update53deps = pip-tools54skip_install = true55change_dir = requirements56commands =57 pip-compile build.in -q {posargs:-U}58 pip-compile docs.in -q {posargs:-U}59 pip-compile tests.in -q {posargs:-U}60 pip-compile typing.in -q {posargs:-U}61 pip-compile dev.in -q {posargs:-U}
added:uv.lock+1222 added
1version = 12revision = 23requires-python = ">=3.10"4resolution-markers = [5 "python_full_version >= '3.12'",6 "python_full_version == '3.11.*'",7 "python_full_version < '3.11'",8]910[[package]]11name = "alabaster"12version = "1.0.0"13source = { registry = "https://pypi.org/simple" }14sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210, upload-time = "2024-07-26T18:15:03.762Z" }15wheels = [16 { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929, upload-time = "2024-07-26T18:15:02.05Z" },17]1819[[package]]20name = "anyio"21version = "4.9.0"22source = { registry = "https://pypi.org/simple" }23dependencies = [24 { name = "exceptiongroup", marker = "python_full_version < '3.11'" },25 { name = "idna" },26 { name = "sniffio" },27 { name = "typing-extensions", marker = "python_full_version < '3.13'" },28]29sdist = { url = "https://files.pythonhosted.org/packages/95/7d/4c1bd541d4dffa1b52bd83fb8527089e097a106fc90b467a7313b105f840/anyio-4.9.0.tar.gz", hash = "sha256:673c0c244e15788651a4ff38710fea9675823028a6f08a5eda409e0c9840a028", size = 190949, upload-time = "2025-03-17T00:02:54.77Z" }30wheels = [31 { url = "https://files.pythonhosted.org/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl", hash = "sha256:9f76d541cad6e36af7beb62e978876f3b41e3e04f2c1fbf0884604c0a9c4d93c", size = 100916, upload-time = "2025-03-17T00:02:52.713Z" },32]3334[[package]]35name = "babel"36version = "2.17.0"37source = { registry = "https://pypi.org/simple" }38sdist = { url = "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d", size = 9951852, upload-time = "2025-02-01T15:17:41.026Z" }39wheels = [40 { url = "https://files.pythonhosted.org/packages/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2", size = 10182537, upload-time = "2025-02-01T15:17:37.39Z" },41]4243[[package]]44name = "cachetools"45version = "6.0.0"46source = { registry = "https://pypi.org/simple" }47sdist = { url = "https://files.pythonhosted.org/packages/c0/b0/f539a1ddff36644c28a61490056e5bae43bd7386d9f9c69beae2d7e7d6d1/cachetools-6.0.0.tar.gz", hash = "sha256:f225782b84438f828328fc2ad74346522f27e5b1440f4e9fd18b20ebfd1aa2cf", size = 30160, upload-time = "2025-05-23T20:01:13.076Z" }48wheels = [49 { url = "https://files.pythonhosted.org/packages/6a/c3/8bb087c903c95a570015ce84e0c23ae1d79f528c349cbc141b5c4e250293/cachetools-6.0.0-py3-none-any.whl", hash = "sha256:82e73ba88f7b30228b5507dce1a1f878498fc669d972aef2dde4f3a3c24f103e", size = 10964, upload-time = "2025-05-23T20:01:11.323Z" },50]5152[[package]]53name = "certifi"54version = "2025.4.26"55source = { registry = "https://pypi.org/simple" }56sdist = { url = "https://files.pythonhosted.org/packages/e8/9e/c05b3920a3b7d20d3d3310465f50348e5b3694f4f88c6daf736eef3024c4/certifi-2025.4.26.tar.gz", hash = "sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6", size = 160705, upload-time = "2025-04-26T02:12:29.51Z" }57wheels = [58 { url = "https://files.pythonhosted.org/packages/4a/7e/3db2bd1b1f9e95f7cddca6d6e75e2f2bd9f51b1246e546d88addca0106bd/certifi-2025.4.26-py3-none-any.whl", hash = "sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3", size = 159618, upload-time = "2025-04-26T02:12:27.662Z" },59]6061[[package]]62name = "cfgv"63version = "3.4.0"64source = { registry = "https://pypi.org/simple" }65sdist = { url = "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560", size = 7114, upload-time = "2023-08-12T20:38:17.776Z" }66wheels = [67 { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249, upload-time = "2023-08-12T20:38:16.269Z" },68]6970[[package]]71name = "chardet"72version = "5.2.0"73source = { registry = "https://pypi.org/simple" }74sdist = { url = "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz", hash = "sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7", size = 2069618, upload-time = "2023-08-01T19:23:02.662Z" }75wheels = [76 { url = "https://files.pythonhosted.org/packages/38/6f/f5fbc992a329ee4e0f288c1fe0e2ad9485ed064cac731ed2fe47dcc38cbf/chardet-5.2.0-py3-none-any.whl", hash = "sha256:e1cf59446890a00105fe7b7912492ea04b6e6f06d4b742b2c788469e34c82970", size = 199385, upload-time = "2023-08-01T19:23:00.661Z" },77]7879[[package]]80name = "charset-normalizer"81version = "3.4.2"82source = { registry = "https://pypi.org/simple" }83sdist = { url = "https://files.pythonhosted.org/packages/e4/33/89c2ced2b67d1c2a61c19c6751aa8902d46ce3dacb23600a283619f5a12d/charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63", size = 126367, upload-time = "2025-05-02T08:34:42.01Z" }84wheels = [85 { url = "https://files.pythonhosted.org/packages/95/28/9901804da60055b406e1a1c5ba7aac1276fb77f1dde635aabfc7fd84b8ab/charset_normalizer-3.4.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7c48ed483eb946e6c04ccbe02c6b4d1d48e51944b6db70f697e089c193404941", size = 201818, upload-time = "2025-05-02T08:31:46.725Z" },86 { url = "https://files.pythonhosted.org/packages/d9/9b/892a8c8af9110935e5adcbb06d9c6fe741b6bb02608c6513983048ba1a18/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2d318c11350e10662026ad0eb71bb51c7812fc8590825304ae0bdd4ac283acd", size = 144649, upload-time = "2025-05-02T08:31:48.889Z" },87 { url = "https://files.pythonhosted.org/packages/7b/a5/4179abd063ff6414223575e008593861d62abfc22455b5d1a44995b7c101/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9cbfacf36cb0ec2897ce0ebc5d08ca44213af24265bd56eca54bee7923c48fd6", size = 155045, upload-time = "2025-05-02T08:31:50.757Z" },88 { url = "https://files.pythonhosted.org/packages/3b/95/bc08c7dfeddd26b4be8c8287b9bb055716f31077c8b0ea1cd09553794665/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18dd2e350387c87dabe711b86f83c9c78af772c748904d372ade190b5c7c9d4d", size = 147356, upload-time = "2025-05-02T08:31:52.634Z" },89 { url = "https://files.pythonhosted.org/packages/a8/2d/7a5b635aa65284bf3eab7653e8b4151ab420ecbae918d3e359d1947b4d61/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8075c35cd58273fee266c58c0c9b670947c19df5fb98e7b66710e04ad4e9ff86", size = 149471, upload-time = "2025-05-02T08:31:56.207Z" },90 { url = "https://files.pythonhosted.org/packages/ae/38/51fc6ac74251fd331a8cfdb7ec57beba8c23fd5493f1050f71c87ef77ed0/charset_normalizer-3.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bf4545e3b962767e5c06fe1738f951f77d27967cb2caa64c28be7c4563e162c", size = 151317, upload-time = "2025-05-02T08:31:57.613Z" },91 { url = "https://files.pythonhosted.org/packages/b7/17/edee1e32215ee6e9e46c3e482645b46575a44a2d72c7dfd49e49f60ce6bf/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:7a6ab32f7210554a96cd9e33abe3ddd86732beeafc7a28e9955cdf22ffadbab0", size = 146368, upload-time = "2025-05-02T08:31:59.468Z" },92 { url = "https://files.pythonhosted.org/packages/26/2c/ea3e66f2b5f21fd00b2825c94cafb8c326ea6240cd80a91eb09e4a285830/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:b33de11b92e9f75a2b545d6e9b6f37e398d86c3e9e9653c4864eb7e89c5773ef", size = 154491, upload-time = "2025-05-02T08:32:01.219Z" },93 { url = "https://files.pythonhosted.org/packages/52/47/7be7fa972422ad062e909fd62460d45c3ef4c141805b7078dbab15904ff7/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:8755483f3c00d6c9a77f490c17e6ab0c8729e39e6390328e42521ef175380ae6", size = 157695, upload-time = "2025-05-02T08:32:03.045Z" },94 { url = "https://files.pythonhosted.org/packages/2f/42/9f02c194da282b2b340f28e5fb60762de1151387a36842a92b533685c61e/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:68a328e5f55ec37c57f19ebb1fdc56a248db2e3e9ad769919a58672958e8f366", size = 154849, upload-time = "2025-05-02T08:32:04.651Z" },95 { url = "https://files.pythonhosted.org/packages/67/44/89cacd6628f31fb0b63201a618049be4be2a7435a31b55b5eb1c3674547a/charset_normalizer-3.4.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:21b2899062867b0e1fde9b724f8aecb1af14f2778d69aacd1a5a1853a597a5db", size = 150091, upload-time = "2025-05-02T08:32:06.719Z" },96 { url = "https://files.pythonhosted.org/packages/1f/79/4b8da9f712bc079c0f16b6d67b099b0b8d808c2292c937f267d816ec5ecc/charset_normalizer-3.4.2-cp310-cp310-win32.whl", hash = "sha256:e8082b26888e2f8b36a042a58307d5b917ef2b1cacab921ad3323ef91901c71a", size = 98445, upload-time = "2025-05-02T08:32:08.66Z" },97 { url = "https://files.pythonhosted.org/packages/7d/d7/96970afb4fb66497a40761cdf7bd4f6fca0fc7bafde3a84f836c1f57a926/charset_normalizer-3.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:f69a27e45c43520f5487f27627059b64aaf160415589230992cec34c5e18a509", size = 105782, upload-time = "2025-05-02T08:32:10.46Z" },98 { url = "https://files.pythonhosted.org/packages/05/85/4c40d00dcc6284a1c1ad5de5e0996b06f39d8232f1031cd23c2f5c07ee86/charset_normalizer-3.4.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:be1e352acbe3c78727a16a455126d9ff83ea2dfdcbc83148d2982305a04714c2", size = 198794, upload-time = "2025-05-02T08:32:11.945Z" },99 { url = "https://files.pythonhosted.org/packages/41/d9/7a6c0b9db952598e97e93cbdfcb91bacd89b9b88c7c983250a77c008703c/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa88ca0b1932e93f2d961bf3addbb2db902198dca337d88c89e1559e066e7645", size = 142846, upload-time = "2025-05-02T08:32:13.946Z" },100 { url = "https://files.pythonhosted.org/packages/66/82/a37989cda2ace7e37f36c1a8ed16c58cf48965a79c2142713244bf945c89/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d524ba3f1581b35c03cb42beebab4a13e6cdad7b36246bd22541fa585a56cccd", size = 153350, upload-time = "2025-05-02T08:32:15.873Z" },101 { url = "https://files.pythonhosted.org/packages/df/68/a576b31b694d07b53807269d05ec3f6f1093e9545e8607121995ba7a8313/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28a1005facc94196e1fb3e82a3d442a9d9110b8434fc1ded7a24a2983c9888d8", size = 145657, upload-time = "2025-05-02T08:32:17.283Z" },102 { url = "https://files.pythonhosted.org/packages/92/9b/ad67f03d74554bed3aefd56fe836e1623a50780f7c998d00ca128924a499/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fdb20a30fe1175ecabed17cbf7812f7b804b8a315a25f24678bcdf120a90077f", size = 147260, upload-time = "2025-05-02T08:32:18.807Z" },103 { url = "https://files.pythonhosted.org/packages/a6/e6/8aebae25e328160b20e31a7e9929b1578bbdc7f42e66f46595a432f8539e/charset_normalizer-3.4.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0f5d9ed7f254402c9e7d35d2f5972c9bbea9040e99cd2861bd77dc68263277c7", size = 149164, upload-time = "2025-05-02T08:32:20.333Z" },104 { url = "https://files.pythonhosted.org/packages/8b/f2/b3c2f07dbcc248805f10e67a0262c93308cfa149a4cd3d1fe01f593e5fd2/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:efd387a49825780ff861998cd959767800d54f8308936b21025326de4b5a42b9", size = 144571, upload-time = "2025-05-02T08:32:21.86Z" },105 { url = "https://files.pythonhosted.org/packages/60/5b/c3f3a94bc345bc211622ea59b4bed9ae63c00920e2e8f11824aa5708e8b7/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:f0aa37f3c979cf2546b73e8222bbfa3dc07a641585340179d768068e3455e544", size = 151952, upload-time = "2025-05-02T08:32:23.434Z" },106 { url = "https://files.pythonhosted.org/packages/e2/4d/ff460c8b474122334c2fa394a3f99a04cf11c646da895f81402ae54f5c42/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:e70e990b2137b29dc5564715de1e12701815dacc1d056308e2b17e9095372a82", size = 155959, upload-time = "2025-05-02T08:32:24.993Z" },107 { url = "https://files.pythonhosted.org/packages/a2/2b/b964c6a2fda88611a1fe3d4c400d39c66a42d6c169c924818c848f922415/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:0c8c57f84ccfc871a48a47321cfa49ae1df56cd1d965a09abe84066f6853b9c0", size = 153030, upload-time = "2025-05-02T08:32:26.435Z" },108 { url = "https://files.pythonhosted.org/packages/59/2e/d3b9811db26a5ebf444bc0fa4f4be5aa6d76fc6e1c0fd537b16c14e849b6/charset_normalizer-3.4.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6b66f92b17849b85cad91259efc341dce9c1af48e2173bf38a85c6329f1033e5", size = 148015, upload-time = "2025-05-02T08:32:28.376Z" },109 { url = "https://files.pythonhosted.org/packages/90/07/c5fd7c11eafd561bb51220d600a788f1c8d77c5eef37ee49454cc5c35575/charset_normalizer-3.4.2-cp311-cp311-win32.whl", hash = "sha256:daac4765328a919a805fa5e2720f3e94767abd632ae410a9062dff5412bae65a", size = 98106, upload-time = "2025-05-02T08:32:30.281Z" },110 { url = "https://files.pythonhosted.org/packages/a8/05/5e33dbef7e2f773d672b6d79f10ec633d4a71cd96db6673625838a4fd532/charset_normalizer-3.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:e53efc7c7cee4c1e70661e2e112ca46a575f90ed9ae3fef200f2a25e954f4b28", size = 105402, upload-time = "2025-05-02T08:32:32.191Z" },111 { url = "https://files.pythonhosted.org/packages/d7/a4/37f4d6035c89cac7930395a35cc0f1b872e652eaafb76a6075943754f095/charset_normalizer-3.4.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0c29de6a1a95f24b9a1aa7aefd27d2487263f00dfd55a77719b530788f75cff7", size = 199936, upload-time = "2025-05-02T08:32:33.712Z" },112 { url = "https://files.pythonhosted.org/packages/ee/8a/1a5e33b73e0d9287274f899d967907cd0bf9c343e651755d9307e0dbf2b3/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cddf7bd982eaa998934a91f69d182aec997c6c468898efe6679af88283b498d3", size = 143790, upload-time = "2025-05-02T08:32:35.768Z" },113 { url = "https://files.pythonhosted.org/packages/66/52/59521f1d8e6ab1482164fa21409c5ef44da3e9f653c13ba71becdd98dec3/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fcbe676a55d7445b22c10967bceaaf0ee69407fbe0ece4d032b6eb8d4565982a", size = 153924, upload-time = "2025-05-02T08:32:37.284Z" },114 { url = "https://files.pythonhosted.org/packages/86/2d/fb55fdf41964ec782febbf33cb64be480a6b8f16ded2dbe8db27a405c09f/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d41c4d287cfc69060fa91cae9683eacffad989f1a10811995fa309df656ec214", size = 146626, upload-time = "2025-05-02T08:32:38.803Z" },115 { url = "https://files.pythonhosted.org/packages/8c/73/6ede2ec59bce19b3edf4209d70004253ec5f4e319f9a2e3f2f15601ed5f7/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4e594135de17ab3866138f496755f302b72157d115086d100c3f19370839dd3a", size = 148567, upload-time = "2025-05-02T08:32:40.251Z" },116 { url = "https://files.pythonhosted.org/packages/09/14/957d03c6dc343c04904530b6bef4e5efae5ec7d7990a7cbb868e4595ee30/charset_normalizer-3.4.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf713fe9a71ef6fd5adf7a79670135081cd4431c2943864757f0fa3a65b1fafd", size = 150957, upload-time = "2025-05-02T08:32:41.705Z" },117 { url = "https://files.pythonhosted.org/packages/0d/c8/8174d0e5c10ccebdcb1b53cc959591c4c722a3ad92461a273e86b9f5a302/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a370b3e078e418187da8c3674eddb9d983ec09445c99a3a263c2011993522981", size = 145408, upload-time = "2025-05-02T08:32:43.709Z" },118 { url = "https://files.pythonhosted.org/packages/58/aa/8904b84bc8084ac19dc52feb4f5952c6df03ffb460a887b42615ee1382e8/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a955b438e62efdf7e0b7b52a64dc5c3396e2634baa62471768a64bc2adb73d5c", size = 153399, upload-time = "2025-05-02T08:32:46.197Z" },119 { url = "https://files.pythonhosted.org/packages/c2/26/89ee1f0e264d201cb65cf054aca6038c03b1a0c6b4ae998070392a3ce605/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:7222ffd5e4de8e57e03ce2cef95a4c43c98fcb72ad86909abdfc2c17d227fc1b", size = 156815, upload-time = "2025-05-02T08:32:48.105Z" },120 { url = "https://files.pythonhosted.org/packages/fd/07/68e95b4b345bad3dbbd3a8681737b4338ff2c9df29856a6d6d23ac4c73cb/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:bee093bf902e1d8fc0ac143c88902c3dfc8941f7ea1d6a8dd2bcb786d33db03d", size = 154537, upload-time = "2025-05-02T08:32:49.719Z" },121 { url = "https://files.pythonhosted.org/packages/77/1a/5eefc0ce04affb98af07bc05f3bac9094513c0e23b0562d64af46a06aae4/charset_normalizer-3.4.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dedb8adb91d11846ee08bec4c8236c8549ac721c245678282dcb06b221aab59f", size = 149565, upload-time = "2025-05-02T08:32:51.404Z" },122 { url = "https://files.pythonhosted.org/packages/37/a0/2410e5e6032a174c95e0806b1a6585eb21e12f445ebe239fac441995226a/charset_normalizer-3.4.2-cp312-cp312-win32.whl", hash = "sha256:db4c7bf0e07fc3b7d89ac2a5880a6a8062056801b83ff56d8464b70f65482b6c", size = 98357, upload-time = "2025-05-02T08:32:53.079Z" },123 { url = "https://files.pythonhosted.org/packages/6c/4f/c02d5c493967af3eda9c771ad4d2bbc8df6f99ddbeb37ceea6e8716a32bc/charset_normalizer-3.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:5a9979887252a82fefd3d3ed2a8e3b937a7a809f65dcb1e068b090e165bbe99e", size = 105776, upload-time = "2025-05-02T08:32:54.573Z" },124 { url = "https://files.pythonhosted.org/packages/ea/12/a93df3366ed32db1d907d7593a94f1fe6293903e3e92967bebd6950ed12c/charset_normalizer-3.4.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:926ca93accd5d36ccdabd803392ddc3e03e6d4cd1cf17deff3b989ab8e9dbcf0", size = 199622, upload-time = "2025-05-02T08:32:56.363Z" },125 { url = "https://files.pythonhosted.org/packages/04/93/bf204e6f344c39d9937d3c13c8cd5bbfc266472e51fc8c07cb7f64fcd2de/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eba9904b0f38a143592d9fc0e19e2df0fa2e41c3c3745554761c5f6447eedabf", size = 143435, upload-time = "2025-05-02T08:32:58.551Z" },126 { url = "https://files.pythonhosted.org/packages/22/2a/ea8a2095b0bafa6c5b5a55ffdc2f924455233ee7b91c69b7edfcc9e02284/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3fddb7e2c84ac87ac3a947cb4e66d143ca5863ef48e4a5ecb83bd48619e4634e", size = 153653, upload-time = "2025-05-02T08:33:00.342Z" },127 { url = "https://files.pythonhosted.org/packages/b6/57/1b090ff183d13cef485dfbe272e2fe57622a76694061353c59da52c9a659/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98f862da73774290f251b9df8d11161b6cf25b599a66baf087c1ffe340e9bfd1", size = 146231, upload-time = "2025-05-02T08:33:02.081Z" },128 { url = "https://files.pythonhosted.org/packages/e2/28/ffc026b26f441fc67bd21ab7f03b313ab3fe46714a14b516f931abe1a2d8/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c9379d65defcab82d07b2a9dfbfc2e95bc8fe0ebb1b176a3190230a3ef0e07c", size = 148243, upload-time = "2025-05-02T08:33:04.063Z" },129 { url = "https://files.pythonhosted.org/packages/c0/0f/9abe9bd191629c33e69e47c6ef45ef99773320e9ad8e9cb08b8ab4a8d4cb/charset_normalizer-3.4.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e635b87f01ebc977342e2697d05b56632f5f879a4f15955dfe8cef2448b51691", size = 150442, upload-time = "2025-05-02T08:33:06.418Z" },130 { url = "https://files.pythonhosted.org/packages/67/7c/a123bbcedca91d5916c056407f89a7f5e8fdfce12ba825d7d6b9954a1a3c/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1c95a1e2902a8b722868587c0e1184ad5c55631de5afc0eb96bc4b0d738092c0", size = 145147, upload-time = "2025-05-02T08:33:08.183Z" },131 { url = "https://files.pythonhosted.org/packages/ec/fe/1ac556fa4899d967b83e9893788e86b6af4d83e4726511eaaad035e36595/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ef8de666d6179b009dce7bcb2ad4c4a779f113f12caf8dc77f0162c29d20490b", size = 153057, upload-time = "2025-05-02T08:33:09.986Z" },132 { url = "https://files.pythonhosted.org/packages/2b/ff/acfc0b0a70b19e3e54febdd5301a98b72fa07635e56f24f60502e954c461/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:32fc0341d72e0f73f80acb0a2c94216bd704f4f0bce10aedea38f30502b271ff", size = 156454, upload-time = "2025-05-02T08:33:11.814Z" },133 { url = "https://files.pythonhosted.org/packages/92/08/95b458ce9c740d0645feb0e96cea1f5ec946ea9c580a94adfe0b617f3573/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:289200a18fa698949d2b39c671c2cc7a24d44096784e76614899a7ccf2574b7b", size = 154174, upload-time = "2025-05-02T08:33:13.707Z" },134 { url = "https://files.pythonhosted.org/packages/78/be/8392efc43487ac051eee6c36d5fbd63032d78f7728cb37aebcc98191f1ff/charset_normalizer-3.4.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4a476b06fbcf359ad25d34a057b7219281286ae2477cc5ff5e3f70a246971148", size = 149166, upload-time = "2025-05-02T08:33:15.458Z" },135 { url = "https://files.pythonhosted.org/packages/44/96/392abd49b094d30b91d9fbda6a69519e95802250b777841cf3bda8fe136c/charset_normalizer-3.4.2-cp313-cp313-win32.whl", hash = "sha256:aaeeb6a479c7667fbe1099af9617c83aaca22182d6cf8c53966491a0f1b7ffb7", size = 98064, upload-time = "2025-05-02T08:33:17.06Z" },136 { url = "https://files.pythonhosted.org/packages/e9/b0/0200da600134e001d91851ddc797809e2fe0ea72de90e09bec5a2fbdaccb/charset_normalizer-3.4.2-cp313-cp313-win_amd64.whl", hash = "sha256:aa6af9e7d59f9c12b33ae4e9450619cf2488e2bbe9b44030905877f0b2324980", size = 105641, upload-time = "2025-05-02T08:33:18.753Z" },137 { url = "https://files.pythonhosted.org/packages/20/94/c5790835a017658cbfabd07f3bfb549140c3ac458cfc196323996b10095a/charset_normalizer-3.4.2-py3-none-any.whl", hash = "sha256:7f56930ab0abd1c45cd15be65cc741c28b1c9a34876ce8c17a2fa107810c0af0", size = 52626, upload-time = "2025-05-02T08:34:40.053Z" },138]139140[[package]]141name = "click"142version = "8.2.2"143source = { editable = "." }144dependencies = [145 { name = "colorama", marker = "sys_platform == 'win32'" },146]147148[package.dev-dependencies]149dev = [150 { name = "ruff" },151 { name = "tox" },152 { name = "tox-uv" },153]154docs = [155 { name = "myst-parser" },156 { name = "pallets-sphinx-themes" },157 { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },158 { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },159 { name = "sphinx-tabs" },160 { name = "sphinxcontrib-log-cabinet" },161]162docs-auto = [163 { name = "sphinx-autobuild" },164]165gha-update = [166 { name = "gha-update", marker = "python_full_version >= '3.12'" },167]168pre-commit = [169 { name = "pre-commit" },170 { name = "pre-commit-uv" },171]172tests = [173 { name = "pytest" },174]175typing = [176 { name = "mypy" },177 { name = "pyright" },178 { name = "pytest" },179]180181[package.metadata]182requires-dist = [{ name = "colorama", marker = "sys_platform == 'win32'" }]183184[package.metadata.requires-dev]185dev = [186 { name = "ruff" },187 { name = "tox" },188 { name = "tox-uv" },189]190docs = [191 { name = "myst-parser" },192 { name = "pallets-sphinx-themes" },193 { name = "sphinx" },194 { name = "sphinx-tabs" },195 { name = "sphinxcontrib-log-cabinet" },196]197docs-auto = [{ name = "sphinx-autobuild" }]198gha-update = [{ name = "gha-update", marker = "python_full_version >= '3.12'" }]199pre-commit = [200 { name = "pre-commit" },201 { name = "pre-commit-uv" },202]203tests = [{ name = "pytest" }]204typing = [205 { name = "mypy" },206 { name = "pyright" },207 { name = "pytest" },208]209210[[package]]211name = "colorama"212version = "0.4.6"213source = { registry = "https://pypi.org/simple" }214sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }215wheels = [216 { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },217]218219[[package]]220name = "distlib"221version = "0.3.9"222source = { registry = "https://pypi.org/simple" }223sdist = { url = "https://files.pythonhosted.org/packages/0d/dd/1bec4c5ddb504ca60fc29472f3d27e8d4da1257a854e1d96742f15c1d02d/distlib-0.3.9.tar.gz", hash = "sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403", size = 613923, upload-time = "2024-10-09T18:35:47.551Z" }224wheels = [225 { url = "https://files.pythonhosted.org/packages/91/a1/cf2472db20f7ce4a6be1253a81cfdf85ad9c7885ffbed7047fb72c24cf87/distlib-0.3.9-py2.py3-none-any.whl", hash = "sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87", size = 468973, upload-time = "2024-10-09T18:35:44.272Z" },226]227228[[package]]229name = "docutils"230version = "0.21.2"231source = { registry = "https://pypi.org/simple" }232sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444, upload-time = "2024-04-23T18:57:18.24Z" }233wheels = [234 { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408, upload-time = "2024-04-23T18:57:14.835Z" },235]236237[[package]]238name = "exceptiongroup"239version = "1.3.0"240source = { registry = "https://pypi.org/simple" }241dependencies = [242 { name = "typing-extensions", marker = "python_full_version < '3.11'" },243]244sdist = { url = "https://files.pythonhosted.org/packages/0b/9f/a65090624ecf468cdca03533906e7c69ed7588582240cfe7cc9e770b50eb/exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88", size = 29749, upload-time = "2025-05-10T17:42:51.123Z" }245wheels = [246 { url = "https://files.pythonhosted.org/packages/36/f4/c6e662dade71f56cd2f3735141b265c3c79293c109549c1e6933b0651ffc/exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10", size = 16674, upload-time = "2025-05-10T17:42:49.33Z" },247]248249[[package]]250name = "filelock"251version = "3.18.0"252source = { registry = "https://pypi.org/simple" }253sdist = { url = "https://files.pythonhosted.org/packages/0a/10/c23352565a6544bdc5353e0b15fc1c563352101f30e24bf500207a54df9a/filelock-3.18.0.tar.gz", hash = "sha256:adbc88eabb99d2fec8c9c1b229b171f18afa655400173ddc653d5d01501fb9f2", size = 18075, upload-time = "2025-03-14T07:11:40.47Z" }254wheels = [255 { url = "https://files.pythonhosted.org/packages/4d/36/2a115987e2d8c300a974597416d9de88f2444426de9571f4b59b2cca3acc/filelock-3.18.0-py3-none-any.whl", hash = "sha256:c401f4f8377c4464e6db25fff06205fd89bdd83b65eb0488ed1b160f780e21de", size = 16215, upload-time = "2025-03-14T07:11:39.145Z" },256]257258[[package]]259name = "gha-update"260version = "0.1.0"261source = { registry = "https://pypi.org/simple" }262dependencies = [263 { name = "click", marker = "python_full_version >= '3.12'" },264 { name = "httpx", marker = "python_full_version >= '3.12'" },265]266sdist = { url = "https://files.pythonhosted.org/packages/d5/ac/f1b6699a529bd298a777199861a8232590bb612eac92e15bf1033134f123/gha_update-0.1.0.tar.gz", hash = "sha256:8c0f55ed7bdc11fb061d67984814fd642bd3a1872028e34c15c913cd59202d53", size = 3345, upload-time = "2024-08-23T20:58:42.478Z" }267wheels = [268 { url = "https://files.pythonhosted.org/packages/98/06/832338d1b5f82f17e1f4985146d81050cd2709ea54dab3f15b343ad227cc/gha_update-0.1.0-py3-none-any.whl", hash = "sha256:ec110088749eed66b5f55cc7f15f41a6af037446a5ac6a435b0768a57d52e087", size = 4513, upload-time = "2024-08-23T20:58:41.364Z" },269]270271[[package]]272name = "h11"273version = "0.16.0"274source = { registry = "https://pypi.org/simple" }275sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" }276wheels = [277 { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" },278]279280[[package]]281name = "httpcore"282version = "1.0.9"283source = { registry = "https://pypi.org/simple" }284dependencies = [285 { name = "certifi", marker = "python_full_version >= '3.12'" },286 { name = "h11", marker = "python_full_version >= '3.12'" },287]288sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" }289wheels = [290 { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" },291]292293[[package]]294name = "httpx"295version = "0.28.1"296source = { registry = "https://pypi.org/simple" }297dependencies = [298 { name = "anyio", marker = "python_full_version >= '3.12'" },299 { name = "certifi", marker = "python_full_version >= '3.12'" },300 { name = "httpcore", marker = "python_full_version >= '3.12'" },301 { name = "idna", marker = "python_full_version >= '3.12'" },302]303sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" }304wheels = [305 { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" },306]307308[[package]]309name = "identify"310version = "2.6.12"311source = { registry = "https://pypi.org/simple" }312sdist = { url = "https://files.pythonhosted.org/packages/a2/88/d193a27416618628a5eea64e3223acd800b40749a96ffb322a9b55a49ed1/identify-2.6.12.tar.gz", hash = "sha256:d8de45749f1efb108badef65ee8386f0f7bb19a7f26185f74de6367bffbaf0e6", size = 99254, upload-time = "2025-05-23T20:37:53.3Z" }313wheels = [314 { url = "https://files.pythonhosted.org/packages/7a/cd/18f8da995b658420625f7ef13f037be53ae04ec5ad33f9b718240dcfd48c/identify-2.6.12-py2.py3-none-any.whl", hash = "sha256:ad9672d5a72e0d2ff7c5c8809b62dfa60458626352fb0eb7b55e69bdc45334a2", size = 99145, upload-time = "2025-05-23T20:37:51.495Z" },315]316317[[package]]318name = "idna"319version = "3.10"320source = { registry = "https://pypi.org/simple" }321sdist = { url = "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", size = 190490, upload-time = "2024-09-15T18:07:39.745Z" }322wheels = [323 { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442, upload-time = "2024-09-15T18:07:37.964Z" },324]325326[[package]]327name = "imagesize"328version = "1.4.1"329source = { registry = "https://pypi.org/simple" }330sdist = { url = "https://files.pythonhosted.org/packages/a7/84/62473fb57d61e31fef6e36d64a179c8781605429fd927b5dd608c997be31/imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a", size = 1280026, upload-time = "2022-07-01T12:21:05.687Z" }331wheels = [332 { url = "https://files.pythonhosted.org/packages/ff/62/85c4c919272577931d407be5ba5d71c20f0b616d31a0befe0ae45bb79abd/imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", size = 8769, upload-time = "2022-07-01T12:21:02.467Z" },333]334335[[package]]336name = "iniconfig"337version = "2.1.0"338source = { registry = "https://pypi.org/simple" }339sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" }340wheels = [341 { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" },342]343344[[package]]345name = "jinja2"346version = "3.1.6"347source = { registry = "https://pypi.org/simple" }348dependencies = [349 { name = "markupsafe" },350]351sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" }352wheels = [353 { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" },354]355356[[package]]357name = "markdown-it-py"358version = "3.0.0"359source = { registry = "https://pypi.org/simple" }360dependencies = [361 { name = "mdurl" },362]363sdist = { url = "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb", size = 74596, upload-time = "2023-06-03T06:41:14.443Z" }364wheels = [365 { url = "https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1", size = 87528, upload-time = "2023-06-03T06:41:11.019Z" },366]367368[[package]]369name = "markupsafe"370version = "3.0.2"371source = { registry = "https://pypi.org/simple" }372sdist = { url = "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz", hash = "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", size = 20537, upload-time = "2024-10-18T15:21:54.129Z" }373wheels = [374 { url = "https://files.pythonhosted.org/packages/04/90/d08277ce111dd22f77149fd1a5d4653eeb3b3eaacbdfcbae5afb2600eebd/MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8", size = 14357, upload-time = "2024-10-18T15:20:51.44Z" },375 { url = "https://files.pythonhosted.org/packages/04/e1/6e2194baeae0bca1fae6629dc0cbbb968d4d941469cbab11a3872edff374/MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158", size = 12393, upload-time = "2024-10-18T15:20:52.426Z" },376 { url = "https://files.pythonhosted.org/packages/1d/69/35fa85a8ece0a437493dc61ce0bb6d459dcba482c34197e3efc829aa357f/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579", size = 21732, upload-time = "2024-10-18T15:20:53.578Z" },377 { url = "https://files.pythonhosted.org/packages/22/35/137da042dfb4720b638d2937c38a9c2df83fe32d20e8c8f3185dbfef05f7/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d", size = 20866, upload-time = "2024-10-18T15:20:55.06Z" },378 { url = "https://files.pythonhosted.org/packages/29/28/6d029a903727a1b62edb51863232152fd335d602def598dade38996887f0/MarkupSafe-3.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb", size = 20964, upload-time = "2024-10-18T15:20:55.906Z" },379 { url = "https://files.pythonhosted.org/packages/cc/cd/07438f95f83e8bc028279909d9c9bd39e24149b0d60053a97b2bc4f8aa51/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b", size = 21977, upload-time = "2024-10-18T15:20:57.189Z" },380 { url = "https://files.pythonhosted.org/packages/29/01/84b57395b4cc062f9c4c55ce0df7d3108ca32397299d9df00fedd9117d3d/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c", size = 21366, upload-time = "2024-10-18T15:20:58.235Z" },381 { url = "https://files.pythonhosted.org/packages/bd/6e/61ebf08d8940553afff20d1fb1ba7294b6f8d279df9fd0c0db911b4bbcfd/MarkupSafe-3.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171", size = 21091, upload-time = "2024-10-18T15:20:59.235Z" },382 { url = "https://files.pythonhosted.org/packages/11/23/ffbf53694e8c94ebd1e7e491de185124277964344733c45481f32ede2499/MarkupSafe-3.0.2-cp310-cp310-win32.whl", hash = "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50", size = 15065, upload-time = "2024-10-18T15:21:00.307Z" },383 { url = "https://files.pythonhosted.org/packages/44/06/e7175d06dd6e9172d4a69a72592cb3f7a996a9c396eee29082826449bbc3/MarkupSafe-3.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a", size = 15514, upload-time = "2024-10-18T15:21:01.122Z" },384 { url = "https://files.pythonhosted.org/packages/6b/28/bbf83e3f76936960b850435576dd5e67034e200469571be53f69174a2dfd/MarkupSafe-3.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d", size = 14353, upload-time = "2024-10-18T15:21:02.187Z" },385 { url = "https://files.pythonhosted.org/packages/6c/30/316d194b093cde57d448a4c3209f22e3046c5bb2fb0820b118292b334be7/MarkupSafe-3.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93", size = 12392, upload-time = "2024-10-18T15:21:02.941Z" },386 { url = "https://files.pythonhosted.org/packages/f2/96/9cdafba8445d3a53cae530aaf83c38ec64c4d5427d975c974084af5bc5d2/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832", size = 23984, upload-time = "2024-10-18T15:21:03.953Z" },387 { url = "https://files.pythonhosted.org/packages/f1/a4/aefb044a2cd8d7334c8a47d3fb2c9f328ac48cb349468cc31c20b539305f/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84", size = 23120, upload-time = "2024-10-18T15:21:06.495Z" },388 { url = "https://files.pythonhosted.org/packages/8d/21/5e4851379f88f3fad1de30361db501300d4f07bcad047d3cb0449fc51f8c/MarkupSafe-3.0.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca", size = 23032, upload-time = "2024-10-18T15:21:07.295Z" },389 { url = "https://files.pythonhosted.org/packages/00/7b/e92c64e079b2d0d7ddf69899c98842f3f9a60a1ae72657c89ce2655c999d/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798", size = 24057, upload-time = "2024-10-18T15:21:08.073Z" },390 { url = "https://files.pythonhosted.org/packages/f9/ac/46f960ca323037caa0a10662ef97d0a4728e890334fc156b9f9e52bcc4ca/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e", size = 23359, upload-time = "2024-10-18T15:21:09.318Z" },391 { url = "https://files.pythonhosted.org/packages/69/84/83439e16197337b8b14b6a5b9c2105fff81d42c2a7c5b58ac7b62ee2c3b1/MarkupSafe-3.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4", size = 23306, upload-time = "2024-10-18T15:21:10.185Z" },392 { url = "https://files.pythonhosted.org/packages/9a/34/a15aa69f01e2181ed8d2b685c0d2f6655d5cca2c4db0ddea775e631918cd/MarkupSafe-3.0.2-cp311-cp311-win32.whl", hash = "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d", size = 15094, upload-time = "2024-10-18T15:21:11.005Z" },393 { url = "https://files.pythonhosted.org/packages/da/b8/3a3bd761922d416f3dc5d00bfbed11f66b1ab89a0c2b6e887240a30b0f6b/MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b", size = 15521, upload-time = "2024-10-18T15:21:12.911Z" },394 { url = "https://files.pythonhosted.org/packages/22/09/d1f21434c97fc42f09d290cbb6350d44eb12f09cc62c9476effdb33a18aa/MarkupSafe-3.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", size = 14274, upload-time = "2024-10-18T15:21:13.777Z" },395 { url = "https://files.pythonhosted.org/packages/6b/b0/18f76bba336fa5aecf79d45dcd6c806c280ec44538b3c13671d49099fdd0/MarkupSafe-3.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", size = 12348, upload-time = "2024-10-18T15:21:14.822Z" },396 { url = "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", size = 24149, upload-time = "2024-10-18T15:21:15.642Z" },397 { url = "https://files.pythonhosted.org/packages/f3/f0/89e7aadfb3749d0f52234a0c8c7867877876e0a20b60e2188e9850794c17/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", size = 23118, upload-time = "2024-10-18T15:21:17.133Z" },398 { url = "https://files.pythonhosted.org/packages/d5/da/f2eeb64c723f5e3777bc081da884b414671982008c47dcc1873d81f625b6/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", size = 22993, upload-time = "2024-10-18T15:21:18.064Z" },399 { url = "https://files.pythonhosted.org/packages/da/0e/1f32af846df486dce7c227fe0f2398dc7e2e51d4a370508281f3c1c5cddc/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", size = 24178, upload-time = "2024-10-18T15:21:18.859Z" },400 { url = "https://files.pythonhosted.org/packages/c4/f6/bb3ca0532de8086cbff5f06d137064c8410d10779c4c127e0e47d17c0b71/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", size = 23319, upload-time = "2024-10-18T15:21:19.671Z" },401 { url = "https://files.pythonhosted.org/packages/a2/82/8be4c96ffee03c5b4a034e60a31294daf481e12c7c43ab8e34a1453ee48b/MarkupSafe-3.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", size = 23352, upload-time = "2024-10-18T15:21:20.971Z" },402 { url = "https://files.pythonhosted.org/packages/51/ae/97827349d3fcffee7e184bdf7f41cd6b88d9919c80f0263ba7acd1bbcb18/MarkupSafe-3.0.2-cp312-cp312-win32.whl", hash = "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", size = 15097, upload-time = "2024-10-18T15:21:22.646Z" },403 { url = "https://files.pythonhosted.org/packages/c1/80/a61f99dc3a936413c3ee4e1eecac96c0da5ed07ad56fd975f1a9da5bc630/MarkupSafe-3.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", size = 15601, upload-time = "2024-10-18T15:21:23.499Z" },404 { url = "https://files.pythonhosted.org/packages/83/0e/67eb10a7ecc77a0c2bbe2b0235765b98d164d81600746914bebada795e97/MarkupSafe-3.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", size = 14274, upload-time = "2024-10-18T15:21:24.577Z" },405 { url = "https://files.pythonhosted.org/packages/2b/6d/9409f3684d3335375d04e5f05744dfe7e9f120062c9857df4ab490a1031a/MarkupSafe-3.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", size = 12352, upload-time = "2024-10-18T15:21:25.382Z" },406 { url = "https://files.pythonhosted.org/packages/d2/f5/6eadfcd3885ea85fe2a7c128315cc1bb7241e1987443d78c8fe712d03091/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", size = 24122, upload-time = "2024-10-18T15:21:26.199Z" },407 { url = "https://files.pythonhosted.org/packages/0c/91/96cf928db8236f1bfab6ce15ad070dfdd02ed88261c2afafd4b43575e9e9/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", size = 23085, upload-time = "2024-10-18T15:21:27.029Z" },408 { url = "https://files.pythonhosted.org/packages/c2/cf/c9d56af24d56ea04daae7ac0940232d31d5a8354f2b457c6d856b2057d69/MarkupSafe-3.0.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", size = 22978, upload-time = "2024-10-18T15:21:27.846Z" },409 { url = "https://files.pythonhosted.org/packages/2a/9f/8619835cd6a711d6272d62abb78c033bda638fdc54c4e7f4272cf1c0962b/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", size = 24208, upload-time = "2024-10-18T15:21:28.744Z" },410 { url = "https://files.pythonhosted.org/packages/f9/bf/176950a1792b2cd2102b8ffeb5133e1ed984547b75db47c25a67d3359f77/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", size = 23357, upload-time = "2024-10-18T15:21:29.545Z" },411 { url = "https://files.pythonhosted.org/packages/ce/4f/9a02c1d335caabe5c4efb90e1b6e8ee944aa245c1aaaab8e8a618987d816/MarkupSafe-3.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", size = 23344, upload-time = "2024-10-18T15:21:30.366Z" },412 { url = "https://files.pythonhosted.org/packages/ee/55/c271b57db36f748f0e04a759ace9f8f759ccf22b4960c270c78a394f58be/MarkupSafe-3.0.2-cp313-cp313-win32.whl", hash = "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", size = 15101, upload-time = "2024-10-18T15:21:31.207Z" },413 { url = "https://files.pythonhosted.org/packages/29/88/07df22d2dd4df40aba9f3e402e6dc1b8ee86297dddbad4872bd5e7b0094f/MarkupSafe-3.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", size = 15603, upload-time = "2024-10-18T15:21:32.032Z" },414 { url = "https://files.pythonhosted.org/packages/62/6a/8b89d24db2d32d433dffcd6a8779159da109842434f1dd2f6e71f32f738c/MarkupSafe-3.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", size = 14510, upload-time = "2024-10-18T15:21:33.625Z" },415 { url = "https://files.pythonhosted.org/packages/7a/06/a10f955f70a2e5a9bf78d11a161029d278eeacbd35ef806c3fd17b13060d/MarkupSafe-3.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", size = 12486, upload-time = "2024-10-18T15:21:34.611Z" },416 { url = "https://files.pythonhosted.org/packages/34/cf/65d4a571869a1a9078198ca28f39fba5fbb910f952f9dbc5220afff9f5e6/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", size = 25480, upload-time = "2024-10-18T15:21:35.398Z" },417 { url = "https://files.pythonhosted.org/packages/0c/e3/90e9651924c430b885468b56b3d597cabf6d72be4b24a0acd1fa0e12af67/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", size = 23914, upload-time = "2024-10-18T15:21:36.231Z" },418 { url = "https://files.pythonhosted.org/packages/66/8c/6c7cf61f95d63bb866db39085150df1f2a5bd3335298f14a66b48e92659c/MarkupSafe-3.0.2-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", size = 23796, upload-time = "2024-10-18T15:21:37.073Z" },419 { url = "https://files.pythonhosted.org/packages/bb/35/cbe9238ec3f47ac9a7c8b3df7a808e7cb50fe149dc7039f5f454b3fba218/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", size = 25473, upload-time = "2024-10-18T15:21:37.932Z" },420 { url = "https://files.pythonhosted.org/packages/e6/32/7621a4382488aa283cc05e8984a9c219abad3bca087be9ec77e89939ded9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", size = 24114, upload-time = "2024-10-18T15:21:39.799Z" },421 { url = "https://files.pythonhosted.org/packages/0d/80/0985960e4b89922cb5a0bac0ed39c5b96cbc1a536a99f30e8c220a996ed9/MarkupSafe-3.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", size = 24098, upload-time = "2024-10-18T15:21:40.813Z" },422 { url = "https://files.pythonhosted.org/packages/82/78/fedb03c7d5380df2427038ec8d973587e90561b2d90cd472ce9254cf348b/MarkupSafe-3.0.2-cp313-cp313t-win32.whl", hash = "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", size = 15208, upload-time = "2024-10-18T15:21:41.814Z" },423 { url = "https://files.pythonhosted.org/packages/4f/65/6079a46068dfceaeabb5dcad6d674f5f5c61a6fa5673746f42a9f4c233b3/MarkupSafe-3.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", size = 15739, upload-time = "2024-10-18T15:21:42.784Z" },424]425426[[package]]427name = "mdit-py-plugins"428version = "0.4.2"429source = { registry = "https://pypi.org/simple" }430dependencies = [431 { name = "markdown-it-py" },432]433sdist = { url = "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz", hash = "sha256:5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5", size = 43542, upload-time = "2024-09-09T20:27:49.564Z" }434wheels = [435 { url = "https://files.pythonhosted.org/packages/a7/f7/7782a043553ee469c1ff49cfa1cdace2d6bf99a1f333cf38676b3ddf30da/mdit_py_plugins-0.4.2-py3-none-any.whl", hash = "sha256:0c673c3f889399a33b95e88d2f0d111b4447bdfea7f237dab2d488f459835636", size = 55316, upload-time = "2024-09-09T20:27:48.397Z" },436]437438[[package]]439name = "mdurl"440version = "0.1.2"441source = { registry = "https://pypi.org/simple" }442sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" }443wheels = [444 { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" },445]446447[[package]]448name = "mypy"449version = "1.16.0"450source = { registry = "https://pypi.org/simple" }451dependencies = [452 { name = "mypy-extensions" },453 { name = "pathspec" },454 { name = "tomli", marker = "python_full_version < '3.11'" },455 { name = "typing-extensions" },456]457sdist = { url = "https://files.pythonhosted.org/packages/d4/38/13c2f1abae94d5ea0354e146b95a1be9b2137a0d506728e0da037c4276f6/mypy-1.16.0.tar.gz", hash = "sha256:84b94283f817e2aa6350a14b4a8fb2a35a53c286f97c9d30f53b63620e7af8ab", size = 3323139, upload-time = "2025-05-29T13:46:12.532Z" }458wheels = [459 { url = "https://files.pythonhosted.org/packages/64/5e/a0485f0608a3d67029d3d73cec209278b025e3493a3acfda3ef3a88540fd/mypy-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7909541fef256527e5ee9c0a7e2aeed78b6cda72ba44298d1334fe7881b05c5c", size = 10967416, upload-time = "2025-05-29T13:34:17.783Z" },460 { url = "https://files.pythonhosted.org/packages/4b/53/5837c221f74c0d53a4bfc3003296f8179c3a2a7f336d7de7bbafbe96b688/mypy-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e71d6f0090c2256c713ed3d52711d01859c82608b5d68d4fa01a3fe30df95571", size = 10087654, upload-time = "2025-05-29T13:32:37.878Z" },461 { url = "https://files.pythonhosted.org/packages/29/59/5fd2400352c3093bed4c09017fe671d26bc5bb7e6ef2d4bf85f2a2488104/mypy-1.16.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:936ccfdd749af4766be824268bfe22d1db9eb2f34a3ea1d00ffbe5b5265f5491", size = 11875192, upload-time = "2025-05-29T13:34:54.281Z" },462 { url = "https://files.pythonhosted.org/packages/ad/3e/4bfec74663a64c2012f3e278dbc29ffe82b121bc551758590d1b6449ec0c/mypy-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4086883a73166631307fdd330c4a9080ce24913d4f4c5ec596c601b3a4bdd777", size = 12612939, upload-time = "2025-05-29T13:33:14.766Z" },463 { url = "https://files.pythonhosted.org/packages/88/1f/fecbe3dcba4bf2ca34c26ca016383a9676711907f8db4da8354925cbb08f/mypy-1.16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:feec38097f71797da0231997e0de3a58108c51845399669ebc532c815f93866b", size = 12874719, upload-time = "2025-05-29T13:21:52.09Z" },464 { url = "https://files.pythonhosted.org/packages/f3/51/c2d280601cd816c43dfa512a759270d5a5ef638d7ac9bea9134c8305a12f/mypy-1.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:09a8da6a0ee9a9770b8ff61b39c0bb07971cda90e7297f4213741b48a0cc8d93", size = 9487053, upload-time = "2025-05-29T13:33:29.797Z" },465 { url = "https://files.pythonhosted.org/packages/24/c4/ff2f79db7075c274fe85b5fff8797d29c6b61b8854c39e3b7feb556aa377/mypy-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9f826aaa7ff8443bac6a494cf743f591488ea940dd360e7dd330e30dd772a5ab", size = 10884498, upload-time = "2025-05-29T13:18:54.066Z" },466 { url = "https://files.pythonhosted.org/packages/02/07/12198e83006235f10f6a7808917376b5d6240a2fd5dce740fe5d2ebf3247/mypy-1.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:82d056e6faa508501af333a6af192c700b33e15865bda49611e3d7d8358ebea2", size = 10011755, upload-time = "2025-05-29T13:34:00.851Z" },467 { url = "https://files.pythonhosted.org/packages/f1/9b/5fd5801a72b5d6fb6ec0105ea1d0e01ab2d4971893076e558d4b6d6b5f80/mypy-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:089bedc02307c2548eb51f426e085546db1fa7dd87fbb7c9fa561575cf6eb1ff", size = 11800138, upload-time = "2025-05-29T13:32:55.082Z" },468 { url = "https://files.pythonhosted.org/packages/2e/81/a117441ea5dfc3746431e51d78a4aca569c677aa225bca2cc05a7c239b61/mypy-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6a2322896003ba66bbd1318c10d3afdfe24e78ef12ea10e2acd985e9d684a666", size = 12533156, upload-time = "2025-05-29T13:19:12.963Z" },469 { url = "https://files.pythonhosted.org/packages/3f/38/88ec57c6c86014d3f06251e00f397b5a7daa6888884d0abf187e4f5f587f/mypy-1.16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:021a68568082c5b36e977d54e8f1de978baf401a33884ffcea09bd8e88a98f4c", size = 12742426, upload-time = "2025-05-29T13:20:22.72Z" },470 { url = "https://files.pythonhosted.org/packages/bd/53/7e9d528433d56e6f6f77ccf24af6ce570986c2d98a5839e4c2009ef47283/mypy-1.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:54066fed302d83bf5128632d05b4ec68412e1f03ef2c300434057d66866cea4b", size = 9478319, upload-time = "2025-05-29T13:21:17.582Z" },471 { url = "https://files.pythonhosted.org/packages/70/cf/158e5055e60ca2be23aec54a3010f89dcffd788732634b344fc9cb1e85a0/mypy-1.16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c5436d11e89a3ad16ce8afe752f0f373ae9620841c50883dc96f8b8805620b13", size = 11062927, upload-time = "2025-05-29T13:35:52.328Z" },472 { url = "https://files.pythonhosted.org/packages/94/34/cfff7a56be1609f5d10ef386342ce3494158e4d506516890142007e6472c/mypy-1.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f2622af30bf01d8fc36466231bdd203d120d7a599a6d88fb22bdcb9dbff84090", size = 10083082, upload-time = "2025-05-29T13:35:33.378Z" },473 { url = "https://files.pythonhosted.org/packages/b3/7f/7242062ec6288c33d8ad89574df87c3903d394870e5e6ba1699317a65075/mypy-1.16.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d045d33c284e10a038f5e29faca055b90eee87da3fc63b8889085744ebabb5a1", size = 11828306, upload-time = "2025-05-29T13:21:02.164Z" },474 { url = "https://files.pythonhosted.org/packages/6f/5f/b392f7b4f659f5b619ce5994c5c43caab3d80df2296ae54fa888b3d17f5a/mypy-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b4968f14f44c62e2ec4a038c8797a87315be8df7740dc3ee8d3bfe1c6bf5dba8", size = 12702764, upload-time = "2025-05-29T13:20:42.826Z" },475 { url = "https://files.pythonhosted.org/packages/9b/c0/7646ef3a00fa39ac9bc0938626d9ff29d19d733011be929cfea59d82d136/mypy-1.16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:eb14a4a871bb8efb1e4a50360d4e3c8d6c601e7a31028a2c79f9bb659b63d730", size = 12896233, upload-time = "2025-05-29T13:18:37.446Z" },476 { url = "https://files.pythonhosted.org/packages/6d/38/52f4b808b3fef7f0ef840ee8ff6ce5b5d77381e65425758d515cdd4f5bb5/mypy-1.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:bd4e1ebe126152a7bbaa4daedd781c90c8f9643c79b9748caa270ad542f12bec", size = 9565547, upload-time = "2025-05-29T13:20:02.836Z" },477 { url = "https://files.pythonhosted.org/packages/97/9c/ca03bdbefbaa03b264b9318a98950a9c683e06472226b55472f96ebbc53d/mypy-1.16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a9e056237c89f1587a3be1a3a70a06a698d25e2479b9a2f57325ddaaffc3567b", size = 11059753, upload-time = "2025-05-29T13:18:18.167Z" },478 { url = "https://files.pythonhosted.org/packages/36/92/79a969b8302cfe316027c88f7dc6fee70129490a370b3f6eb11d777749d0/mypy-1.16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0b07e107affb9ee6ce1f342c07f51552d126c32cd62955f59a7db94a51ad12c0", size = 10073338, upload-time = "2025-05-29T13:19:48.079Z" },479 { url = "https://files.pythonhosted.org/packages/14/9b/a943f09319167da0552d5cd722104096a9c99270719b1afeea60d11610aa/mypy-1.16.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c6fb60cbd85dc65d4d63d37cb5c86f4e3a301ec605f606ae3a9173e5cf34997b", size = 11827764, upload-time = "2025-05-29T13:46:04.47Z" },480 { url = "https://files.pythonhosted.org/packages/ec/64/ff75e71c65a0cb6ee737287c7913ea155845a556c64144c65b811afdb9c7/mypy-1.16.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a7e32297a437cc915599e0578fa6bc68ae6a8dc059c9e009c628e1c47f91495d", size = 12701356, upload-time = "2025-05-29T13:35:13.553Z" },481 { url = "https://files.pythonhosted.org/packages/0a/ad/0e93c18987a1182c350f7a5fab70550852f9fabe30ecb63bfbe51b602074/mypy-1.16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:afe420c9380ccec31e744e8baff0d406c846683681025db3531b32db56962d52", size = 12900745, upload-time = "2025-05-29T13:17:24.409Z" },482 { url = "https://files.pythonhosted.org/packages/28/5d/036c278d7a013e97e33f08c047fe5583ab4f1fc47c9a49f985f1cdd2a2d7/mypy-1.16.0-cp313-cp313-win_amd64.whl", hash = "sha256:55f9076c6ce55dd3f8cd0c6fff26a008ca8e5131b89d5ba6d86bd3f47e736eeb", size = 9572200, upload-time = "2025-05-29T13:33:44.92Z" },483 { url = "https://files.pythonhosted.org/packages/99/a3/6ed10530dec8e0fdc890d81361260c9ef1f5e5c217ad8c9b21ecb2b8366b/mypy-1.16.0-py3-none-any.whl", hash = "sha256:29e1499864a3888bca5c1542f2d7232c6e586295183320caa95758fc84034031", size = 2265773, upload-time = "2025-05-29T13:35:18.762Z" },484]485486[[package]]487name = "mypy-extensions"488version = "1.1.0"489source = { registry = "https://pypi.org/simple" }490sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" }491wheels = [492 { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" },493]494495[[package]]496name = "myst-parser"497version = "4.0.1"498source = { registry = "https://pypi.org/simple" }499dependencies = [500 { name = "docutils" },501 { name = "jinja2" },502 { name = "markdown-it-py" },503 { name = "mdit-py-plugins" },504 { name = "pyyaml" },505 { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },506 { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },507]508sdist = { url = "https://files.pythonhosted.org/packages/66/a5/9626ba4f73555b3735ad86247a8077d4603aa8628537687c839ab08bfe44/myst_parser-4.0.1.tar.gz", hash = "sha256:5cfea715e4f3574138aecbf7d54132296bfd72bb614d31168f48c477a830a7c4", size = 93985, upload-time = "2025-02-12T10:53:03.833Z" }509wheels = [510 { url = "https://files.pythonhosted.org/packages/5f/df/76d0321c3797b54b60fef9ec3bd6f4cfd124b9e422182156a1dd418722cf/myst_parser-4.0.1-py3-none-any.whl", hash = "sha256:9134e88959ec3b5780aedf8a99680ea242869d012e8821db3126d427edc9c95d", size = 84579, upload-time = "2025-02-12T10:53:02.078Z" },511]512513[[package]]514name = "nodeenv"515version = "1.9.1"516source = { registry = "https://pypi.org/simple" }517sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437, upload-time = "2024-06-04T18:44:11.171Z" }518wheels = [519 { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314, upload-time = "2024-06-04T18:44:08.352Z" },520]521522[[package]]523name = "packaging"524version = "25.0"525source = { registry = "https://pypi.org/simple" }526sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" }527wheels = [528 { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" },529]530531[[package]]532name = "pallets-sphinx-themes"533version = "2.3.0"534source = { registry = "https://pypi.org/simple" }535dependencies = [536 { name = "packaging" },537 { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },538 { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },539 { name = "sphinx-notfound-page" },540]541sdist = { url = "https://files.pythonhosted.org/packages/3b/08/c57dd89e45dbc976930200a2cb7826ed76f3c9791454a9fcd1cde3f17177/pallets_sphinx_themes-2.3.0.tar.gz", hash = "sha256:6293ced11a1d5d3de7268af1acd60428732b5a9e6051a47a596c6d9a083e60d9", size = 21029, upload-time = "2024-10-24T18:52:38.574Z" }542wheels = [543 { url = "https://files.pythonhosted.org/packages/ff/7d/a4aa06e452e031559dcfb066e035d2615ebfa6148e93514d7c36030004c1/pallets_sphinx_themes-2.3.0-py3-none-any.whl", hash = "sha256:7ed13de3743c462c2804e2aa63d96cc9ffa82cb76d0251cea03de9bcd9f8dbec", size = 24745, upload-time = "2024-10-24T18:52:37.265Z" },544]545546[[package]]547name = "pathspec"548version = "0.12.1"549source = { registry = "https://pypi.org/simple" }550sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043, upload-time = "2023-12-10T22:30:45Z" }551wheels = [552 { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191, upload-time = "2023-12-10T22:30:43.14Z" },553]554555[[package]]556name = "platformdirs"557version = "4.3.8"558source = { registry = "https://pypi.org/simple" }559sdist = { url = "https://files.pythonhosted.org/packages/fe/8b/3c73abc9c759ecd3f1f7ceff6685840859e8070c4d947c93fae71f6a0bf2/platformdirs-4.3.8.tar.gz", hash = "sha256:3d512d96e16bcb959a814c9f348431070822a6496326a4be0911c40b5a74c2bc", size = 21362, upload-time = "2025-05-07T22:47:42.121Z" }560wheels = [561 { url = "https://files.pythonhosted.org/packages/fe/39/979e8e21520d4e47a0bbe349e2713c0aac6f3d853d0e5b34d76206c439aa/platformdirs-4.3.8-py3-none-any.whl", hash = "sha256:ff7059bb7eb1179e2685604f4aaf157cfd9535242bd23742eadc3c13542139b4", size = 18567, upload-time = "2025-05-07T22:47:40.376Z" },562]563564[[package]]565name = "pluggy"566version = "1.6.0"567source = { registry = "https://pypi.org/simple" }568sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }569wheels = [570 { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },571]572573[[package]]574name = "pre-commit"575version = "4.2.0"576source = { registry = "https://pypi.org/simple" }577dependencies = [578 { name = "cfgv" },579 { name = "identify" },580 { name = "nodeenv" },581 { name = "pyyaml" },582 { name = "virtualenv" },583]584sdist = { url = "https://files.pythonhosted.org/packages/08/39/679ca9b26c7bb2999ff122d50faa301e49af82ca9c066ec061cfbc0c6784/pre_commit-4.2.0.tar.gz", hash = "sha256:601283b9757afd87d40c4c4a9b2b5de9637a8ea02eaff7adc2d0fb4e04841146", size = 193424, upload-time = "2025-03-18T21:35:20.987Z" }585wheels = [586 { url = "https://files.pythonhosted.org/packages/88/74/a88bf1b1efeae488a0c0b7bdf71429c313722d1fc0f377537fbe554e6180/pre_commit-4.2.0-py2.py3-none-any.whl", hash = "sha256:a009ca7205f1eb497d10b845e52c838a98b6cdd2102a6c8e4540e94ee75c58bd", size = 220707, upload-time = "2025-03-18T21:35:19.343Z" },587]588589[[package]]590name = "pre-commit-uv"591version = "4.1.4"592source = { registry = "https://pypi.org/simple" }593dependencies = [594 { name = "pre-commit" },595 { name = "uv" },596]597sdist = { url = "https://files.pythonhosted.org/packages/b1/6c/c3c1d01698c8abb0b546defc0304971fa7fb2ba84ad35587b9dad095d73f/pre_commit_uv-4.1.4.tar.gz", hash = "sha256:3db606a79b226127b27dbbd8381b78c0e30de3ac775a8492c576a68e9250535c", size = 6493, upload-time = "2024-10-29T23:07:28.918Z" }598wheels = [599 { url = "https://files.pythonhosted.org/packages/f1/70/1b65f9118ef64f6ffe5d57a67170bbff25d4f4a3d1cb78e8ed3392e16114/pre_commit_uv-4.1.4-py3-none-any.whl", hash = "sha256:7f01fb494fa1caa5097d20a38f71df7cea0209197b2564699cef9b3f3aa9d135", size = 5578, upload-time = "2024-10-29T23:07:27.128Z" },600]601602[[package]]603name = "pygments"604version = "2.19.1"605source = { registry = "https://pypi.org/simple" }606sdist = { url = "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f", size = 4968581, upload-time = "2025-01-06T17:26:30.443Z" }607wheels = [608 { url = "https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c", size = 1225293, upload-time = "2025-01-06T17:26:25.553Z" },609]610611[[package]]612name = "pyproject-api"613version = "1.9.1"614source = { registry = "https://pypi.org/simple" }615dependencies = [616 { name = "packaging" },617 { name = "tomli", marker = "python_full_version < '3.11'" },618]619sdist = { url = "https://files.pythonhosted.org/packages/19/fd/437901c891f58a7b9096511750247535e891d2d5a5a6eefbc9386a2b41d5/pyproject_api-1.9.1.tar.gz", hash = "sha256:43c9918f49daab37e302038fc1aed54a8c7a91a9fa935d00b9a485f37e0f5335", size = 22710, upload-time = "2025-05-12T14:41:58.025Z" }620wheels = [621 { url = "https://files.pythonhosted.org/packages/ef/e6/c293c06695d4a3ab0260ef124a74ebadba5f4c511ce3a4259e976902c00b/pyproject_api-1.9.1-py3-none-any.whl", hash = "sha256:7d6238d92f8962773dd75b5f0c4a6a27cce092a14b623b811dba656f3b628948", size = 13158, upload-time = "2025-05-12T14:41:56.217Z" },622]623624[[package]]625name = "pyright"626version = "1.1.401"627source = { registry = "https://pypi.org/simple" }628dependencies = [629 { name = "nodeenv" },630 { name = "typing-extensions" },631]632sdist = { url = "https://files.pythonhosted.org/packages/79/9a/7ab2b333b921b2d6bfcffe05a0e0a0bbeff884bd6fb5ed50cd68e2898e53/pyright-1.1.401.tar.gz", hash = "sha256:788a82b6611fa5e34a326a921d86d898768cddf59edde8e93e56087d277cc6f1", size = 3894193, upload-time = "2025-05-21T10:44:52.03Z" }633wheels = [634 { url = "https://files.pythonhosted.org/packages/0d/e6/1f908fce68b0401d41580e0f9acc4c3d1b248adcff00dfaad75cd21a1370/pyright-1.1.401-py3-none-any.whl", hash = "sha256:6fde30492ba5b0d7667c16ecaf6c699fab8d7a1263f6a18549e0b00bf7724c06", size = 5629193, upload-time = "2025-05-21T10:44:50.129Z" },635]636637[[package]]638name = "pytest"639version = "8.4.0"640source = { registry = "https://pypi.org/simple" }641dependencies = [642 { name = "colorama", marker = "sys_platform == 'win32'" },643 { name = "exceptiongroup", marker = "python_full_version < '3.11'" },644 { name = "iniconfig" },645 { name = "packaging" },646 { name = "pluggy" },647 { name = "pygments" },648 { name = "tomli", marker = "python_full_version < '3.11'" },649]650sdist = { url = "https://files.pythonhosted.org/packages/fb/aa/405082ce2749be5398045152251ac69c0f3578c7077efc53431303af97ce/pytest-8.4.0.tar.gz", hash = "sha256:14d920b48472ea0dbf68e45b96cd1ffda4705f33307dcc86c676c1b5104838a6", size = 1515232, upload-time = "2025-06-02T17:36:30.03Z" }651wheels = [652 { url = "https://files.pythonhosted.org/packages/2f/de/afa024cbe022b1b318a3d224125aa24939e99b4ff6f22e0ba639a2eaee47/pytest-8.4.0-py3-none-any.whl", hash = "sha256:f40f825768ad76c0977cbacdf1fd37c6f7a468e460ea6a0636078f8972d4517e", size = 363797, upload-time = "2025-06-02T17:36:27.859Z" },653]654655[[package]]656name = "pyyaml"657version = "6.0.2"658source = { registry = "https://pypi.org/simple" }659sdist = { url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", size = 130631, upload-time = "2024-08-06T20:33:50.674Z" }660wheels = [661 { url = "https://files.pythonhosted.org/packages/9b/95/a3fac87cb7158e231b5a6012e438c647e1a87f09f8e0d123acec8ab8bf71/PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086", size = 184199, upload-time = "2024-08-06T20:31:40.178Z" },662 { url = "https://files.pythonhosted.org/packages/c7/7a/68bd47624dab8fd4afbfd3c48e3b79efe09098ae941de5b58abcbadff5cb/PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf", size = 171758, upload-time = "2024-08-06T20:31:42.173Z" },663 { url = "https://files.pythonhosted.org/packages/49/ee/14c54df452143b9ee9f0f29074d7ca5516a36edb0b4cc40c3f280131656f/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237", size = 718463, upload-time = "2024-08-06T20:31:44.263Z" },664 { url = "https://files.pythonhosted.org/packages/4d/61/de363a97476e766574650d742205be468921a7b532aa2499fcd886b62530/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b", size = 719280, upload-time = "2024-08-06T20:31:50.199Z" },665 { url = "https://files.pythonhosted.org/packages/6b/4e/1523cb902fd98355e2e9ea5e5eb237cbc5f3ad5f3075fa65087aa0ecb669/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed", size = 751239, upload-time = "2024-08-06T20:31:52.292Z" },666 { url = "https://files.pythonhosted.org/packages/b7/33/5504b3a9a4464893c32f118a9cc045190a91637b119a9c881da1cf6b7a72/PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180", size = 695802, upload-time = "2024-08-06T20:31:53.836Z" },667 { url = "https://files.pythonhosted.org/packages/5c/20/8347dcabd41ef3a3cdc4f7b7a2aff3d06598c8779faa189cdbf878b626a4/PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68", size = 720527, upload-time = "2024-08-06T20:31:55.565Z" },668 { url = "https://files.pythonhosted.org/packages/be/aa/5afe99233fb360d0ff37377145a949ae258aaab831bde4792b32650a4378/PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99", size = 144052, upload-time = "2024-08-06T20:31:56.914Z" },669 { url = "https://files.pythonhosted.org/packages/b5/84/0fa4b06f6d6c958d207620fc60005e241ecedceee58931bb20138e1e5776/PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e", size = 161774, upload-time = "2024-08-06T20:31:58.304Z" },670 { url = "https://files.pythonhosted.org/packages/f8/aa/7af4e81f7acba21a4c6be026da38fd2b872ca46226673c89a758ebdc4fd2/PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774", size = 184612, upload-time = "2024-08-06T20:32:03.408Z" },671 { url = "https://files.pythonhosted.org/packages/8b/62/b9faa998fd185f65c1371643678e4d58254add437edb764a08c5a98fb986/PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee", size = 172040, upload-time = "2024-08-06T20:32:04.926Z" },672 { url = "https://files.pythonhosted.org/packages/ad/0c/c804f5f922a9a6563bab712d8dcc70251e8af811fce4524d57c2c0fd49a4/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c", size = 736829, upload-time = "2024-08-06T20:32:06.459Z" },673 { url = "https://files.pythonhosted.org/packages/51/16/6af8d6a6b210c8e54f1406a6b9481febf9c64a3109c541567e35a49aa2e7/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317", size = 764167, upload-time = "2024-08-06T20:32:08.338Z" },674 { url = "https://files.pythonhosted.org/packages/75/e4/2c27590dfc9992f73aabbeb9241ae20220bd9452df27483b6e56d3975cc5/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85", size = 762952, upload-time = "2024-08-06T20:32:14.124Z" },675 { url = "https://files.pythonhosted.org/packages/9b/97/ecc1abf4a823f5ac61941a9c00fe501b02ac3ab0e373c3857f7d4b83e2b6/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4", size = 735301, upload-time = "2024-08-06T20:32:16.17Z" },676 { url = "https://files.pythonhosted.org/packages/45/73/0f49dacd6e82c9430e46f4a027baa4ca205e8b0a9dce1397f44edc23559d/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e", size = 756638, upload-time = "2024-08-06T20:32:18.555Z" },677 { url = "https://files.pythonhosted.org/packages/22/5f/956f0f9fc65223a58fbc14459bf34b4cc48dec52e00535c79b8db361aabd/PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5", size = 143850, upload-time = "2024-08-06T20:32:19.889Z" },678 { url = "https://files.pythonhosted.org/packages/ed/23/8da0bbe2ab9dcdd11f4f4557ccaf95c10b9811b13ecced089d43ce59c3c8/PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44", size = 161980, upload-time = "2024-08-06T20:32:21.273Z" },679 { url = "https://files.pythonhosted.org/packages/86/0c/c581167fc46d6d6d7ddcfb8c843a4de25bdd27e4466938109ca68492292c/PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", size = 183873, upload-time = "2024-08-06T20:32:25.131Z" },680 { url = "https://files.pythonhosted.org/packages/a8/0c/38374f5bb272c051e2a69281d71cba6fdb983413e6758b84482905e29a5d/PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", size = 173302, upload-time = "2024-08-06T20:32:26.511Z" },681 { url = "https://files.pythonhosted.org/packages/c3/93/9916574aa8c00aa06bbac729972eb1071d002b8e158bd0e83a3b9a20a1f7/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", size = 739154, upload-time = "2024-08-06T20:32:28.363Z" },682 { url = "https://files.pythonhosted.org/packages/95/0f/b8938f1cbd09739c6da569d172531567dbcc9789e0029aa070856f123984/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", size = 766223, upload-time = "2024-08-06T20:32:30.058Z" },683 { url = "https://files.pythonhosted.org/packages/b9/2b/614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", size = 767542, upload-time = "2024-08-06T20:32:31.881Z" },684 { url = "https://files.pythonhosted.org/packages/d4/00/dd137d5bcc7efea1836d6264f049359861cf548469d18da90cd8216cf05f/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", size = 731164, upload-time = "2024-08-06T20:32:37.083Z" },685 { url = "https://files.pythonhosted.org/packages/c9/1f/4f998c900485e5c0ef43838363ba4a9723ac0ad73a9dc42068b12aaba4e4/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", size = 756611, upload-time = "2024-08-06T20:32:38.898Z" },686 { url = "https://files.pythonhosted.org/packages/df/d1/f5a275fdb252768b7a11ec63585bc38d0e87c9e05668a139fea92b80634c/PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", size = 140591, upload-time = "2024-08-06T20:32:40.241Z" },687 { url = "https://files.pythonhosted.org/packages/0c/e8/4f648c598b17c3d06e8753d7d13d57542b30d56e6c2dedf9c331ae56312e/PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", size = 156338, upload-time = "2024-08-06T20:32:41.93Z" },688 { url = "https://files.pythonhosted.org/packages/ef/e3/3af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f/PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", size = 181309, upload-time = "2024-08-06T20:32:43.4Z" },689 { url = "https://files.pythonhosted.org/packages/45/9f/3b1c20a0b7a3200524eb0076cc027a970d320bd3a6592873c85c92a08731/PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", size = 171679, upload-time = "2024-08-06T20:32:44.801Z" },690 { url = "https://files.pythonhosted.org/packages/7c/9a/337322f27005c33bcb656c655fa78325b730324c78620e8328ae28b64d0c/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", size = 733428, upload-time = "2024-08-06T20:32:46.432Z" },691 { url = "https://files.pythonhosted.org/packages/a3/69/864fbe19e6c18ea3cc196cbe5d392175b4cf3d5d0ac1403ec3f2d237ebb5/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", size = 763361, upload-time = "2024-08-06T20:32:51.188Z" },692 { url = "https://files.pythonhosted.org/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", size = 759523, upload-time = "2024-08-06T20:32:53.019Z" },693 { url = "https://files.pythonhosted.org/packages/2b/b2/e3234f59ba06559c6ff63c4e10baea10e5e7df868092bf9ab40e5b9c56b6/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", size = 726660, upload-time = "2024-08-06T20:32:54.708Z" },694 { url = "https://files.pythonhosted.org/packages/fe/0f/25911a9f080464c59fab9027482f822b86bf0608957a5fcc6eaac85aa515/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", size = 751597, upload-time = "2024-08-06T20:32:56.985Z" },695 { url = "https://files.pythonhosted.org/packages/14/0d/e2c3b43bbce3cf6bd97c840b46088a3031085179e596d4929729d8d68270/PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", size = 140527, upload-time = "2024-08-06T20:33:03.001Z" },696 { url = "https://files.pythonhosted.org/packages/fa/de/02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3/PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", size = 156446, upload-time = "2024-08-06T20:33:04.33Z" },697]698699[[package]]700name = "requests"701version = "2.32.3"702source = { registry = "https://pypi.org/simple" }703dependencies = [704 { name = "certifi" },705 { name = "charset-normalizer" },706 { name = "idna" },707 { name = "urllib3" },708]709sdist = { url = "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", size = 131218, upload-time = "2024-05-29T15:37:49.536Z" }710wheels = [711 { url = "https://files.pythonhosted.org/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6", size = 64928, upload-time = "2024-05-29T15:37:47.027Z" },712]713714[[package]]715name = "roman-numerals-py"716version = "3.1.0"717source = { registry = "https://pypi.org/simple" }718sdist = { url = "https://files.pythonhosted.org/packages/30/76/48fd56d17c5bdbdf65609abbc67288728a98ed4c02919428d4f52d23b24b/roman_numerals_py-3.1.0.tar.gz", hash = "sha256:be4bf804f083a4ce001b5eb7e3c0862479d10f94c936f6c4e5f250aa5ff5bd2d", size = 9017, upload-time = "2025-02-22T07:34:54.333Z" }719wheels = [720 { url = "https://files.pythonhosted.org/packages/53/97/d2cbbaa10c9b826af0e10fdf836e1bf344d9f0abb873ebc34d1f49642d3f/roman_numerals_py-3.1.0-py3-none-any.whl", hash = "sha256:9da2ad2fb670bcf24e81070ceb3be72f6c11c440d73bd579fbeca1e9f330954c", size = 7742, upload-time = "2025-02-22T07:34:52.422Z" },721]722723[[package]]724name = "ruff"725version = "0.11.13"726source = { registry = "https://pypi.org/simple" }727sdist = { url = "https://files.pythonhosted.org/packages/ed/da/9c6f995903b4d9474b39da91d2d626659af3ff1eeb43e9ae7c119349dba6/ruff-0.11.13.tar.gz", hash = "sha256:26fa247dc68d1d4e72c179e08889a25ac0c7ba4d78aecfc835d49cbfd60bf514", size = 4282054, upload-time = "2025-06-05T21:00:15.721Z" }728wheels = [729 { url = "https://files.pythonhosted.org/packages/7d/ce/a11d381192966e0b4290842cc8d4fac7dc9214ddf627c11c1afff87da29b/ruff-0.11.13-py3-none-linux_armv6l.whl", hash = "sha256:4bdfbf1240533f40042ec00c9e09a3aade6f8c10b6414cf11b519488d2635d46", size = 10292516, upload-time = "2025-06-05T20:59:32.944Z" },730 { url = "https://files.pythonhosted.org/packages/78/db/87c3b59b0d4e753e40b6a3b4a2642dfd1dcaefbff121ddc64d6c8b47ba00/ruff-0.11.13-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:aef9c9ed1b5ca28bb15c7eac83b8670cf3b20b478195bd49c8d756ba0a36cf48", size = 11106083, upload-time = "2025-06-05T20:59:37.03Z" },731 { url = "https://files.pythonhosted.org/packages/77/79/d8cec175856ff810a19825d09ce700265f905c643c69f45d2b737e4a470a/ruff-0.11.13-py3-none-macosx_11_0_arm64.whl", hash = "sha256:53b15a9dfdce029c842e9a5aebc3855e9ab7771395979ff85b7c1dedb53ddc2b", size = 10436024, upload-time = "2025-06-05T20:59:39.741Z" },732 { url = "https://files.pythonhosted.org/packages/8b/5b/f6d94f2980fa1ee854b41568368a2e1252681b9238ab2895e133d303538f/ruff-0.11.13-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ab153241400789138d13f362c43f7edecc0edfffce2afa6a68434000ecd8f69a", size = 10646324, upload-time = "2025-06-05T20:59:42.185Z" },733 { url = "https://files.pythonhosted.org/packages/6c/9c/b4c2acf24ea4426016d511dfdc787f4ce1ceb835f3c5fbdbcb32b1c63bda/ruff-0.11.13-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6c51f93029d54a910d3d24f7dd0bb909e31b6cd989a5e4ac513f4eb41629f0dc", size = 10174416, upload-time = "2025-06-05T20:59:44.319Z" },734 { url = "https://files.pythonhosted.org/packages/f3/10/e2e62f77c65ede8cd032c2ca39c41f48feabedb6e282bfd6073d81bb671d/ruff-0.11.13-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1808b3ed53e1a777c2ef733aca9051dc9bf7c99b26ece15cb59a0320fbdbd629", size = 11724197, upload-time = "2025-06-05T20:59:46.935Z" },735 { url = "https://files.pythonhosted.org/packages/bb/f0/466fe8469b85c561e081d798c45f8a1d21e0b4a5ef795a1d7f1a9a9ec182/ruff-0.11.13-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:d28ce58b5ecf0f43c1b71edffabe6ed7f245d5336b17805803312ec9bc665933", size = 12511615, upload-time = "2025-06-05T20:59:49.534Z" },736 { url = "https://files.pythonhosted.org/packages/17/0e/cefe778b46dbd0cbcb03a839946c8f80a06f7968eb298aa4d1a4293f3448/ruff-0.11.13-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:55e4bc3a77842da33c16d55b32c6cac1ec5fb0fbec9c8c513bdce76c4f922165", size = 12117080, upload-time = "2025-06-05T20:59:51.654Z" },737 { url = "https://files.pythonhosted.org/packages/5d/2c/caaeda564cbe103bed145ea557cb86795b18651b0f6b3ff6a10e84e5a33f/ruff-0.11.13-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:633bf2c6f35678c56ec73189ba6fa19ff1c5e4807a78bf60ef487b9dd272cc71", size = 11326315, upload-time = "2025-06-05T20:59:54.469Z" },738 { url = "https://files.pythonhosted.org/packages/75/f0/782e7d681d660eda8c536962920c41309e6dd4ebcea9a2714ed5127d44bd/ruff-0.11.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ffbc82d70424b275b089166310448051afdc6e914fdab90e08df66c43bb5ca9", size = 11555640, upload-time = "2025-06-05T20:59:56.986Z" },739 { url = "https://files.pythonhosted.org/packages/5d/d4/3d580c616316c7f07fb3c99dbecfe01fbaea7b6fd9a82b801e72e5de742a/ruff-0.11.13-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4a9ddd3ec62a9a89578c85842b836e4ac832d4a2e0bfaad3b02243f930ceafcc", size = 10507364, upload-time = "2025-06-05T20:59:59.154Z" },740 { url = "https://files.pythonhosted.org/packages/5a/dc/195e6f17d7b3ea6b12dc4f3e9de575db7983db187c378d44606e5d503319/ruff-0.11.13-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d237a496e0778d719efb05058c64d28b757c77824e04ffe8796c7436e26712b7", size = 10141462, upload-time = "2025-06-05T21:00:01.481Z" },741 { url = "https://files.pythonhosted.org/packages/f4/8e/39a094af6967faa57ecdeacb91bedfb232474ff8c3d20f16a5514e6b3534/ruff-0.11.13-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26816a218ca6ef02142343fd24c70f7cd8c5aa6c203bca284407adf675984432", size = 11121028, upload-time = "2025-06-05T21:00:04.06Z" },742 { url = "https://files.pythonhosted.org/packages/5a/c0/b0b508193b0e8a1654ec683ebab18d309861f8bd64e3a2f9648b80d392cb/ruff-0.11.13-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:51c3f95abd9331dc5b87c47ac7f376db5616041173826dfd556cfe3d4977f492", size = 11602992, upload-time = "2025-06-05T21:00:06.249Z" },743 { url = "https://files.pythonhosted.org/packages/7c/91/263e33ab93ab09ca06ce4f8f8547a858cc198072f873ebc9be7466790bae/ruff-0.11.13-py3-none-win32.whl", hash = "sha256:96c27935418e4e8e77a26bb05962817f28b8ef3843a6c6cc49d8783b5507f250", size = 10474944, upload-time = "2025-06-05T21:00:08.459Z" },744 { url = "https://files.pythonhosted.org/packages/46/f4/7c27734ac2073aae8efb0119cae6931b6fb48017adf048fdf85c19337afc/ruff-0.11.13-py3-none-win_amd64.whl", hash = "sha256:29c3189895a8a6a657b7af4e97d330c8a3afd2c9c8f46c81e2fc5a31866517e3", size = 11548669, upload-time = "2025-06-05T21:00:11.147Z" },745 { url = "https://files.pythonhosted.org/packages/ec/bf/b273dd11673fed8a6bd46032c0ea2a04b2ac9bfa9c628756a5856ba113b0/ruff-0.11.13-py3-none-win_arm64.whl", hash = "sha256:b4385285e9179d608ff1d2fb9922062663c658605819a6876d8beef0c30b7f3b", size = 10683928, upload-time = "2025-06-05T21:00:13.758Z" },746]747748[[package]]749name = "sniffio"750version = "1.3.1"751source = { registry = "https://pypi.org/simple" }752sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372, upload-time = "2024-02-25T23:20:04.057Z" }753wheels = [754 { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235, upload-time = "2024-02-25T23:20:01.196Z" },755]756757[[package]]758name = "snowballstemmer"759version = "3.0.1"760source = { registry = "https://pypi.org/simple" }761sdist = { url = "https://files.pythonhosted.org/packages/75/a7/9810d872919697c9d01295633f5d574fb416d47e535f258272ca1f01f447/snowballstemmer-3.0.1.tar.gz", hash = "sha256:6d5eeeec8e9f84d4d56b847692bacf79bc2c8e90c7f80ca4444ff8b6f2e52895", size = 105575, upload-time = "2025-05-09T16:34:51.843Z" }762wheels = [763 { url = "https://files.pythonhosted.org/packages/c8/78/3565d011c61f5a43488987ee32b6f3f656e7f107ac2782dd57bdd7d91d9a/snowballstemmer-3.0.1-py3-none-any.whl", hash = "sha256:6cd7b3897da8d6c9ffb968a6781fa6532dce9c3618a4b127d920dab764a19064", size = 103274, upload-time = "2025-05-09T16:34:50.371Z" },764]765766[[package]]767name = "sphinx"768version = "8.1.3"769source = { registry = "https://pypi.org/simple" }770resolution-markers = [771 "python_full_version < '3.11'",772]773dependencies = [774 { name = "alabaster", marker = "python_full_version < '3.11'" },775 { name = "babel", marker = "python_full_version < '3.11'" },776 { name = "colorama", marker = "python_full_version < '3.11' and sys_platform == 'win32'" },777 { name = "docutils", marker = "python_full_version < '3.11'" },778 { name = "imagesize", marker = "python_full_version < '3.11'" },779 { name = "jinja2", marker = "python_full_version < '3.11'" },780 { name = "packaging", marker = "python_full_version < '3.11'" },781 { name = "pygments", marker = "python_full_version < '3.11'" },782 { name = "requests", marker = "python_full_version < '3.11'" },783 { name = "snowballstemmer", marker = "python_full_version < '3.11'" },784 { name = "sphinxcontrib-applehelp", marker = "python_full_version < '3.11'" },785 { name = "sphinxcontrib-devhelp", marker = "python_full_version < '3.11'" },786 { name = "sphinxcontrib-htmlhelp", marker = "python_full_version < '3.11'" },787 { name = "sphinxcontrib-jsmath", marker = "python_full_version < '3.11'" },788 { name = "sphinxcontrib-qthelp", marker = "python_full_version < '3.11'" },789 { name = "sphinxcontrib-serializinghtml", marker = "python_full_version < '3.11'" },790 { name = "tomli", marker = "python_full_version < '3.11'" },791]792sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/be0b61178fe2cdcb67e2a92fc9ebb488e3c51c4f74a36a7824c0adf23425/sphinx-8.1.3.tar.gz", hash = "sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927", size = 8184611, upload-time = "2024-10-13T20:27:13.93Z" }793wheels = [794 { url = "https://files.pythonhosted.org/packages/26/60/1ddff83a56d33aaf6f10ec8ce84b4c007d9368b21008876fceda7e7381ef/sphinx-8.1.3-py3-none-any.whl", hash = "sha256:09719015511837b76bf6e03e42eb7595ac8c2e41eeb9c29c5b755c6b677992a2", size = 3487125, upload-time = "2024-10-13T20:27:10.448Z" },795]796797[[package]]798name = "sphinx"799version = "8.2.3"800source = { registry = "https://pypi.org/simple" }801resolution-markers = [802 "python_full_version >= '3.12'",803 "python_full_version == '3.11.*'",804]805dependencies = [806 { name = "alabaster", marker = "python_full_version >= '3.11'" },807 { name = "babel", marker = "python_full_version >= '3.11'" },808 { name = "colorama", marker = "python_full_version >= '3.11' and sys_platform == 'win32'" },809 { name = "docutils", marker = "python_full_version >= '3.11'" },810 { name = "imagesize", marker = "python_full_version >= '3.11'" },811 { name = "jinja2", marker = "python_full_version >= '3.11'" },812 { name = "packaging", marker = "python_full_version >= '3.11'" },813 { name = "pygments", marker = "python_full_version >= '3.11'" },814 { name = "requests", marker = "python_full_version >= '3.11'" },815 { name = "roman-numerals-py", marker = "python_full_version >= '3.11'" },816 { name = "snowballstemmer", marker = "python_full_version >= '3.11'" },817 { name = "sphinxcontrib-applehelp", marker = "python_full_version >= '3.11'" },818 { name = "sphinxcontrib-devhelp", marker = "python_full_version >= '3.11'" },819 { name = "sphinxcontrib-htmlhelp", marker = "python_full_version >= '3.11'" },820 { name = "sphinxcontrib-jsmath", marker = "python_full_version >= '3.11'" },821 { name = "sphinxcontrib-qthelp", marker = "python_full_version >= '3.11'" },822 { name = "sphinxcontrib-serializinghtml", marker = "python_full_version >= '3.11'" },823]824sdist = { url = "https://files.pythonhosted.org/packages/38/ad/4360e50ed56cb483667b8e6dadf2d3fda62359593faabbe749a27c4eaca6/sphinx-8.2.3.tar.gz", hash = "sha256:398ad29dee7f63a75888314e9424d40f52ce5a6a87ae88e7071e80af296ec348", size = 8321876, upload-time = "2025-03-02T22:31:59.658Z" }825wheels = [826 { url = "https://files.pythonhosted.org/packages/31/53/136e9eca6e0b9dc0e1962e2c908fbea2e5ac000c2a2fbd9a35797958c48b/sphinx-8.2.3-py3-none-any.whl", hash = "sha256:4405915165f13521d875a8c29c8970800a0141c14cc5416a38feca4ea5d9b9c3", size = 3589741, upload-time = "2025-03-02T22:31:56.836Z" },827]828829[[package]]830name = "sphinx-autobuild"831version = "2024.10.3"832source = { registry = "https://pypi.org/simple" }833dependencies = [834 { name = "colorama" },835 { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },836 { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },837 { name = "starlette" },838 { name = "uvicorn" },839 { name = "watchfiles" },840 { name = "websockets" },841]842sdist = { url = "https://files.pythonhosted.org/packages/a5/2c/155e1de2c1ba96a72e5dba152c509a8b41e047ee5c2def9e9f0d812f8be7/sphinx_autobuild-2024.10.3.tar.gz", hash = "sha256:248150f8f333e825107b6d4b86113ab28fa51750e5f9ae63b59dc339be951fb1", size = 14023, upload-time = "2024-10-02T23:15:30.172Z" }843wheels = [844 { url = "https://files.pythonhosted.org/packages/18/c0/eba125db38c84d3c74717008fd3cb5000b68cd7e2cbafd1349c6a38c3d3b/sphinx_autobuild-2024.10.3-py3-none-any.whl", hash = "sha256:158e16c36f9d633e613c9aaf81c19b0fc458ca78b112533b20dafcda430d60fa", size = 11908, upload-time = "2024-10-02T23:15:28.739Z" },845]846847[[package]]848name = "sphinx-notfound-page"849version = "1.1.0"850source = { registry = "https://pypi.org/simple" }851dependencies = [852 { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },853 { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },854]855sdist = { url = "https://files.pythonhosted.org/packages/6a/b2/67603444a8ee97b4a8ea71b0a9d6bab1727ed65e362c87e02f818ee57b8a/sphinx_notfound_page-1.1.0.tar.gz", hash = "sha256:913e1754370bb3db201d9300d458a8b8b5fb22e9246a816643a819a9ea2b8067", size = 7392, upload-time = "2025-01-28T18:45:02.871Z" }856wheels = [857 { url = "https://files.pythonhosted.org/packages/cd/d4/019fe439c840a7966012bbb95ccbdd81c5c10271749706793b43beb05145/sphinx_notfound_page-1.1.0-py3-none-any.whl", hash = "sha256:835dc76ff7914577a1f58d80a2c8418fb6138c0932c8da8adce4d9096fbcd389", size = 8167, upload-time = "2025-01-28T18:45:00.465Z" },858]859860[[package]]861name = "sphinx-tabs"862version = "3.4.7"863source = { registry = "https://pypi.org/simple" }864dependencies = [865 { name = "docutils" },866 { name = "pygments" },867 { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },868 { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },869]870sdist = { url = "https://files.pythonhosted.org/packages/6a/53/a9a91995cb365e589f413b77fc75f1c0e9b4ac61bfa8da52a779ad855cc0/sphinx-tabs-3.4.7.tar.gz", hash = "sha256:991ad4a424ff54119799ba1491701aa8130dd43509474aef45a81c42d889784d", size = 15891, upload-time = "2024-10-08T13:37:27.887Z" }871wheels = [872 { url = "https://files.pythonhosted.org/packages/6b/c6/f47505b564b918a3ba60c1e99232d4942c4a7e44ecaae603e829e3d05dae/sphinx_tabs-3.4.7-py3-none-any.whl", hash = "sha256:c12d7a36fd413b369e9e9967a0a4015781b71a9c393575419834f19204bd1915", size = 9727, upload-time = "2024-10-08T13:37:26.192Z" },873]874875[[package]]876name = "sphinxcontrib-applehelp"877version = "2.0.0"878source = { registry = "https://pypi.org/simple" }879sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053, upload-time = "2024-07-29T01:09:00.465Z" }880wheels = [881 { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300, upload-time = "2024-07-29T01:08:58.99Z" },882]883884[[package]]885name = "sphinxcontrib-devhelp"886version = "2.0.0"887source = { registry = "https://pypi.org/simple" }888sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967, upload-time = "2024-07-29T01:09:23.417Z" }889wheels = [890 { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530, upload-time = "2024-07-29T01:09:21.945Z" },891]892893[[package]]894name = "sphinxcontrib-htmlhelp"895version = "2.1.0"896source = { registry = "https://pypi.org/simple" }897sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617, upload-time = "2024-07-29T01:09:37.889Z" }898wheels = [899 { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705, upload-time = "2024-07-29T01:09:36.407Z" },900]901902[[package]]903name = "sphinxcontrib-jsmath"904version = "1.0.1"905source = { registry = "https://pypi.org/simple" }906sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787, upload-time = "2019-01-21T16:10:16.347Z" }907wheels = [908 { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071, upload-time = "2019-01-21T16:10:14.333Z" },909]910911[[package]]912name = "sphinxcontrib-log-cabinet"913version = "1.0.1"914source = { registry = "https://pypi.org/simple" }915dependencies = [916 { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },917 { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },918]919sdist = { url = "https://files.pythonhosted.org/packages/75/26/0687391e10c605a4d0c7ebe118c57c51ecc687128bcdae5803d9b96def81/sphinxcontrib-log-cabinet-1.0.1.tar.gz", hash = "sha256:103b2e62df4e57abb943bea05ee9c2beb7da922222c8b77314ffd6ab9901c558", size = 4072, upload-time = "2019-07-05T23:22:34.596Z" }920wheels = [921 { url = "https://files.pythonhosted.org/packages/27/e7/dbfc155c1b4c429a9a8149032a56bfb7bab4efabc656abb24ab4619c715d/sphinxcontrib_log_cabinet-1.0.1-py2.py3-none-any.whl", hash = "sha256:3decc888e8e453d1912cd95d50efb0794a4670a214efa65e71a7de277dcfe2cd", size = 4887, upload-time = "2019-07-05T23:22:32.969Z" },922]923924[[package]]925name = "sphinxcontrib-qthelp"926version = "2.0.0"927source = { registry = "https://pypi.org/simple" }928sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165, upload-time = "2024-07-29T01:09:56.435Z" }929wheels = [930 { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743, upload-time = "2024-07-29T01:09:54.885Z" },931]932933[[package]]934name = "sphinxcontrib-serializinghtml"935version = "2.0.0"936source = { registry = "https://pypi.org/simple" }937sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080, upload-time = "2024-07-29T01:10:09.332Z" }938wheels = [939 { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072, upload-time = "2024-07-29T01:10:08.203Z" },940]941942[[package]]943name = "starlette"944version = "0.47.0"945source = { registry = "https://pypi.org/simple" }946dependencies = [947 { name = "anyio" },948]949sdist = { url = "https://files.pythonhosted.org/packages/8b/d0/0332bd8a25779a0e2082b0e179805ad39afad642938b371ae0882e7f880d/starlette-0.47.0.tar.gz", hash = "sha256:1f64887e94a447fed5f23309fb6890ef23349b7e478faa7b24a851cd4eb844af", size = 2582856, upload-time = "2025-05-29T15:45:27.628Z" }950wheels = [951 { url = "https://files.pythonhosted.org/packages/e3/81/c60b35fe9674f63b38a8feafc414fca0da378a9dbd5fa1e0b8d23fcc7a9b/starlette-0.47.0-py3-none-any.whl", hash = "sha256:9d052d4933683af40ffd47c7465433570b4949dc937e20ad1d73b34e72f10c37", size = 72796, upload-time = "2025-05-29T15:45:26.305Z" },952]953954[[package]]955name = "tomli"956version = "2.2.1"957source = { registry = "https://pypi.org/simple" }958sdist = { url = "https://files.pythonhosted.org/packages/18/87/302344fed471e44a87289cf4967697d07e532f2421fdaf868a303cbae4ff/tomli-2.2.1.tar.gz", hash = "sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff", size = 17175, upload-time = "2024-11-27T22:38:36.873Z" }959wheels = [960 { url = "https://files.pythonhosted.org/packages/43/ca/75707e6efa2b37c77dadb324ae7d9571cb424e61ea73fad7c56c2d14527f/tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249", size = 131077, upload-time = "2024-11-27T22:37:54.956Z" },961 { url = "https://files.pythonhosted.org/packages/c7/16/51ae563a8615d472fdbffc43a3f3d46588c264ac4f024f63f01283becfbb/tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6", size = 123429, upload-time = "2024-11-27T22:37:56.698Z" },962 { url = "https://files.pythonhosted.org/packages/f1/dd/4f6cd1e7b160041db83c694abc78e100473c15d54620083dbd5aae7b990e/tomli-2.2.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a", size = 226067, upload-time = "2024-11-27T22:37:57.63Z" },963 { url = "https://files.pythonhosted.org/packages/a9/6b/c54ede5dc70d648cc6361eaf429304b02f2871a345bbdd51e993d6cdf550/tomli-2.2.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee", size = 236030, upload-time = "2024-11-27T22:37:59.344Z" },964 { url = "https://files.pythonhosted.org/packages/1f/47/999514fa49cfaf7a92c805a86c3c43f4215621855d151b61c602abb38091/tomli-2.2.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e", size = 240898, upload-time = "2024-11-27T22:38:00.429Z" },965 { url = "https://files.pythonhosted.org/packages/73/41/0a01279a7ae09ee1573b423318e7934674ce06eb33f50936655071d81a24/tomli-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4", size = 229894, upload-time = "2024-11-27T22:38:02.094Z" },966 { url = "https://files.pythonhosted.org/packages/55/18/5d8bc5b0a0362311ce4d18830a5d28943667599a60d20118074ea1b01bb7/tomli-2.2.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106", size = 245319, upload-time = "2024-11-27T22:38:03.206Z" },967 { url = "https://files.pythonhosted.org/packages/92/a3/7ade0576d17f3cdf5ff44d61390d4b3febb8a9fc2b480c75c47ea048c646/tomli-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8", size = 238273, upload-time = "2024-11-27T22:38:04.217Z" },968 { url = "https://files.pythonhosted.org/packages/72/6f/fa64ef058ac1446a1e51110c375339b3ec6be245af9d14c87c4a6412dd32/tomli-2.2.1-cp311-cp311-win32.whl", hash = "sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff", size = 98310, upload-time = "2024-11-27T22:38:05.908Z" },969 { url = "https://files.pythonhosted.org/packages/6a/1c/4a2dcde4a51b81be3530565e92eda625d94dafb46dbeb15069df4caffc34/tomli-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b", size = 108309, upload-time = "2024-11-27T22:38:06.812Z" },970 { url = "https://files.pythonhosted.org/packages/52/e1/f8af4c2fcde17500422858155aeb0d7e93477a0d59a98e56cbfe75070fd0/tomli-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea", size = 132762, upload-time = "2024-11-27T22:38:07.731Z" },971 { url = "https://files.pythonhosted.org/packages/03/b8/152c68bb84fc00396b83e7bbddd5ec0bd3dd409db4195e2a9b3e398ad2e3/tomli-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8", size = 123453, upload-time = "2024-11-27T22:38:09.384Z" },972 { url = "https://files.pythonhosted.org/packages/c8/d6/fc9267af9166f79ac528ff7e8c55c8181ded34eb4b0e93daa767b8841573/tomli-2.2.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192", size = 233486, upload-time = "2024-11-27T22:38:10.329Z" },973 { url = "https://files.pythonhosted.org/packages/5c/51/51c3f2884d7bab89af25f678447ea7d297b53b5a3b5730a7cb2ef6069f07/tomli-2.2.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222", size = 242349, upload-time = "2024-11-27T22:38:11.443Z" },974 { url = "https://files.pythonhosted.org/packages/ab/df/bfa89627d13a5cc22402e441e8a931ef2108403db390ff3345c05253935e/tomli-2.2.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77", size = 252159, upload-time = "2024-11-27T22:38:13.099Z" },975 { url = "https://files.pythonhosted.org/packages/9e/6e/fa2b916dced65763a5168c6ccb91066f7639bdc88b48adda990db10c8c0b/tomli-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6", size = 237243, upload-time = "2024-11-27T22:38:14.766Z" },976 { url = "https://files.pythonhosted.org/packages/b4/04/885d3b1f650e1153cbb93a6a9782c58a972b94ea4483ae4ac5cedd5e4a09/tomli-2.2.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd", size = 259645, upload-time = "2024-11-27T22:38:15.843Z" },977 { url = "https://files.pythonhosted.org/packages/9c/de/6b432d66e986e501586da298e28ebeefd3edc2c780f3ad73d22566034239/tomli-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e", size = 244584, upload-time = "2024-11-27T22:38:17.645Z" },978 { url = "https://files.pythonhosted.org/packages/1c/9a/47c0449b98e6e7d1be6cbac02f93dd79003234ddc4aaab6ba07a9a7482e2/tomli-2.2.1-cp312-cp312-win32.whl", hash = "sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98", size = 98875, upload-time = "2024-11-27T22:38:19.159Z" },979 { url = "https://files.pythonhosted.org/packages/ef/60/9b9638f081c6f1261e2688bd487625cd1e660d0a85bd469e91d8db969734/tomli-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4", size = 109418, upload-time = "2024-11-27T22:38:20.064Z" },980 { url = "https://files.pythonhosted.org/packages/04/90/2ee5f2e0362cb8a0b6499dc44f4d7d48f8fff06d28ba46e6f1eaa61a1388/tomli-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7", size = 132708, upload-time = "2024-11-27T22:38:21.659Z" },981 { url = "https://files.pythonhosted.org/packages/c0/ec/46b4108816de6b385141f082ba99e315501ccd0a2ea23db4a100dd3990ea/tomli-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c", size = 123582, upload-time = "2024-11-27T22:38:22.693Z" },982 { url = "https://files.pythonhosted.org/packages/a0/bd/b470466d0137b37b68d24556c38a0cc819e8febe392d5b199dcd7f578365/tomli-2.2.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13", size = 232543, upload-time = "2024-11-27T22:38:24.367Z" },983 { url = "https://files.pythonhosted.org/packages/d9/e5/82e80ff3b751373f7cead2815bcbe2d51c895b3c990686741a8e56ec42ab/tomli-2.2.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281", size = 241691, upload-time = "2024-11-27T22:38:26.081Z" },984 { url = "https://files.pythonhosted.org/packages/05/7e/2a110bc2713557d6a1bfb06af23dd01e7dde52b6ee7dadc589868f9abfac/tomli-2.2.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272", size = 251170, upload-time = "2024-11-27T22:38:27.921Z" },985 { url = "https://files.pythonhosted.org/packages/64/7b/22d713946efe00e0adbcdfd6d1aa119ae03fd0b60ebed51ebb3fa9f5a2e5/tomli-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140", size = 236530, upload-time = "2024-11-27T22:38:29.591Z" },986 { url = "https://files.pythonhosted.org/packages/38/31/3a76f67da4b0cf37b742ca76beaf819dca0ebef26d78fc794a576e08accf/tomli-2.2.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2", size = 258666, upload-time = "2024-11-27T22:38:30.639Z" },987 { url = "https://files.pythonhosted.org/packages/07/10/5af1293da642aded87e8a988753945d0cf7e00a9452d3911dd3bb354c9e2/tomli-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744", size = 243954, upload-time = "2024-11-27T22:38:31.702Z" },988 { url = "https://files.pythonhosted.org/packages/5b/b9/1ed31d167be802da0fc95020d04cd27b7d7065cc6fbefdd2f9186f60d7bd/tomli-2.2.1-cp313-cp313-win32.whl", hash = "sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec", size = 98724, upload-time = "2024-11-27T22:38:32.837Z" },989 { url = "https://files.pythonhosted.org/packages/c7/32/b0963458706accd9afcfeb867c0f9175a741bf7b19cd424230714d722198/tomli-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69", size = 109383, upload-time = "2024-11-27T22:38:34.455Z" },990 { url = "https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl", hash = "sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc", size = 14257, upload-time = "2024-11-27T22:38:35.385Z" },991]992993[[package]]994name = "tox"995version = "4.26.0"996source = { registry = "https://pypi.org/simple" }997dependencies = [998 { name = "cachetools" },999 { name = "chardet" },1000 { name = "colorama" },1001 { name = "filelock" },1002 { name = "packaging" },1003 { name = "platformdirs" },1004 { name = "pluggy" },1005 { name = "pyproject-api" },1006 { name = "tomli", marker = "python_full_version < '3.11'" },1007 { name = "typing-extensions", marker = "python_full_version < '3.11'" },1008 { name = "virtualenv" },1009]1010sdist = { url = "https://files.pythonhosted.org/packages/fd/3c/dcec0c00321a107f7f697fd00754c5112572ea6dcacb40b16d8c3eea7c37/tox-4.26.0.tar.gz", hash = "sha256:a83b3b67b0159fa58e44e646505079e35a43317a62d2ae94725e0586266faeca", size = 197260, upload-time = "2025-05-13T15:04:28.481Z" }1011wheels = [1012 { url = "https://files.pythonhosted.org/packages/de/14/f58b4087cf248b18c795b5c838c7a8d1428dfb07cb468dad3ec7f54041ab/tox-4.26.0-py3-none-any.whl", hash = "sha256:75f17aaf09face9b97bd41645028d9f722301e912be8b4c65a3f938024560224", size = 172761, upload-time = "2025-05-13T15:04:26.207Z" },1013]10141015[[package]]1016name = "tox-uv"1017version = "1.26.0"1018source = { registry = "https://pypi.org/simple" }1019dependencies = [1020 { name = "packaging" },1021 { name = "tox" },1022 { name = "uv" },1023]1024sdist = { url = "https://files.pythonhosted.org/packages/7e/da/37790b4a176f05b0ec7a699f54979078fc726f743640aa5c10c551c27edb/tox_uv-1.26.0.tar.gz", hash = "sha256:5045880c467eed58a98f7eaa7fe286b7ef688e2c56f2123d53e275011495c381", size = 21523, upload-time = "2025-05-27T14:51:42.702Z" }1025wheels = [1026 { url = "https://files.pythonhosted.org/packages/46/b8/04c5cb83da072a3f96d357d68a551f5e97e162573c2011a09437df995811/tox_uv-1.26.0-py3-none-any.whl", hash = "sha256:894b2e7274fd6131c3bd1012813edc858753cad67727050c21cd973a08e691c8", size = 16562, upload-time = "2025-05-27T14:51:40.803Z" },1027]10281029[[package]]1030name = "typing-extensions"1031version = "4.14.0"1032source = { registry = "https://pypi.org/simple" }1033sdist = { url = "https://files.pythonhosted.org/packages/d1/bc/51647cd02527e87d05cb083ccc402f93e441606ff1f01739a62c8ad09ba5/typing_extensions-4.14.0.tar.gz", hash = "sha256:8676b788e32f02ab42d9e7c61324048ae4c6d844a399eebace3d4979d75ceef4", size = 107423, upload-time = "2025-06-02T14:52:11.399Z" }1034wheels = [1035 { url = "https://files.pythonhosted.org/packages/69/e0/552843e0d356fbb5256d21449fa957fa4eff3bbc135a74a691ee70c7c5da/typing_extensions-4.14.0-py3-none-any.whl", hash = "sha256:a1514509136dd0b477638fc68d6a91497af5076466ad0fa6c338e44e359944af", size = 43839, upload-time = "2025-06-02T14:52:10.026Z" },1036]10371038[[package]]1039name = "urllib3"1040version = "2.4.0"1041source = { registry = "https://pypi.org/simple" }1042sdist = { url = "https://files.pythonhosted.org/packages/8a/78/16493d9c386d8e60e442a35feac5e00f0913c0f4b7c217c11e8ec2ff53e0/urllib3-2.4.0.tar.gz", hash = "sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466", size = 390672, upload-time = "2025-04-10T15:23:39.232Z" }1043wheels = [1044 { url = "https://files.pythonhosted.org/packages/6b/11/cc635220681e93a0183390e26485430ca2c7b5f9d33b15c74c2861cb8091/urllib3-2.4.0-py3-none-any.whl", hash = "sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813", size = 128680, upload-time = "2025-04-10T15:23:37.377Z" },1045]10461047[[package]]1048name = "uv"1049version = "0.7.12"1050source = { registry = "https://pypi.org/simple" }1051sdist = { url = "https://files.pythonhosted.org/packages/67/35/360a4aa325254b7f11d0898d30588861428659011b34f1e19c40fdd15db6/uv-0.7.12.tar.gz", hash = "sha256:4aa152e6a70d5662ca66a918f697bf8fb710f391068aa7d04e032af2edebb095", size = 3298683, upload-time = "2025-06-06T20:39:04.308Z" }1052wheels = [1053 { url = "https://files.pythonhosted.org/packages/f8/64/ee9f1b27f006c49a6765e9655ab93e7c8cbd6f0bf8b731f30f608b0be9fd/uv-0.7.12-py3-none-linux_armv6l.whl", hash = "sha256:81824caf5756ffee54b4c937d92d7c8c224c416270c90a83b9b4a973f6e4e559", size = 17024991, upload-time = "2025-06-06T20:38:17.053Z" },1054 { url = "https://files.pythonhosted.org/packages/43/aa/f42707faa13a9c1b4f662456b2dca4bde169eb921f135319d8856c6e5e8e/uv-0.7.12-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:02e67c5f9d141fb25976cddb28abceaf715412ed83070cb9b87c5c488c8451af", size = 17097383, upload-time = "2025-06-06T20:38:21.174Z" },1055 { url = "https://files.pythonhosted.org/packages/b9/a9/0f27e16e161f98240a328b5201b8abf178b751fde4fc56c54c1321812cd5/uv-0.7.12-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e70a4393fd6a09b056e1ac500fe2b796d26c30783194868c6801ea08c3bbf863", size = 15812649, upload-time = "2025-06-06T20:38:23.51Z" },1056 { url = "https://files.pythonhosted.org/packages/0b/eb/605d8f1d08606024209d0e31c3799c696199a887260ee1db52663e4da2e8/uv-0.7.12-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:bb47326b9c4802db28e11f1aab174d5c9c0a8b26ed0a83094d3882dd8f5049ad", size = 16344497, upload-time = "2025-06-06T20:38:25.899Z" },1057 { url = "https://files.pythonhosted.org/packages/b7/86/3503eb869fa17d607cc296a6514db52ec73c2ec85ad608952a207fd2e8ff/uv-0.7.12-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:14214a51e0ae0f0e8dbcac35a29722c45dbf40d0fd37309897642f7989af6caf", size = 16773525, upload-time = "2025-06-06T20:38:28.619Z" },1058 { url = "https://files.pythonhosted.org/packages/9b/d6/868fb3f0b9f2a0d2f14cb8079171b862adbd782e47e0469dad3d3d71c938/uv-0.7.12-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0fa630d865111c26f26c5e6f4547a73b13284f098471a4ca982d7b0caf0e658b", size = 17551173, upload-time = "2025-06-06T20:38:31.166Z" },1059 { url = "https://files.pythonhosted.org/packages/d4/a8/b5be1c67c7894caf178e850903ac25f465e3508a6eada2ae735b187dc39d/uv-0.7.12-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:1557a154d2c36030ff0b707f3c2bfafd977e54fcd4d628dd0fa8a265449e9f13", size = 18359491, upload-time = "2025-06-06T20:38:33.569Z" },1060 { url = "https://files.pythonhosted.org/packages/95/23/f62bab13f67ed785f7ad01546c499809d1db71b03f94950380f0bc407625/uv-0.7.12-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7e0ba7767b21d58d65703c3cd43814ccfe06d7664ac42b3589d5f2b72486b903", size = 18098855, upload-time = "2025-06-06T20:38:36.029Z" },1061 { url = "https://files.pythonhosted.org/packages/a6/4a/db21a5d3839771799af2df366cc5ed0933ebe9fc9e920f212e33dc00136e/uv-0.7.12-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e0672dc5dc1b0ae7191d11ecae8bb794c7e860936b66c2bc3855bd0dee17fca1", size = 18206282, upload-time = "2025-06-06T20:38:38.582Z" },1062 { url = "https://files.pythonhosted.org/packages/bc/ae/fcfd916cbc109c5626dc25b208395b47ba12b27af82f3bb8e247b4e95692/uv-0.7.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e34b4ad4288828210c2e075934009903514ca97bd603aced7d0755040b4d0489", size = 17777690, upload-time = "2025-06-06T20:38:41.021Z" },1063 { url = "https://files.pythonhosted.org/packages/92/78/608163b35ffaf1054cd10197646b6336e7be7b6a51dfef6d98a91600c6be/uv-0.7.12-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:8a7ed9e94ec409bfc7181ee274d1b0ed6292698a20df0ae035ce422224863af5", size = 16599406, upload-time = "2025-06-06T20:38:43.72Z" },1064 { url = "https://files.pythonhosted.org/packages/d4/d6/6fe3b16390472a9d31dd1e0e7e3759b884d71e8a0dff1baf4a753b4adaaa/uv-0.7.12-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:85e8d3dea95016a45ed8c48343f98734d1b5c4be7bba26257d4c8873059646fa", size = 16714823, upload-time = "2025-06-06T20:38:45.949Z" },1065 { url = "https://files.pythonhosted.org/packages/b3/a5/b0432a25eaa23e9f909649321784b8e4be4579e9957eb5d369aa30c79164/uv-0.7.12-py3-none-musllinux_1_1_i686.whl", hash = "sha256:01310c45d55f6e7580124c9b1f7e3586b9609c4f8e5a78558a75951b03541bb2", size = 17086446, upload-time = "2025-06-06T20:38:48.648Z" },1066 { url = "https://files.pythonhosted.org/packages/da/d8/673591f34f897aa4216144a513e60c2004399155c47e7b550612960359c6/uv-0.7.12-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:4c697ef9d9f6b6f42df5a661efa8a745c0e4c330039d45b549b2ca7e7b66f8a5", size = 17903789, upload-time = "2025-06-06T20:38:51.864Z" },1067 { url = "https://files.pythonhosted.org/packages/15/09/e476187c0a1da78b9c2021f3c3ab31ed2469a70d222bde5dc892236b3c4f/uv-0.7.12-py3-none-win32.whl", hash = "sha256:6008abf92c8d37060944377d89bf9f514aa18370391d9d63dc7d449dac94aca1", size = 17344011, upload-time = "2025-06-06T20:38:54.276Z" },1068 { url = "https://files.pythonhosted.org/packages/08/9e/c52c7f50280e57110ca79b6805877f50514d9a777d31a683a4eb1de52312/uv-0.7.12-py3-none-win_amd64.whl", hash = "sha256:bb57bd26becd86194788f832af373b6ba431314fa0f6f7e904c90cac1818a7dc", size = 18803328, upload-time = "2025-06-06T20:38:59.368Z" },1069 { url = "https://files.pythonhosted.org/packages/8e/35/4800ff7bc1663d9f967eabc8440074f906c8a98ea28d1aae66d2d19b7ae9/uv-0.7.12-py3-none-win_arm64.whl", hash = "sha256:8aba24e12ded2f2974a2f213e55daabf78002613d3772c1396fc924c6682cd27", size = 17450522, upload-time = "2025-06-06T20:39:01.963Z" },1070]10711072[[package]]1073name = "uvicorn"1074version = "0.34.3"1075source = { registry = "https://pypi.org/simple" }1076dependencies = [1077 { name = "click" },1078 { name = "h11" },1079 { name = "typing-extensions", marker = "python_full_version < '3.11'" },1080]1081sdist = { url = "https://files.pythonhosted.org/packages/de/ad/713be230bcda622eaa35c28f0d328c3675c371238470abdea52417f17a8e/uvicorn-0.34.3.tar.gz", hash = "sha256:35919a9a979d7a59334b6b10e05d77c1d0d574c50e0fc98b8b1a0f165708b55a", size = 76631, upload-time = "2025-06-01T07:48:17.531Z" }1082wheels = [1083 { url = "https://files.pythonhosted.org/packages/6d/0d/8adfeaa62945f90d19ddc461c55f4a50c258af7662d34b6a3d5d1f8646f6/uvicorn-0.34.3-py3-none-any.whl", hash = "sha256:16246631db62bdfbf069b0645177d6e8a77ba950cfedbfd093acef9444e4d885", size = 62431, upload-time = "2025-06-01T07:48:15.664Z" },1084]10851086[[package]]1087name = "virtualenv"1088version = "20.31.2"1089source = { registry = "https://pypi.org/simple" }1090dependencies = [1091 { name = "distlib" },1092 { name = "filelock" },1093 { name = "platformdirs" },1094]1095sdist = { url = "https://files.pythonhosted.org/packages/56/2c/444f465fb2c65f40c3a104fd0c495184c4f2336d65baf398e3c75d72ea94/virtualenv-20.31.2.tar.gz", hash = "sha256:e10c0a9d02835e592521be48b332b6caee6887f332c111aa79a09b9e79efc2af", size = 6076316, upload-time = "2025-05-08T17:58:23.811Z" }1096wheels = [1097 { url = "https://files.pythonhosted.org/packages/f3/40/b1c265d4b2b62b58576588510fc4d1fe60a86319c8de99fd8e9fec617d2c/virtualenv-20.31.2-py3-none-any.whl", hash = "sha256:36efd0d9650ee985f0cad72065001e66d49a6f24eb44d98980f630686243cf11", size = 6057982, upload-time = "2025-05-08T17:58:21.15Z" },1098]10991100[[package]]1101name = "watchfiles"1102version = "1.0.5"1103source = { registry = "https://pypi.org/simple" }1104dependencies = [1105 { name = "anyio" },1106]1107sdist = { url = "https://files.pythonhosted.org/packages/03/e2/8ed598c42057de7aa5d97c472254af4906ff0a59a66699d426fc9ef795d7/watchfiles-1.0.5.tar.gz", hash = "sha256:b7529b5dcc114679d43827d8c35a07c493ad6f083633d573d81c660abc5979e9", size = 94537, upload-time = "2025-04-08T10:36:26.722Z" }1108wheels = [1109 { url = "https://files.pythonhosted.org/packages/af/4d/d02e6ea147bb7fff5fd109c694a95109612f419abed46548a930e7f7afa3/watchfiles-1.0.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:5c40fe7dd9e5f81e0847b1ea64e1f5dd79dd61afbedb57759df06767ac719b40", size = 405632, upload-time = "2025-04-08T10:34:41.832Z" },1110 { url = "https://files.pythonhosted.org/packages/60/31/9ee50e29129d53a9a92ccf1d3992751dc56fc3c8f6ee721be1c7b9c81763/watchfiles-1.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8c0db396e6003d99bb2d7232c957b5f0b5634bbd1b24e381a5afcc880f7373fb", size = 395734, upload-time = "2025-04-08T10:34:44.236Z" },1111 { url = "https://files.pythonhosted.org/packages/ad/8c/759176c97195306f028024f878e7f1c776bda66ccc5c68fa51e699cf8f1d/watchfiles-1.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b551d4fb482fc57d852b4541f911ba28957d051c8776e79c3b4a51eb5e2a1b11", size = 455008, upload-time = "2025-04-08T10:34:45.617Z" },1112 { url = "https://files.pythonhosted.org/packages/55/1a/5e977250c795ee79a0229e3b7f5e3a1b664e4e450756a22da84d2f4979fe/watchfiles-1.0.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:830aa432ba5c491d52a15b51526c29e4a4b92bf4f92253787f9726fe01519487", size = 459029, upload-time = "2025-04-08T10:34:46.814Z" },1113 { url = "https://files.pythonhosted.org/packages/e6/17/884cf039333605c1d6e296cf5be35fad0836953c3dfd2adb71b72f9dbcd0/watchfiles-1.0.5-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a16512051a822a416b0d477d5f8c0e67b67c1a20d9acecb0aafa3aa4d6e7d256", size = 488916, upload-time = "2025-04-08T10:34:48.571Z" },1114 { url = "https://files.pythonhosted.org/packages/ef/e0/bcb6e64b45837056c0a40f3a2db3ef51c2ced19fda38484fa7508e00632c/watchfiles-1.0.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfe0cbc787770e52a96c6fda6726ace75be7f840cb327e1b08d7d54eadc3bc85", size = 523763, upload-time = "2025-04-08T10:34:50.268Z" },1115 { url = "https://files.pythonhosted.org/packages/24/e9/f67e9199f3bb35c1837447ecf07e9830ec00ff5d35a61e08c2cd67217949/watchfiles-1.0.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d363152c5e16b29d66cbde8fa614f9e313e6f94a8204eaab268db52231fe5358", size = 502891, upload-time = "2025-04-08T10:34:51.419Z" },1116 { url = "https://files.pythonhosted.org/packages/23/ed/a6cf815f215632f5c8065e9c41fe872025ffea35aa1f80499f86eae922db/watchfiles-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ee32c9a9bee4d0b7bd7cbeb53cb185cf0b622ac761efaa2eba84006c3b3a614", size = 454921, upload-time = "2025-04-08T10:34:52.67Z" },1117 { url = "https://files.pythonhosted.org/packages/92/4c/e14978599b80cde8486ab5a77a821e8a982ae8e2fcb22af7b0886a033ec8/watchfiles-1.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29c7fd632ccaf5517c16a5188e36f6612d6472ccf55382db6c7fe3fcccb7f59f", size = 631422, upload-time = "2025-04-08T10:34:53.985Z" },1118 { url = "https://files.pythonhosted.org/packages/b2/1a/9263e34c3458f7614b657f974f4ee61fd72f58adce8b436e16450e054efd/watchfiles-1.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8e637810586e6fe380c8bc1b3910accd7f1d3a9a7262c8a78d4c8fb3ba6a2b3d", size = 625675, upload-time = "2025-04-08T10:34:55.173Z" },1119 { url = "https://files.pythonhosted.org/packages/96/1f/1803a18bd6ab04a0766386a19bcfe64641381a04939efdaa95f0e3b0eb58/watchfiles-1.0.5-cp310-cp310-win32.whl", hash = "sha256:cd47d063fbeabd4c6cae1d4bcaa38f0902f8dc5ed168072874ea11d0c7afc1ff", size = 277921, upload-time = "2025-04-08T10:34:56.318Z" },1120 { url = "https://files.pythonhosted.org/packages/c2/3b/29a89de074a7d6e8b4dc67c26e03d73313e4ecf0d6e97e942a65fa7c195e/watchfiles-1.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:86c0df05b47a79d80351cd179893f2f9c1b1cae49d96e8b3290c7f4bd0ca0a92", size = 291526, upload-time = "2025-04-08T10:34:57.95Z" },1121 { url = "https://files.pythonhosted.org/packages/39/f4/41b591f59021786ef517e1cdc3b510383551846703e03f204827854a96f8/watchfiles-1.0.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:237f9be419e977a0f8f6b2e7b0475ababe78ff1ab06822df95d914a945eac827", size = 405336, upload-time = "2025-04-08T10:34:59.359Z" },1122 { url = "https://files.pythonhosted.org/packages/ae/06/93789c135be4d6d0e4f63e96eea56dc54050b243eacc28439a26482b5235/watchfiles-1.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e0da39ff917af8b27a4bdc5a97ac577552a38aac0d260a859c1517ea3dc1a7c4", size = 395977, upload-time = "2025-04-08T10:35:00.522Z" },1123 { url = "https://files.pythonhosted.org/packages/d2/db/1cd89bd83728ca37054512d4d35ab69b5f12b8aa2ac9be3b0276b3bf06cc/watchfiles-1.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2cfcb3952350e95603f232a7a15f6c5f86c5375e46f0bd4ae70d43e3e063c13d", size = 455232, upload-time = "2025-04-08T10:35:01.698Z" },1124 { url = "https://files.pythonhosted.org/packages/40/90/d8a4d44ffe960517e487c9c04f77b06b8abf05eb680bed71c82b5f2cad62/watchfiles-1.0.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:68b2dddba7a4e6151384e252a5632efcaa9bc5d1c4b567f3cb621306b2ca9f63", size = 459151, upload-time = "2025-04-08T10:35:03.358Z" },1125 { url = "https://files.pythonhosted.org/packages/6c/da/267a1546f26465dead1719caaba3ce660657f83c9d9c052ba98fb8856e13/watchfiles-1.0.5-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:95cf944fcfc394c5f9de794ce581914900f82ff1f855326f25ebcf24d5397418", size = 489054, upload-time = "2025-04-08T10:35:04.561Z" },1126 { url = "https://files.pythonhosted.org/packages/b1/31/33850dfd5c6efb6f27d2465cc4c6b27c5a6f5ed53c6fa63b7263cf5f60f6/watchfiles-1.0.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ecf6cd9f83d7c023b1aba15d13f705ca7b7d38675c121f3cc4a6e25bd0857ee9", size = 523955, upload-time = "2025-04-08T10:35:05.786Z" },1127 { url = "https://files.pythonhosted.org/packages/09/84/b7d7b67856efb183a421f1416b44ca975cb2ea6c4544827955dfb01f7dc2/watchfiles-1.0.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:852de68acd6212cd6d33edf21e6f9e56e5d98c6add46f48244bd479d97c967c6", size = 502234, upload-time = "2025-04-08T10:35:07.187Z" },1128 { url = "https://files.pythonhosted.org/packages/71/87/6dc5ec6882a2254cfdd8b0718b684504e737273903b65d7338efaba08b52/watchfiles-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5730f3aa35e646103b53389d5bc77edfbf578ab6dab2e005142b5b80a35ef25", size = 454750, upload-time = "2025-04-08T10:35:08.859Z" },1129 { url = "https://files.pythonhosted.org/packages/3d/6c/3786c50213451a0ad15170d091570d4a6554976cf0df19878002fc96075a/watchfiles-1.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:18b3bd29954bc4abeeb4e9d9cf0b30227f0f206c86657674f544cb032296acd5", size = 631591, upload-time = "2025-04-08T10:35:10.64Z" },1130 { url = "https://files.pythonhosted.org/packages/1b/b3/1427425ade4e359a0deacce01a47a26024b2ccdb53098f9d64d497f6684c/watchfiles-1.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ba5552a1b07c8edbf197055bc9d518b8f0d98a1c6a73a293bc0726dce068ed01", size = 625370, upload-time = "2025-04-08T10:35:12.412Z" },1131 { url = "https://files.pythonhosted.org/packages/15/ba/f60e053b0b5b8145d682672024aa91370a29c5c921a88977eb565de34086/watchfiles-1.0.5-cp311-cp311-win32.whl", hash = "sha256:2f1fefb2e90e89959447bc0420fddd1e76f625784340d64a2f7d5983ef9ad246", size = 277791, upload-time = "2025-04-08T10:35:13.719Z" },1132 { url = "https://files.pythonhosted.org/packages/50/ed/7603c4e164225c12c0d4e8700b64bb00e01a6c4eeea372292a3856be33a4/watchfiles-1.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:b6e76ceb1dd18c8e29c73f47d41866972e891fc4cc7ba014f487def72c1cf096", size = 291622, upload-time = "2025-04-08T10:35:15.071Z" },1133 { url = "https://files.pythonhosted.org/packages/a2/c2/99bb7c96b4450e36877fde33690ded286ff555b5a5c1d925855d556968a1/watchfiles-1.0.5-cp311-cp311-win_arm64.whl", hash = "sha256:266710eb6fddc1f5e51843c70e3bebfb0f5e77cf4f27129278c70554104d19ed", size = 283699, upload-time = "2025-04-08T10:35:16.732Z" },1134 { url = "https://files.pythonhosted.org/packages/2a/8c/4f0b9bdb75a1bfbd9c78fad7d8854369283f74fe7cf03eb16be77054536d/watchfiles-1.0.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:b5eb568c2aa6018e26da9e6c86f3ec3fd958cee7f0311b35c2630fa4217d17f2", size = 401511, upload-time = "2025-04-08T10:35:17.956Z" },1135 { url = "https://files.pythonhosted.org/packages/dc/4e/7e15825def77f8bd359b6d3f379f0c9dac4eb09dd4ddd58fd7d14127179c/watchfiles-1.0.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0a04059f4923ce4e856b4b4e5e783a70f49d9663d22a4c3b3298165996d1377f", size = 392715, upload-time = "2025-04-08T10:35:19.202Z" },1136 { url = "https://files.pythonhosted.org/packages/58/65/b72fb817518728e08de5840d5d38571466c1b4a3f724d190cec909ee6f3f/watchfiles-1.0.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3e380c89983ce6e6fe2dd1e1921b9952fb4e6da882931abd1824c092ed495dec", size = 454138, upload-time = "2025-04-08T10:35:20.586Z" },1137 { url = "https://files.pythonhosted.org/packages/3e/a4/86833fd2ea2e50ae28989f5950b5c3f91022d67092bfec08f8300d8b347b/watchfiles-1.0.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fe43139b2c0fdc4a14d4f8d5b5d967f7a2777fd3d38ecf5b1ec669b0d7e43c21", size = 458592, upload-time = "2025-04-08T10:35:21.87Z" },1138 { url = "https://files.pythonhosted.org/packages/38/7e/42cb8df8be9a37e50dd3a818816501cf7a20d635d76d6bd65aae3dbbff68/watchfiles-1.0.5-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ee0822ce1b8a14fe5a066f93edd20aada932acfe348bede8aa2149f1a4489512", size = 487532, upload-time = "2025-04-08T10:35:23.143Z" },1139 { url = "https://files.pythonhosted.org/packages/fc/fd/13d26721c85d7f3df6169d8b495fcac8ab0dc8f0945ebea8845de4681dab/watchfiles-1.0.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a0dbcb1c2d8f2ab6e0a81c6699b236932bd264d4cef1ac475858d16c403de74d", size = 522865, upload-time = "2025-04-08T10:35:24.702Z" },1140 { url = "https://files.pythonhosted.org/packages/a1/0d/7f9ae243c04e96c5455d111e21b09087d0eeaf9a1369e13a01c7d3d82478/watchfiles-1.0.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a2014a2b18ad3ca53b1f6c23f8cd94a18ce930c1837bd891262c182640eb40a6", size = 499887, upload-time = "2025-04-08T10:35:25.969Z" },1141 { url = "https://files.pythonhosted.org/packages/8e/0f/a257766998e26aca4b3acf2ae97dff04b57071e991a510857d3799247c67/watchfiles-1.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10f6ae86d5cb647bf58f9f655fcf577f713915a5d69057a0371bc257e2553234", size = 454498, upload-time = "2025-04-08T10:35:27.353Z" },1142 { url = "https://files.pythonhosted.org/packages/81/79/8bf142575a03e0af9c3d5f8bcae911ee6683ae93a625d349d4ecf4c8f7df/watchfiles-1.0.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:1a7bac2bde1d661fb31f4d4e8e539e178774b76db3c2c17c4bb3e960a5de07a2", size = 630663, upload-time = "2025-04-08T10:35:28.685Z" },1143 { url = "https://files.pythonhosted.org/packages/f1/80/abe2e79f610e45c63a70d271caea90c49bbf93eb00fa947fa9b803a1d51f/watchfiles-1.0.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ab626da2fc1ac277bbf752446470b367f84b50295264d2d313e28dc4405d663", size = 625410, upload-time = "2025-04-08T10:35:30.42Z" },1144 { url = "https://files.pythonhosted.org/packages/91/6f/bc7fbecb84a41a9069c2c6eb6319f7f7df113adf113e358c57fc1aff7ff5/watchfiles-1.0.5-cp312-cp312-win32.whl", hash = "sha256:9f4571a783914feda92018ef3901dab8caf5b029325b5fe4558c074582815249", size = 277965, upload-time = "2025-04-08T10:35:32.023Z" },1145 { url = "https://files.pythonhosted.org/packages/99/a5/bf1c297ea6649ec59e935ab311f63d8af5faa8f0b86993e3282b984263e3/watchfiles-1.0.5-cp312-cp312-win_amd64.whl", hash = "sha256:360a398c3a19672cf93527f7e8d8b60d8275119c5d900f2e184d32483117a705", size = 291693, upload-time = "2025-04-08T10:35:33.225Z" },1146 { url = "https://files.pythonhosted.org/packages/7f/7b/fd01087cc21db5c47e5beae507b87965db341cce8a86f9eb12bf5219d4e0/watchfiles-1.0.5-cp312-cp312-win_arm64.whl", hash = "sha256:1a2902ede862969077b97523987c38db28abbe09fb19866e711485d9fbf0d417", size = 283287, upload-time = "2025-04-08T10:35:34.568Z" },1147 { url = "https://files.pythonhosted.org/packages/c7/62/435766874b704f39b2fecd8395a29042db2b5ec4005bd34523415e9bd2e0/watchfiles-1.0.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:0b289572c33a0deae62daa57e44a25b99b783e5f7aed81b314232b3d3c81a11d", size = 401531, upload-time = "2025-04-08T10:35:35.792Z" },1148 { url = "https://files.pythonhosted.org/packages/6e/a6/e52a02c05411b9cb02823e6797ef9bbba0bfaf1bb627da1634d44d8af833/watchfiles-1.0.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a056c2f692d65bf1e99c41045e3bdcaea3cb9e6b5a53dcaf60a5f3bd95fc9763", size = 392417, upload-time = "2025-04-08T10:35:37.048Z" },1149 { url = "https://files.pythonhosted.org/packages/3f/53/c4af6819770455932144e0109d4854437769672d7ad897e76e8e1673435d/watchfiles-1.0.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9dca99744991fc9850d18015c4f0438865414e50069670f5f7eee08340d8b40", size = 453423, upload-time = "2025-04-08T10:35:38.357Z" },1150 { url = "https://files.pythonhosted.org/packages/cb/d1/8e88df58bbbf819b8bc5cfbacd3c79e01b40261cad0fc84d1e1ebd778a07/watchfiles-1.0.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:894342d61d355446d02cd3988a7326af344143eb33a2fd5d38482a92072d9563", size = 458185, upload-time = "2025-04-08T10:35:39.708Z" },1151 { url = "https://files.pythonhosted.org/packages/ff/70/fffaa11962dd5429e47e478a18736d4e42bec42404f5ee3b92ef1b87ad60/watchfiles-1.0.5-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ab44e1580924d1ffd7b3938e02716d5ad190441965138b4aa1d1f31ea0877f04", size = 486696, upload-time = "2025-04-08T10:35:41.469Z" },1152 { url = "https://files.pythonhosted.org/packages/39/db/723c0328e8b3692d53eb273797d9a08be6ffb1d16f1c0ba2bdbdc2a3852c/watchfiles-1.0.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d6f9367b132078b2ceb8d066ff6c93a970a18c3029cea37bfd7b2d3dd2e5db8f", size = 522327, upload-time = "2025-04-08T10:35:43.289Z" },1153 { url = "https://files.pythonhosted.org/packages/cd/05/9fccc43c50c39a76b68343484b9da7b12d42d0859c37c61aec018c967a32/watchfiles-1.0.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f2e55a9b162e06e3f862fb61e399fe9f05d908d019d87bf5b496a04ef18a970a", size = 499741, upload-time = "2025-04-08T10:35:44.574Z" },1154 { url = "https://files.pythonhosted.org/packages/23/14/499e90c37fa518976782b10a18b18db9f55ea73ca14641615056f8194bb3/watchfiles-1.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0125f91f70e0732a9f8ee01e49515c35d38ba48db507a50c5bdcad9503af5827", size = 453995, upload-time = "2025-04-08T10:35:46.336Z" },1155 { url = "https://files.pythonhosted.org/packages/61/d9/f75d6840059320df5adecd2c687fbc18960a7f97b55c300d20f207d48aef/watchfiles-1.0.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:13bb21f8ba3248386337c9fa51c528868e6c34a707f729ab041c846d52a0c69a", size = 629693, upload-time = "2025-04-08T10:35:48.161Z" },1156 { url = "https://files.pythonhosted.org/packages/fc/17/180ca383f5061b61406477218c55d66ec118e6c0c51f02d8142895fcf0a9/watchfiles-1.0.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:839ebd0df4a18c5b3c1b890145b5a3f5f64063c2a0d02b13c76d78fe5de34936", size = 624677, upload-time = "2025-04-08T10:35:49.65Z" },1157 { url = "https://files.pythonhosted.org/packages/bf/15/714d6ef307f803f236d69ee9d421763707899d6298d9f3183e55e366d9af/watchfiles-1.0.5-cp313-cp313-win32.whl", hash = "sha256:4a8ec1e4e16e2d5bafc9ba82f7aaecfeec990ca7cd27e84fb6f191804ed2fcfc", size = 277804, upload-time = "2025-04-08T10:35:51.093Z" },1158 { url = "https://files.pythonhosted.org/packages/a8/b4/c57b99518fadf431f3ef47a610839e46e5f8abf9814f969859d1c65c02c7/watchfiles-1.0.5-cp313-cp313-win_amd64.whl", hash = "sha256:f436601594f15bf406518af922a89dcaab416568edb6f65c4e5bbbad1ea45c11", size = 291087, upload-time = "2025-04-08T10:35:52.458Z" },1159 { url = "https://files.pythonhosted.org/packages/1a/03/81f9fcc3963b3fc415cd4b0b2b39ee8cc136c42fb10a36acf38745e9d283/watchfiles-1.0.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f59b870db1f1ae5a9ac28245707d955c8721dd6565e7f411024fa374b5362d1d", size = 405947, upload-time = "2025-04-08T10:36:13.721Z" },1160 { url = "https://files.pythonhosted.org/packages/54/97/8c4213a852feb64807ec1d380f42d4fc8bfaef896bdbd94318f8fd7f3e4e/watchfiles-1.0.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:9475b0093767e1475095f2aeb1d219fb9664081d403d1dff81342df8cd707034", size = 397276, upload-time = "2025-04-08T10:36:15.131Z" },1161 { url = "https://files.pythonhosted.org/packages/78/12/d4464d19860cb9672efa45eec1b08f8472c478ed67dcd30647c51ada7aef/watchfiles-1.0.5-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc533aa50664ebd6c628b2f30591956519462f5d27f951ed03d6c82b2dfd9965", size = 455550, upload-time = "2025-04-08T10:36:16.635Z" },1162 { url = "https://files.pythonhosted.org/packages/90/fb/b07bcdf1034d8edeaef4c22f3e9e3157d37c5071b5f9492ffdfa4ad4bed7/watchfiles-1.0.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fed1cd825158dcaae36acce7b2db33dcbfd12b30c34317a88b8ed80f0541cc57", size = 455542, upload-time = "2025-04-08T10:36:18.655Z" },1163]11641165[[package]]1166name = "websockets"1167version = "15.0.1"1168source = { registry = "https://pypi.org/simple" }1169sdist = { url = "https://files.pythonhosted.org/packages/21/e6/26d09fab466b7ca9c7737474c52be4f76a40301b08362eb2dbc19dcc16c1/websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee", size = 177016, upload-time = "2025-03-05T20:03:41.606Z" }1170wheels = [1171 { url = "https://files.pythonhosted.org/packages/1e/da/6462a9f510c0c49837bbc9345aca92d767a56c1fb2939e1579df1e1cdcf7/websockets-15.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d63efaa0cd96cf0c5fe4d581521d9fa87744540d4bc999ae6e08595a1014b45b", size = 175423, upload-time = "2025-03-05T20:01:35.363Z" },1172 { url = "https://files.pythonhosted.org/packages/1c/9f/9d11c1a4eb046a9e106483b9ff69bce7ac880443f00e5ce64261b47b07e7/websockets-15.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac60e3b188ec7574cb761b08d50fcedf9d77f1530352db4eef1707fe9dee7205", size = 173080, upload-time = "2025-03-05T20:01:37.304Z" },1173 { url = "https://files.pythonhosted.org/packages/d5/4f/b462242432d93ea45f297b6179c7333dd0402b855a912a04e7fc61c0d71f/websockets-15.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5756779642579d902eed757b21b0164cd6fe338506a8083eb58af5c372e39d9a", size = 173329, upload-time = "2025-03-05T20:01:39.668Z" },1174 { url = "https://files.pythonhosted.org/packages/6e/0c/6afa1f4644d7ed50284ac59cc70ef8abd44ccf7d45850d989ea7310538d0/websockets-15.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdfe3e2a29e4db3659dbd5bbf04560cea53dd9610273917799f1cde46aa725e", size = 182312, upload-time = "2025-03-05T20:01:41.815Z" },1175 { url = "https://files.pythonhosted.org/packages/dd/d4/ffc8bd1350b229ca7a4db2a3e1c482cf87cea1baccd0ef3e72bc720caeec/websockets-15.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c2529b320eb9e35af0fa3016c187dffb84a3ecc572bcee7c3ce302bfeba52bf", size = 181319, upload-time = "2025-03-05T20:01:43.967Z" },1176 { url = "https://files.pythonhosted.org/packages/97/3a/5323a6bb94917af13bbb34009fac01e55c51dfde354f63692bf2533ffbc2/websockets-15.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac1e5c9054fe23226fb11e05a6e630837f074174c4c2f0fe442996112a6de4fb", size = 181631, upload-time = "2025-03-05T20:01:46.104Z" },1177 { url = "https://files.pythonhosted.org/packages/a6/cc/1aeb0f7cee59ef065724041bb7ed667b6ab1eeffe5141696cccec2687b66/websockets-15.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5df592cd503496351d6dc14f7cdad49f268d8e618f80dce0cd5a36b93c3fc08d", size = 182016, upload-time = "2025-03-05T20:01:47.603Z" },1178 { url = "https://files.pythonhosted.org/packages/79/f9/c86f8f7af208e4161a7f7e02774e9d0a81c632ae76db2ff22549e1718a51/websockets-15.0.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a34631031a8f05657e8e90903e656959234f3a04552259458aac0b0f9ae6fd9", size = 181426, upload-time = "2025-03-05T20:01:48.949Z" },1179 { url = "https://files.pythonhosted.org/packages/c7/b9/828b0bc6753db905b91df6ae477c0b14a141090df64fb17f8a9d7e3516cf/websockets-15.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d00075aa65772e7ce9e990cab3ff1de702aa09be3940d1dc88d5abf1ab8a09c", size = 181360, upload-time = "2025-03-05T20:01:50.938Z" },1180 { url = "https://files.pythonhosted.org/packages/89/fb/250f5533ec468ba6327055b7d98b9df056fb1ce623b8b6aaafb30b55d02e/websockets-15.0.1-cp310-cp310-win32.whl", hash = "sha256:1234d4ef35db82f5446dca8e35a7da7964d02c127b095e172e54397fb6a6c256", size = 176388, upload-time = "2025-03-05T20:01:52.213Z" },1181 { url = "https://files.pythonhosted.org/packages/1c/46/aca7082012768bb98e5608f01658ff3ac8437e563eca41cf068bd5849a5e/websockets-15.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:39c1fec2c11dc8d89bba6b2bf1556af381611a173ac2b511cf7231622058af41", size = 176830, upload-time = "2025-03-05T20:01:53.922Z" },1182 { url = "https://files.pythonhosted.org/packages/9f/32/18fcd5919c293a398db67443acd33fde142f283853076049824fc58e6f75/websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431", size = 175423, upload-time = "2025-03-05T20:01:56.276Z" },1183 { url = "https://files.pythonhosted.org/packages/76/70/ba1ad96b07869275ef42e2ce21f07a5b0148936688c2baf7e4a1f60d5058/websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57", size = 173082, upload-time = "2025-03-05T20:01:57.563Z" },1184 { url = "https://files.pythonhosted.org/packages/86/f2/10b55821dd40eb696ce4704a87d57774696f9451108cff0d2824c97e0f97/websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905", size = 173330, upload-time = "2025-03-05T20:01:59.063Z" },1185 { url = "https://files.pythonhosted.org/packages/a5/90/1c37ae8b8a113d3daf1065222b6af61cc44102da95388ac0018fcb7d93d9/websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562", size = 182878, upload-time = "2025-03-05T20:02:00.305Z" },1186 { url = "https://files.pythonhosted.org/packages/8e/8d/96e8e288b2a41dffafb78e8904ea7367ee4f891dafc2ab8d87e2124cb3d3/websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792", size = 181883, upload-time = "2025-03-05T20:02:03.148Z" },1187 { url = "https://files.pythonhosted.org/packages/93/1f/5d6dbf551766308f6f50f8baf8e9860be6182911e8106da7a7f73785f4c4/websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413", size = 182252, upload-time = "2025-03-05T20:02:05.29Z" },1188 { url = "https://files.pythonhosted.org/packages/d4/78/2d4fed9123e6620cbf1706c0de8a1632e1a28e7774d94346d7de1bba2ca3/websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8", size = 182521, upload-time = "2025-03-05T20:02:07.458Z" },1189 { url = "https://files.pythonhosted.org/packages/e7/3b/66d4c1b444dd1a9823c4a81f50231b921bab54eee2f69e70319b4e21f1ca/websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3", size = 181958, upload-time = "2025-03-05T20:02:09.842Z" },1190 { url = "https://files.pythonhosted.org/packages/08/ff/e9eed2ee5fed6f76fdd6032ca5cd38c57ca9661430bb3d5fb2872dc8703c/websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf", size = 181918, upload-time = "2025-03-05T20:02:11.968Z" },1191 { url = "https://files.pythonhosted.org/packages/d8/75/994634a49b7e12532be6a42103597b71098fd25900f7437d6055ed39930a/websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85", size = 176388, upload-time = "2025-03-05T20:02:13.32Z" },1192 { url = "https://files.pythonhosted.org/packages/98/93/e36c73f78400a65f5e236cd376713c34182e6663f6889cd45a4a04d8f203/websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065", size = 176828, upload-time = "2025-03-05T20:02:14.585Z" },1193 { url = "https://files.pythonhosted.org/packages/51/6b/4545a0d843594f5d0771e86463606a3988b5a09ca5123136f8a76580dd63/websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3", size = 175437, upload-time = "2025-03-05T20:02:16.706Z" },1194 { url = "https://files.pythonhosted.org/packages/f4/71/809a0f5f6a06522af902e0f2ea2757f71ead94610010cf570ab5c98e99ed/websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665", size = 173096, upload-time = "2025-03-05T20:02:18.832Z" },1195 { url = "https://files.pythonhosted.org/packages/3d/69/1a681dd6f02180916f116894181eab8b2e25b31e484c5d0eae637ec01f7c/websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2", size = 173332, upload-time = "2025-03-05T20:02:20.187Z" },1196 { url = "https://files.pythonhosted.org/packages/a6/02/0073b3952f5bce97eafbb35757f8d0d54812b6174ed8dd952aa08429bcc3/websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215", size = 183152, upload-time = "2025-03-05T20:02:22.286Z" },1197 { url = "https://files.pythonhosted.org/packages/74/45/c205c8480eafd114b428284840da0b1be9ffd0e4f87338dc95dc6ff961a1/websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5", size = 182096, upload-time = "2025-03-05T20:02:24.368Z" },1198 { url = "https://files.pythonhosted.org/packages/14/8f/aa61f528fba38578ec553c145857a181384c72b98156f858ca5c8e82d9d3/websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65", size = 182523, upload-time = "2025-03-05T20:02:25.669Z" },1199 { url = "https://files.pythonhosted.org/packages/ec/6d/0267396610add5bc0d0d3e77f546d4cd287200804fe02323797de77dbce9/websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe", size = 182790, upload-time = "2025-03-05T20:02:26.99Z" },1200 { url = "https://files.pythonhosted.org/packages/02/05/c68c5adbf679cf610ae2f74a9b871ae84564462955d991178f95a1ddb7dd/websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4", size = 182165, upload-time = "2025-03-05T20:02:30.291Z" },1201 { url = "https://files.pythonhosted.org/packages/29/93/bb672df7b2f5faac89761cb5fa34f5cec45a4026c383a4b5761c6cea5c16/websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597", size = 182160, upload-time = "2025-03-05T20:02:31.634Z" },1202 { url = "https://files.pythonhosted.org/packages/ff/83/de1f7709376dc3ca9b7eeb4b9a07b4526b14876b6d372a4dc62312bebee0/websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9", size = 176395, upload-time = "2025-03-05T20:02:33.017Z" },1203 { url = "https://files.pythonhosted.org/packages/7d/71/abf2ebc3bbfa40f391ce1428c7168fb20582d0ff57019b69ea20fa698043/websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7", size = 176841, upload-time = "2025-03-05T20:02:34.498Z" },1204 { url = "https://files.pythonhosted.org/packages/cb/9f/51f0cf64471a9d2b4d0fc6c534f323b664e7095640c34562f5182e5a7195/websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931", size = 175440, upload-time = "2025-03-05T20:02:36.695Z" },1205 { url = "https://files.pythonhosted.org/packages/8a/05/aa116ec9943c718905997412c5989f7ed671bc0188ee2ba89520e8765d7b/websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675", size = 173098, upload-time = "2025-03-05T20:02:37.985Z" },1206 { url = "https://files.pythonhosted.org/packages/ff/0b/33cef55ff24f2d92924923c99926dcce78e7bd922d649467f0eda8368923/websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151", size = 173329, upload-time = "2025-03-05T20:02:39.298Z" },1207 { url = "https://files.pythonhosted.org/packages/31/1d/063b25dcc01faa8fada1469bdf769de3768b7044eac9d41f734fd7b6ad6d/websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22", size = 183111, upload-time = "2025-03-05T20:02:40.595Z" },1208 { url = "https://files.pythonhosted.org/packages/93/53/9a87ee494a51bf63e4ec9241c1ccc4f7c2f45fff85d5bde2ff74fcb68b9e/websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f", size = 182054, upload-time = "2025-03-05T20:02:41.926Z" },1209 { url = "https://files.pythonhosted.org/packages/ff/b2/83a6ddf56cdcbad4e3d841fcc55d6ba7d19aeb89c50f24dd7e859ec0805f/websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8", size = 182496, upload-time = "2025-03-05T20:02:43.304Z" },1210 { url = "https://files.pythonhosted.org/packages/98/41/e7038944ed0abf34c45aa4635ba28136f06052e08fc2168520bb8b25149f/websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375", size = 182829, upload-time = "2025-03-05T20:02:48.812Z" },1211 { url = "https://files.pythonhosted.org/packages/e0/17/de15b6158680c7623c6ef0db361da965ab25d813ae54fcfeae2e5b9ef910/websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d", size = 182217, upload-time = "2025-03-05T20:02:50.14Z" },1212 { url = "https://files.pythonhosted.org/packages/33/2b/1f168cb6041853eef0362fb9554c3824367c5560cbdaad89ac40f8c2edfc/websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4", size = 182195, upload-time = "2025-03-05T20:02:51.561Z" },1213 { url = "https://files.pythonhosted.org/packages/86/eb/20b6cdf273913d0ad05a6a14aed4b9a85591c18a987a3d47f20fa13dcc47/websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa", size = 176393, upload-time = "2025-03-05T20:02:53.814Z" },1214 { url = "https://files.pythonhosted.org/packages/1b/6c/c65773d6cab416a64d191d6ee8a8b1c68a09970ea6909d16965d26bfed1e/websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561", size = 176837, upload-time = "2025-03-05T20:02:55.237Z" },1215 { url = "https://files.pythonhosted.org/packages/02/9e/d40f779fa16f74d3468357197af8d6ad07e7c5a27ea1ca74ceb38986f77a/websockets-15.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0c9e74d766f2818bb95f84c25be4dea09841ac0f734d1966f415e4edfc4ef1c3", size = 173109, upload-time = "2025-03-05T20:03:17.769Z" },1216 { url = "https://files.pythonhosted.org/packages/bc/cd/5b887b8585a593073fd92f7c23ecd3985cd2c3175025a91b0d69b0551372/websockets-15.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1009ee0c7739c08a0cd59de430d6de452a55e42d6b522de7aa15e6f67db0b8e1", size = 173343, upload-time = "2025-03-05T20:03:19.094Z" },1217 { url = "https://files.pythonhosted.org/packages/fe/ae/d34f7556890341e900a95acf4886833646306269f899d58ad62f588bf410/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d1f20b1c7a2fa82367e04982e708723ba0e7b8d43aa643d3dcd404d74f1475", size = 174599, upload-time = "2025-03-05T20:03:21.1Z" },1218 { url = "https://files.pythonhosted.org/packages/71/e6/5fd43993a87db364ec60fc1d608273a1a465c0caba69176dd160e197ce42/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f29d80eb9a9263b8d109135351caf568cc3f80b9928bccde535c235de55c22d9", size = 174207, upload-time = "2025-03-05T20:03:23.221Z" },1219 { url = "https://files.pythonhosted.org/packages/2b/fb/c492d6daa5ec067c2988ac80c61359ace5c4c674c532985ac5a123436cec/websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b359ed09954d7c18bbc1680f380c7301f92c60bf924171629c5db97febb12f04", size = 174155, upload-time = "2025-03-05T20:03:25.321Z" },1220 { url = "https://files.pythonhosted.org/packages/68/a1/dcb68430b1d00b698ae7a7e0194433bce4f07ded185f0ee5fb21e2a2e91e/websockets-15.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cad21560da69f4ce7658ca2cb83138fb4cf695a2ba3e475e0559e05991aa8122", size = 176884, upload-time = "2025-03-05T20:03:27.934Z" },1221 { url = "https://files.pythonhosted.org/packages/fa/a8/5b41e0da817d64113292ab1f8247140aac61cbf6cfd085d6a0fa77f4984f/websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f", size = 169743, upload-time = "2025-03-05T20:03:39.41Z" },1222]