L i(7UdZddlmZddlZddlZddlmZddlmZddl m Z m Z m Z m Z ddlZddlmZddlmZdd lmZmZdd lmZdd lmZe rdd lmZd Zded<dZded< dNdZ dOdZ!e dede fZ"dPdZ#dQdZ$ejJddiejLddejNeejPd dRdSd!Z)e)jUd"dTd#Z+e)jUd$dTd%Z,e)jUd&dTd'Z-e)jUd(e#dUd)Z.e)jUd*e#ej^d+d,d-.ej^d/d01dVdWd2Z0dXd3Z1dYd4Z2 dZ d[d5Z3e)jKd6dTd7Z4e4jUd8dTd9Z5e)jKd:dTd;ZejUd<e#dUd=Z6e)jKd>d?ejnd\d@Z8e8jUdAdTdBZ9e)jKdCdDdTdEZ:e:jUdFdTdGZ;e)jUdHej^dIdJKdVd]dLZComposes given config option options as options for click lib.z--._z z - )param descriptiontypeoptionenvvarmultiple) keyreplacer deprecateddeprecation_textexpiration_dater env_varr#) config_optionr!rrs W/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/streamlit/web/cli.py&_convert_config_option_to_click_optionr,,s-##$ %F    % %c3 /E++K  K-001]5R5R4S T """''!**  cdfd }|S)NcT|ytdjdj)NzSetting zn option using the CLI flag is not allowed. Set this option in the configuration file or environment variable: ) SystemExitr$r))_ctx_param cli_valuer*s r+callbackz1_make_sensitive_option_callback..callbackGs=   }((+,&..1 3  r-)r1 click.Contextr2zclick.Parameterr3rreturnNone)r*r4s` r+_make_sensitive_option_callbackr9Ds  Or-F.)boundc(ttjjD]g\}}t |}|j rdddt |d}nd|dd}tj|d|df|d|d |d d |}||}i|S) z;Decorator that adds config param keys to click dynamically.FT) expose_valuehiddenis_eagerr4r") show_envvarr"r!rrr r#)helpr r#) reversed_config_config_options_templateitemsr, sensitiver9clickr!)funcrvalueparsed_parameterclick_option_kwargsr*s r+configurator_optionsrLVsW==CCEF#5A%H ??!& ;EB #  $*84#  X & W % "-0!&)%j1  "  T"1#2 Kr-c*ddl}ddlm}t|d5} |j |d}|j |j |j dddy#|$r }tjd|d|d}~wwxYw#1swYyxYw) z2Fetch remote file at url_path to main_script_path.rN)RequestExceptionwb)timeoutzUnable to fetch z. ) requestsrequests.exceptionsrNopengetraise_for_statuswritecontentrG BadParameter)main_script_pathurl_pathrRrNfprespes r+_download_remoter_ts4  %J J<<"<5D  ! ! # HHT\\ " JJ   J$$'7zQC%HI I J JJs(B >A!!B&BBB  Bauto_envvar_prefix STREAMLIT)context_settingsz --log_levelT) show_defaultr Streamlit prog_namecP|r$ddlm}|t}|jdyy)zTry out a demo with: $ streamlit hello Or use the line below to run your own script: $ streamlit run your_script.py r) get_loggerzSetting the log level using the --log_level flag is unsupported. Use the --logger.level flag (after your streamlit command) instead.N)streamlit.loggerrh__name__r) log_levelrhloggers r+mainrms+/"8, T r-rAcVtdtjd<tdy)zPrint this help message.z--help streamlitreN)_get_command_line_as_stringsysargvrmr8r-r+rArAs!  !CHHQK;r-versioncRddl}td|jd<ty)z!Print Streamlit's version number.rNz --versionro)rrrqrsrm)rrs r+ main_versionrvs! !CHHQKFr-docsc\tjdddlm}|j dy)zShow help in browser.zShowing help page in browser...rcli_utilzhttps://docs.streamlit.ioN)rGechorprz open_browserrys r+ main_docsr}s# JJ01" 56r-helloc Bddlm}|j}t||y)zRuns the Hello World script.r) streamlit_app flag_optionsN)streamlit.hellor__file__ _main_run)kwargsrfilenames r+ main_hellors.%%H hV,r-runtargetstreamlit_app.pySTREAMLIT_RUN_TARGET)defaultr"args)nargsc pddlm}|j|rddlm}|5}ddlm}||j}t|tjj||jdjddd}|j|} t|| t|||d d d y t!|} | j#r| d z} t%| } t| | j'st)j*d | t| ||y #1swYy xYw) uRun a Python script, piping stderr to Streamlit. If omitted, the target script will be assumed to be "streamlit_app.py". Otherwise, the target script should be one of the following: - The path to a local Python file. - The path to a local folder where "streamlit_app.py" can be found. - A URL pointing to a Python file. In this case Streamlit will download the file to a temporary file and run it. To pass command-line arguments to the script, add " -- " before them. For example: $ streamlit run my_app.py -- --my_arg1=123 my_arg2 ↑ Your CLI args start after this. r)url_util)TemporaryDirectory)urlparse/rorrNrzFile does not exist: )rpris_urlstreamlit.temporary_directoryr urllib.parserpath_check_extension_or_raiseosjoinstriprsplitprocess_gitblob_urlr_rris_dirstrexistsrGrY) rrrrrtemp_dirr url_subpathrZurlrpath_strs r+main_runrs*#vD  ! CX -"6*//K %k 2!ww||+++C077Q?C  ..v6C -s 3 &6 B C C F| ;;= & &Dt9!(+{{}$$'` is unsupported. Please use `python -m streamlit ` instead.ro) subprocessrGget_current_contextparent command_path RuntimeErrorextendrrrs list2cmdline)rrcmd_line_as_lists r+rqrq s}  & & ( / /F ~&--- P  ++,CHHQRL)  " "#3 44r-ctjj|t_t j |xsi|g}|i}tdk(}tt j||||y)Nrzstreamlit hello) rrabspathrC_main_script_pathrload_config_optionsrqrr)filerris_hellos r+rrsg!# 5G !!|/ArB | *,0AAH MM$$ 5r-cachecy)zManage the Streamlit cache.Nr8r8r-r+rr: r-clearctt}|jtjj y)z1Clear st.cache_data and st.cache_resource caches.N)r clear_allr cache_resourcer)cache_storage_managers r+ cache_clearr@s,AB##%   "r-r cy)z#Manage Streamlit's config settings.Nr8r8r-r+r r Qrr-showc Xtj|tjy)z(Show all of Streamlit's config settings.rN)rrrC show_config)rs r+ config_showrWs !!v6 r-activate)invoke_without_commandcb|js#tjjyy)z*Activate Streamlit by entering your email.N)invoked_subcommandr get_currentr)ctxs r+rrds'  ! !!**, "r-resetcHtjjy)zReset Activation Credentials.N)r rrr8r-r+activate_resetrls##%r-test)r>cy)zuInternal-only commands used for testing. These commands are not included in the output of `streamlit help`. Nr8r8r-r+rrus  r-rfcttjj}| t d|j dk7rt d|j dy)zAssert that the program name is set to `streamlit test`. This is used by our cli-smoke-tests to verify that the program name is set to `streamlit ...` whether the streamlit binary is invoked directly or via `python -m streamlit ...`. Nzparent is Nonezstreamlit testzParent command path is z not streamlit test.)rqrGrrAssertionErrorr)rs r+test_prog_namer~sd !  & & ( / /F ~-.. ..%f&9&9%::N O  /r-init directoryF)requiredcddlm}|r||n|j} |jdd|dz jdd |d z jd d |r t|nd }t jddt j|dt jddt jd|ddt jddr/|d z }t jdtt|yy#t$r}t j d|d}~wwxYw)zInitialize a new Streamlit project. If DIRECTORY is specified, create it and initialize the project there. Otherwise use the current directory. rrT)exist_okparentszFailed to create directory: Nzrequirements.txtz streamlit zutf-8)encodingruimport streamlit as st st.title("🎈 My new app") st.write( "Let's start building! For help and inspiration, head over to [docs.streamlit.io](https://docs.streamlit.io/)." ) ru!✨ Created new Streamlit app in F)nlblue)fgu🚀 Run it with: zstreamlit run z/streamlit_app.pyu❓ Run the app now?)rz Starting Streamlit...) pathlibrcwdmkdirOSErrorrGClickException write_textrsechor{confirmr)rr project_dirr^ rel_path_strapp_paths r+ main_initrs/%.$y/HDHHJKG46 %%11-'1R%%11 2 &/3y>CL KK3> KK<.f- JJ#. KK..?@VL }}+T:!33 ,-#h- ;3 G""%A!#EFFGsD D?"D::D?__main__)r*rr6zdict[str, Any])r*rr6z5Callable[[click.Context, click.Parameter, Any], None])rHr:r6r:)rZrr[rr6r7)r)rkrr6r7)r6r7)rrr6r7)N)rrrlist[str] | Nonerrr6r7)rrr6r7)r6 str | None)NN)rrrrrzdict[str, Any] | Noner6r7)rr5r6r7)rrr6r7)>__doc__ __future__rrrrcollections.abcrrrtypingrrr r rGrpr rCstreamlit.runtimer streamlit.runtime.credentialsr r streamlit.webr*streamlit.web.cache_storage_manager_configrstreamlit.config_optionrr__annotations__rr,r9r:rLr_groupr!Choiceversion_optionrmcommandrArvr}rargumentrrrqrrrr pass_contextrrrrrrjr8r-r+rsXD" $55 '%H#4"/%/9 E90  :  CxS)*< J 3[AB m$\U\\*5MN , -OC (f  i    f77g--e"4=STb!17"U17h  5("*.6 6 6(6 66G  w # # H  Jt4-5-  '&&F4  ! k  ,f e,(!-(!V zFr-