Saravanan666/pypi-org huggingface dataset:
Package: yangsuite-restconf
RESTCONF- protocol for communicating with YANG defined interfaces (RFC 8040)https://tools.ietf.org/html/rfc8040AuthorMichael OttMaintainersyangsuite-support-ext@cisco.comRESTCONF is the REST sister of the NETCONF protocol and uses all the normal
REST calls over HTTP/S protocol.  GET, PATCH, POST, PUT, and DELETE.  It
must follow all the strict rules defined in dozens of HTTP/S related RFC’s.Requires Python 3.6 or above.
Package: yangwangjinxin-cyclomatic-complexity
Cyclomatic ComplexityCalculating cyclic complexity based onlizard.Installpython3 -m pip install yangwangjinxin_cyclomatic_complexityUsageimport cyclomatic_complexity as cc
file_result = cc.analyze('main.py')
dir_result = cc.analyze('.')
print(dit_result.cyclomatic_complexity)
Package: yangwangjinxing-cyclomatic-complexity
Cyclomatic ComplexityCalculating cyclic complexity based onlizard.Installpython3 -m pip install yangwangjinxin_cyclomatic_complexityUsageimport cyclomatic_complexity as cc
file_result = cc.analyze('main.py')
dir_result = cc.analyze('.')
print(dit_result.cyclomatic_complexity)
Package: yanico
Yet Another Niconico-douga Command-line InterfaceDescriptionyanicoはApache 2.0ライセンスで公開されているニコニコ動画にアクセスするためのCUIコマンドです。
メインコマンドyan(yanicoの先頭3文字)に続けて
サブコマンドを指定することで機能を実行します。機能を集めることができるCUIコマンドを目標にゆっくり開発していきます。
パッケージに含むREADME等のドキュメントは日本語で先に書いていきます。Featureyanコマンドの体系は git や mercurial のようなサブコマンドの集合です。ログインのセッション情報などはブラウザから取得します。(最初はFirefoxを予定)コマンドからログインする機能は今のところ未定です。Python と setuptools の知識が必要ですが、
ユーザーが独自にコマンドを追加することができます。RequirementPython(バージョン3以降)pipsetuptoolsサードパーティ製のHTTPライブラリ(予定)Install現在は準備中でまだインストールできません。PYPI のリリース版をインストールする:$ pip install yanicoリポジトリの最新版をインストールする:$ pip install git+https://github.com/ma8ma/yanicoUsage入力例:$ yan subcommand arg1 arg2Changesv0.1.0a1 (unreleased)コマンドyanを追加した以前のバージョンでの変更は CHANGES.ja.md を見てください。TODOPYPIに登録して公開する (v0.1.0a1)利用するブラウザを紐付けするattachコマンドを追加 (v0.1.0a2)ブラウザの紐付けを解除するdetachコマンドを追加 (v0.1.0a3)Firefoxからセッション情報を取り出す機能を実装 (v0.1.0a4)動画の情報を表示するgetflvコマンドを追加 (v0.1.0)コマンドを追加する方法のドキュメントを書く (v1.0.0までには書く)Copyright 2015 Masayuki Yamamoto
Package: yanimage
YanimageYanimageis a Python module that can parse image links on demand, as well as download them.from yanimage import UrlImage, Download

links = UrlImage(search, value, iw, ih).parse()

Download(links, path).download()UrlImage:search - search queryvalue - number of desired imagesiw - the desired number of pixels wide. Default = Noneih - the desired number of pixels wide. Default = NoneDownload:links - you need to insert a variable (array) with links to pictures.path - the path where you want to save the pictures.verbose - displays information about loading images. Sample output of 'Saved 1 of 4 pictures'
Package: yankee
SummarySimple declarative data extraction and loading in Python, featuring:🍰Ease of use:Data extraction is performed in a simple, declarative types.⚙XML / HTML / JSON Extraction:Extraction can be performed across a wide array of structured data🐼Pandas Integration:Results are easily castable toPandas Dataframes and Series.😀Custom Output Classes:Results can be automatically loaded into autogenerated dataclasses, or custom model types.🚀Performance:XML loading is supported by the excellent and fastlxmllibrary, JSON is supported byUltraJSONfor fast parsing, andjsonpath_ngfor flexible data extraction.Quick StartTo extract data fromXML, use this import statement, and see the example below:fromyankee.xml.schemaimportSchema,fieldsasf,CSSSelectorTo extract data fromJSON, use this import statement, and see the example below:fromyankee.xml.schemaimportSchema,fieldsasf,JSONPathTo extract data fromHTML, use this import statement:fromyankee.html.schemaimportSchema,fieldsasf,CSSSelectorTo extract data fromPython objects(either objects or dictionaries), use this import statement:fromyankee.base.schemaimportSchema,fieldsasfDocumentationComplete documentation is available onRead The DocsExamplesExtract data from XMLData extraction from XML. By default, data keys are XPath expressions, but can also be CSS selectors.Take this:<xmlObject><name>JohnnyAppleseed</name><birthdate>2000-01-01</birthdate><something><many><levels><deep>123</deep></levels></many></something></xmlObject>Do this:fromyankee.xml.schemaimportSchema,fieldsasf,CSSSelectorclassXmlExample(Schema):name=f.String("./name")birthday=f.Date(CSSSelector("birthdate"))deep_data=f.Int("./something/many/levels/deep")XmlExample().load(xml_doc)Get this:{"name":"Johnny Appleseed","birthday":datetime.date(2000,1,1),"deep_data":123}Extract data from JSONData extraction from JSON. By default, data keys are implied from the field names, but can also be JSONPath expressionsTake this:{"name":"Johnny Appleseed","birthdate":"2000-01-01","something":[{"many":{"levels":{"deep":123}}}]}Do this:fromyankee.json.schemaimportSchema,fieldsasfclassJsonExample(Schema):name=f.String()birthday=f.Date("birthdate")deep_data=f.Int("something.0.many.levels.deep")Get this:{"name":"Johnny Appleseed","birthday":datetime.date(2000,1,1),"deep_data":123}
Package: yanky
yanky -- Easy and Simple copy and paste module for GNU/Linux systemsIn order to get yanky fully functional either one of the following softwareneeds to be installed in your system:-xsel: http://www.vergenet.net/~conrad/software/xsel-xclip: https://sourceforge.net/projects/xclipUsage:from yanky import copy, paste#Copy text to OS clipboardcopy('Text to be copied to clipboard')#Paste from OS clipboardtext_from_cb = paste()
Package: yann-utils
================
Yann's Utilities.. image::https://img.shields.io/pypi/v/yann_utils.svg:target:https://pypi.python.org/pypi/yann_utils.. image::https://img.shields.io/travis/Yann21/yann_utils.svg:target:https://travis-ci.com/Yann21/yann_utils.. image::https://readthedocs.org/projects/yann-utils/badge/?version=latest:target:https://yann-utils.readthedocs.io/en/latest/?version=latest:alt: Documentation StatusPython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://yann-utils.readthedocs.io.FeaturesTODO
Package: yanport-client
## À propos Voici quelques ressources qui vous aideront à explorer notre API, si vous avez des problèmes ou desdemandes, veuillez contacter le [support](mailto:support@yanport.com). ## REST API Nos services webs utilisent le
protocleHTTPSsur le port 443, tout accès en HTTP sur le port 80 est bloqué par notre pare-feu. Les échanges de
données sont réalisés enJSON. ## Authentification Avant de commencer à explorer notre API, vous devez nous
[contacter](https://www.yanport.com/contact) afin d'obtenir un [JSON Web Token](https://jwt.io) (JWT) qui
vous permettra de vous identifier à chaque requêtes. ### JWT (header) La méthode privilégiée pour s'authentifier
est de passer à chaque requêtes le token dans le header &#x60;Authorization: Bearer {{ JWT }}&#x60; en remplaçant
&#x60;{{ JWT }}&#x60; par votre token. ### JWT (query param) Il est aussi possible de passer le token directement en
query param de la requête &#x60;https://api.yanport.com/?token&#x3D;{{ JWT }}&#x60;. (_privilégié le passage par
header en production._) ## Pour démarrer Lorsque vous disposez de votre token d'authentification, vous pouvez
commencer à explorer notre API grâce au boutton  &#x60;Try it out&#x60; sur chacun de nos webs services. Mais au
préalable, vous devez vous authentifier en cliquant sur le boutton &#x60;Authorize &#x60;, en remplissant
l'input &#x60;api_key&#x60; avec &#x60;Bearer {{ JWT }}&#x60;.Exemple&#x60;
Bearer eyUEkiLCJh…CHCUiBfD63oxoo&#x3D;&#x60; ## Limitation Toutes les requêtes à notre API sont loggées, c'est
pourquoi vous devez respecter nos [CGU](https://dev.yanport.com/cgu) afin d'éviter tout usage abusif de notre API.
Package: yantu-python-util
主要功能基本文件操作json文件读写load_json 读取json文件write_json 写入json文件使用方法pip install yantu_python_utilfromyantu_python_util.operate_jsonimportwrite_json,load_jsonwrite_json(data="your json data",filepath="your file path")load_json(filepath="your file path")上传方法构建源文件pythonsetup.pysdistbdist_wheelbuild上传源文件twineuploaddist/*
Package: yanwang-sample
All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.Description: Sample Module Repository========================This simple project is an example repo for Python projects.`Learn more <http://www.kennethreitz.org/essays/repository-structure-and-python>`_.---------------If you want to learn more about ``setup.py`` files, check out `this repository <https://github.com/kennethreitz/setup.py>`_.✨🍰✨Platform: UNKNOWN
Package: yanytapi
yanytapiyanytapiis a Python wrapper for theNew York Times Article Search API. Based on the excellentrequestspackage, it provides full support for all of the API's search parameters, and also allows access to the request object itself for debugging purposes.InstallationWith pip:$ pip install yanytapiDependenciesyanytapi requires therequestspackage.UsageSimply import and initialize the API with your developer key:>>>fromyanytapiimportSearchAPI>>>api=SearchAPI("YourAPIKey")Then call thesearchfunction with your desired search parameters/values:>>>articles=api.search("Obama",fq={"headline":"Obama","source":["Reuters","AP","The New York Times"]},begin_date="20161001",# this can also be an intfacet_field=["source","day_of_week"],facet_filter=True)The search function returns an iterator ofDoc's with the following fields:["_id","blog","byline","document_type","headline","keywords","lead_paragraph","meta","multimedia","news_desk","pub_date","score","section_name","snippet","source","subsectoinName","type_of_material","uri","web_url","word_count"]You can specify multiple filters by using a dictionary::>>>fq={"headline":"Obama","source":["Reuters","AP","The New York Times"]}>>>articles=api.search("Obama",fq=fq)And multiple values by using a list::>>>facet_field=["source","day_of_week"]>>>articles=api.search("Obama",facet_field=facet_field)More examples:# simple search>>>articles=api.search("Obama")# search between specific dates>>>articles=api.search("Obama",begin_date="20161001",end_date="20161020",page=2)# access most recent request object>>>headers=api.req.headersFor a complete overview of the available search parameters, please refer to theNYTimes Article Search API Documentation.HistoryThis package was originally written byEvan Sherlockasnytimesarticle. It was subsequently forked and updated byMatt Morrison, and subsequently released asNYTimesArticleAPI, with contributions fromGerald SpencerandAndrew Han.yanytapiis a third iteration of forking focused mainly on packaging improvements, now maintained by Ed Kohlwey.LicenseThis is free software. It is licensed under theMIT License. Feel free to use this in your own work. However, if you modify and/or redistribute it, please attribute me in some way, and distribute your work under this or a similar license. A shout-out or a beer would be appreciated.
Package: yaop
A simple and light library that handle both command line parsing and config file reading.The only thing you have to do, is to describe (throught a YAML resource /
config file) all options and parameters your main function expects.This way, you only describe what to do, and not how to do it.Every is done under the hood ; a simple call to the library handle :application banner and help screen printingcommand line parsingbuilding of dictionnary that hold configuration (flags, options and parameters values)parsing optional config file that will override default valuesetc.Please read file README for getting started.Other instructions are available in the documentation : both user and reference manuals.Please be warned, that the library is in pre-alpha stage (for a short time),
until full documentation will be written : so package don’t contains all source files yet.
Package: yaosac
I don’t like exisiting libraries.This client is a mapping of theRESTful server API. There is a method
for every API end-point with the corresponding arguments. Only two
methods raise an exceptioncreate_notificationandview_notification. In all the other cases you will get the errors
from the API in the response.Client’s methods names are the end-point name in lower case with
spaces replaced by underscores. Depending on the method you call you
will need anUser Auth Key or an App Auth Key or an App Id. They
can be set as environment variables ‘OS_USER_AUTH_KEY’,
‘OS_APP_AUTH_KEY’ and ‘OS_APP_ID’ or assigned to the client viaapp_auth_key,user_auth_keyandapp_idattributes.Installpip install yaosacUsageimport yaosac

# Send a notification
yaosac.client.create_notification(player_ids)

# Get a notification
notification_id = 'a-notification-id-you-keep-somewhere'
notification = yaosac.client.view_notification(notification_id)Contribution/Testingpython3 setup.py test
Package: yaost
yaostYet another openscad translator.Yaost - is python to openscad translator.Prerequisitespython >= 3.5openscad >= 2019QuickstartCreate file example.py:#!/usr/bin/env pythonfromyaostimportproject,cubep=Project('example project')@p.add_partdefsimple_cube():returncube(10,10,10)if__name__=='__main__':p.run()Build scad file:$python3example.pybuild-scadNow you can see your scad model:$ openscad scad/simple-cube.scadTo build stl, run:$ python3 example.py build-stlYour model will be atstl/simple-cube.stlYou can run yaost in watch mode, it regenerates scad each time when you save python file:$ python example.py watchThe open file with$ openscad scad/simple-cube.scadChange something in example.py (eg.cube(30, 10, 10)) you should see changes in openscad viewer immediately.See more in examples section.
Package: yaotpbot
Yet Another OTP BotA Telegram Bot to generate OTPs.@yaotpbotArchitectureSoftwareYaotpbot is written in Python and usetelegram-bot-apito interact with Telegram.InfrastructureADynamoDBtable it's used to store the identifiers of the chats and all the related seeds, needed to generate OTPs. All those informationare stored encryptedand just decrpyted at runtime, usingdynamodb-encryption-sdklibrary with AES encryption.DeploymentCI/CD is automated with GitOps. in particular:The pipelineBuilds the artifact and publishes it onPypi;Builds the container usingbuildxto support multiple architecture and push the images onGitLab container registry.Theoperatordeploys and keep synced the manifests created on a local k3s cluster.Installation and usageThe bot can either be used as a container (registry) or installed directly withpiprunningpip3 install --upgrade yaotpbotNote that following environment variables must be set:NameDescriptionTELEGRAM_API_TOKENTelegram Api Token of your bot needed to interact with Telegram. You always get a new one whencreating a new bot.DYNAMO_DB_ENDPOINTA custom DynamoDB endpoint when not using AWS. By default the bot looks for a table calledyaotpbot-tableusing the credentials provided.DYNAMO_AES_SIGN_KEYKey used to sign encrypted data stored on DynamoDB. Can be generated runningpython scrips/keys.pyDYNAMO_AES_ENCRYPTION_KEYKey used to encrypt data stored on DynamoDB. Can be generated runningpython scrips/keys.pyAWS_ACCESS_KEY_IDAWS access key id. Used withAWS_SECRET_ACCESS_KEYto interact with DynamoDB.AWS_SECRET_ACCESS_KEYAWS secret access key. Used withAWS_ACCESS_KEY_IDto interact with DynamoDB.
Package: yaow
yaowYet another openconnect wrapper.This is a simple script to make connecting with openconnect easier, along with storing mfa codes in your local keychain.This makes your 2nd factor the physical device that the keychain is stored on.Usage% yaow --help
usage: yaow [-h] [--username USERNAME] [--server SERVER] [--servercert SERVERCERT] [--group GROUP] [--script SCRIPT] [--totp] [--email EMAIL]
            [--folder FOLDER] [--regex REGEX] [--backupKeyringFile BACKUPKEYRINGFILE] [--debug]

optional arguments:
  -h, --help            show this help message and exit
  --username USERNAME   Username to connect to. The script will prompt for the password and store it in the keychain.
  --server SERVER       Server to connect to. Example https://1.1.1.1/vpn
  --servercert SERVERCERT
                        Example: pin-sha256:k+H........=
  --group GROUP         Group name when connecting. Passed to --authgroup=
  --script SCRIPT       Script argument to pass to openconnect.
  --totp                TOTP 2-factor authentication
  --email EMAIL         Email mfa authentication
  --folder FOLDER       Email folder to watch for mfa token.
  --regex REGEX         Regular expression to match the mfa token.
  --backupKeyringFile BACKUPKEYRINGFILE
                        Keyring file location if your os doesn't have a keyring installed. Defaults to /keyring.json.
  --debug               Enable debug traceback.Example~ % yaow --username user --servercert pin-sha256:pADF6S+9sLpt0uGWl3upUIFQX9+Gmv3kZr73r2D2As= --server https://1.2.3.4/ --group "Cisco AnyConnect VPN" --script 'vpn-slice 10.1.1.0/24'Building and Installingpython3 setup.py bdist_wheel --universal
python3 -m pip install dist/yaow-*-py2.py3-none-any.whlChangelog0.0.1Initial Release
Package: yaoys-python-tool
Python工具类简介此工具类致力于封装一些常用的python代码，目前支持log日志，progress进度条，mysql数据库操作，雪花算法唯一id，时间工具类等方法使用说明安装pip install yaoys-python-tool更多例子请查看demo文件夹下相关代码目前已经支持的功能log日志记录，包括打印至控制台和保存到文件，输出到控制台支持针对不同级别的日志设置不同的颜色进度条展示：支持多种样式的进度条，并且支持将进度保存到log日志文件数据集划分，包括划分为训练数据集，测试数据集，验证集，划分方式可以是使用pandas读取后的数据格式(split_datautil)
，也可以直接使用文件路径，使用文件路径的方式暂时只支持划分测试集和训练集，文件格式为csv或者TXT(split_files)
,具体使用可查看demo/data/dataDemo.py唯一id，雪花算法实现唯一ID时间工具类数据库的连接与增删改查，暂时只支持mysql数据库文件工具类，包括读取csv和写入csv文件，读取写入TXT文件log日志# log日志demofromyaoysTools.log.logutilimportgetLogger,log_info,MY_LOG_INFO# 说明：如果设置保存日志到日志文件，则必须设置日志文件路径，此时 save_log2_file=True， log_path='../log'# 封装了log_info，log_error,log_warn,log_debug等方法# 日志颜色将根据不同的日志等级设置为不同的颜色logger=getLogger('test',log_path='../log',log_level=MY_LOG_INFO,save_log2_file=True)log_info('test',my_logger=logger)# 运行结果如下：[2022-07-2313:31:25,058][log_name:test][INFO][filename:some_thing_test.py][func_name:非方法调用(Notfunction)][15line]-message:test# 可在log文件中查看到相关日志progress 进度条# 进度条demo# 进度条工具整合了第三方的工具，代码地址：https://github.com/verigak/progress.git# 针对以上源码进行了封装，修改，增加将进度保存到日志文件中fromtimeimportsleepfromyaoysTools.progress.progressUtilimportPROGRESS_TYPE_PIXELBAR,definitionProgressBar# 进度条可选择的样式有多种，如果不知道具体的总的长度，可以使用spinner，原作者提供了多种spinnerPROGRESS_TYPE_BAR='Bar'PROGRESS_TYPE_CHARGING_BAR='ChargingBar'PROGRESS_TYPE_FILLINGSQUARESBAR='FillingSquaresBar'PROGRESS_TYPE_FILLINGCIRCLESBAR='FillingCirclesBar'PROGRESS_TYPE_INCREMENTALBAR='IncrementalBar'PROGRESS_TYPE_PIXELBAR='PixelBar'PROGRESS_TYPE_SHADYBAR='ShadyBar'PROGRESS_TYPE_SPINNER='Spinner'PROGRESS_TYPE_PIESPINNER='PieSpinner'PROGRESS_TYPE_MOONSPINNER='MoonSpinner'PROGRESS_TYPE_LINESPINNER='LineSpinner'PROGRESS_TYPE_PIXELSPINNER='PixelSpinner'# 注意，如果需要将进度保存到日志中，必须设置 is_save_log=True，并且设置log日志的路径# 你还可以自己定义自己的logger.如果不定义，将采用默认的logger,自定义logger使用的方法是log日志中的getLogger# 自定义logger时，同样的如果需要将进度保存到日志中，必须设置 is_save_log=True，并且设置log日志的路径，必须设置is_only_file=True，否则会在控制台输出进度# logger = getLogger(self.message, log_level=MY_LOG_INFO, log_path=self.log_path, is_only_file=True)# 如果采用默认的logger，则不需要设置my_logger=logger# 以下为显示进度时间样式PROGRESS_ELAPSED='elapsed'# 正向时间增加，只显示秒数PROGRESS_ELAPSED_TD='elapsed_td'# 正向时间增加，显示时，分，秒PROGRESS_ETA='eta'# 倒序时间减少，elapsed的逆序PROGRESS_ETA_TD='eta_td'# elapsed_td的逆序默认显示时间，时间格式为：elapsed_td，如果需要不显示时间,设置：need_show_time=Falsebar=definitionProgressBar(progress_type=PROGRESS_TYPE_PIXELBAR,count=100,is_save_log=True,log_path='../log',my_logger=logger,need_show_time=True,show_time_type=PROGRESS_ELAPSED_TD).get_progress()foriinrange(100):# Do some worksleep(0.01)bar.next()bar.finish()# 控制台运行结果：Progress|################################| 100/100  100.00% 0:00:11# log日志输出进度如下：[2022-08-2621:08:38,976][log_name:Progress][INFO][filename:E:\MyJob\PyCharm\PythonTools\yaoysTools\progress\__init__.py][func_name:writeln][131line]-message:Progress|################################| 100/100  100.00% 0:00:11
Package: yapdfminer
yapdfminer (Yet Another PDFMiner fork)PDFMiner is a great Python tool that had apparently been abandoned by its original authorYusuke Shinyamain 2016.
Ever since, it got forked and re-forked time and time again but never maintained for long.GoalsI created this fork in order to better service the requirements of my own project from PDF analysis:Apply multiple pull requests that languish on the original repository, thatsolve some bugsthat I ran into.TargetPython 3.7.
There will be no attempt to maintain backwards compatibility to older versions of Python.Generate asmaller distribution package(I'm running on AWS Lambda, where RAM is at a premium),
at the cost ofdropping support for Chinese, Japanese and KoreanPDFs.If you require Asian language support, it should be simple enough to re-enable it by building with the resource
files incmaprsrc.Other than the issues mentioned above, I do strive to make this library drop-in compatible with the original PDFMiner,
including for example the package name (which pdfminer3 had changed).Lineage:This is a fork ofgwk/pdfminer3.gwk/pdfminer3 was forked frompdfminer/pdfminer.sixpdfminer.six was forked from the originalpdfminerAboutPDFMiner is a pure Python tool for extracting information from PDF documents.Its focus is on PDF content retrieval and analysis.Please refer to the original repo for more information:https://github.com/euske
Package: yapeco
yapeco: Yet Another Python Envvar Config ObjectA positively miniscule utility module to access.env(and otherwise environment-defined) config values in a structured way through a Python object. Created out of annoyance with not being able to autocomplete said envvars in my editor :^)Features & LimitationsCase-insensitive + snake-case (i.e.SNAKE_case) field namesPrimitives such asstr,bool,intandfloatare supported (no guarantees withfloatthough, because, well... floating point)Assuming use of the above primitives, supportsOptional[*]types (and by extensionUnion[*,None]), but no others fromtypingDefault values through class variable assignment; assumed to beNonefor optional typesWill (intentionally) raise aRuntimeErrorif there is no value set and no default valueCommon boolean config formats (i.e.VAR=0/1/true/false/True/False) work as expectedUsageInstallation (PyPI):pip3installyapecoA simple example:# -- [mock environment] ---------------------------API_KEY=abc123DELAY_MSEC=18FEATURE_A_ENABLED=falseFEATURE_B_ENABLED=1# --- contrived_config.py -------------------------fromyapecoimportBaseEnvironmentasEnvclassConfig(Env):api_key:strdelay_msec:intfeature_a_enabled:boolfeature_a_flags:str="-a -b -c"feature_b_enabled:boolfeature_b_flags:Optional[str]# --- main.py -------------------------------------fromconfigimportConfigConfig.api_key# "abc123"Config.delay_msec# 18Config.feature_a_enabled# FalseConfig.feature_a_flags# "-a -b -c"Config.feature_b_enabled# TrueConfig.feature_b_flags# None# ...# API_KEY=def456# FEATURE_B_ENABLED=falseConfig.refresh()# update environmentConfig.api_key# "def456"Config.feature_b_enabled# FalseDevelopmentRequirespoetry.poetryinstall# install dependenciespoetrybuild# build packagepoetryrunpytest.# run testspoetryrunpyright.# run type checksFeature BackburnerSupport implied types (type conversion currently depends oncls.__annotations__)ExtraPedantic note:As in Smalltalk, classes themselves are objects.—The Literal Python Documentation