e-nms_qa_automation/docs/build/html/_modules/data/constants.html

126 lines
5.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html class="writer-html5" lang="ru" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>data.constants &mdash; документация e-nms-qa-automation 0.1.0</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=b86133f3" />
<link rel="stylesheet" type="text/css" href="../../_static/css/theme.css?v=e59714d7" />
<script src="../../_static/jquery.js?v=5d32c60e"></script>
<script src="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../../_static/documentation_options.js?v=6ff560e8"></script>
<script src="../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/translations.js?v=cd1d70c9"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Алфавитный указатель" href="../../genindex.html" />
<link rel="search" title="Поиск" href="../../search.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home">
e-nms-qa-automation
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Поиск в документации" aria-label="Поиск в документации" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Меню навигации">
<!-- Local TOC -->
<div class="local-toc"></div>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Меню навигации для мобильных устройств" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">e-nms-qa-automation</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Навигация по страницам">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../index.html">Код модуля</a></li>
<li class="breadcrumb-item active">data.constants</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Исходный код data.constants</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;Модуль constants содержит настройки и константы приложения.</span>
<span class="sd">Основной класс Constants предоставляет доступ к переменным окружения,</span>
<span class="sd">используемым для аутентификации и других настроек.</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">import</span><span class="w"> </span><span class="nn">os</span>
<div class="viewcode-block" id="Constants">
<a class="viewcode-back" href="../../data.html#data.constants.Constants">[документация]</a>
<span class="k">class</span><span class="w"> </span><span class="nc">Constants</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Хранит константы и переменные окружения.</span>
<span class="sd"> Получает значения из переменных окружения. Используется для аутентификации.</span>
<span class="sd"> Атрибуты:</span>
<span class="sd"> login (str): Логин для аутентификации.</span>
<span class="sd"> password (str): Пароль для аутентификации.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">login</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="s1">&#39;AUTH_LOGIN&#39;</span><span class="p">)</span>
<span class="n">password</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">getenv</span><span class="p">(</span><span class="s1">&#39;AUTH_PASSWORD&#39;</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">KeyError</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;LOGIN OR PASSWORD WASN&#39;T FOUND&quot;</span><span class="p">)</span></div>
</pre></div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>&#169; Авторские права 2025, NPO KIS. </p>
</div>
Собрано при помощи <a href="https://www.sphinx-doc.org/">Sphinx</a> с использованием
<a href="https://github.com/readthedocs/sphinx_rtd_theme">темы,</a>
предоставленной <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>