Saravanan666/pypi-org huggingface dataset:
Package: aoe2netapi-wrapper
aoe2net-api-wrapperA simple and basic Python 3https://aoe2.net/API wrapper for sendingGET requests.See the documentation of the API wrapper here on GitHub:section 'Documentation'.Seehttps://aoe2.net/#apiandhttps://aoe2.net/#nightbotfor the aoe2.net API (documentation) directly.Requirements:requests>= 2.20.0dataclasses-json== 0.5.7Python 3.7+ requiredInstallationAvailableon PyPipip install aoe2netapi-wrapperExample usagefromaoe2netapiimportAPI,Nightbotfromaoe2netapi.constantsimportLeaderboardId,EventLeaderboardIdfromaoe2netapi.modelsimportLeaderboard# API classapi=API()leaderboard:Leaderboard=api.get_leaderboard(leaderboard_id=LeaderboardId.AOE_TWO_RM,count=100)print(leaderboard)# Leaderboard<total = 43055, leaderboard_id = 3, start = 1, count = 100, players = [...],#             game="aoe2de", is_event_leaderboard=Falseforplayerinleaderboard.players:# player is of type 'LeaderboardPlayer'print(player.rank,player.name,player.rating,player.highest_rating,...)# Nighbot classnightbot=Nightbot()rating_history:str=nightbot.get_current_or_last_match(leaderboard_id=LeaderboardId.AOE_TWO_RM,search="GL.TheViper")print(rating_history)# GL.TheViper (2688) Rank #4, has played 1,542 games with a 65% winrate, -1 streak, and 4 dropsDocumentationSee the documentation on the provided functions here on GitHub:documentation page.For the documentation for previous versions, see the documentation page here:documentation page.ChangelogSee the changelog here on GitHub:changelog page.LicenseMIT License. SeeLICENSE.
Package: aoe-tool
安装依赖环境pip3 install pycrypto aoe-tool使用说明Samples:encrypt SRC_FILE to ENCODED_FILEatenc -e -f SRC_FILE -t ENCODED_FILEencrypt SRC_FILE to ENCODED_FILE with specified KEY_VALUE and IV_VALUEatenc -e -f SRC_FILE -t ENCODED_FILE -k 0000000000000000 -i 0101010101010101decrypt ENCODED_FILE to SRC_FILEatenc -d -f ENCODED_FILE -t SRC_FILEdecrypt ENCODED_FILE to SRC_FILE with specified KEY_VALUE and IV_VALUEatenc -d -f ENCODED_FILE -t SRC_FILE -k 0000000000000000 -i 0101010101010101Options:-h, --help, show help document.
  -e, --encrypt, encrypt file mode.
  -d, --decrypt, decrypt file mode.
  -f <path>, --from <path>, specify the file path to encrypt/decrypt.
  -t <path>, --to <path>, specify the file path after encrypt/decrypt.
  -k <KEY_VALUE>, --key <KEY_VALUE>, specify the key value to encrypt/decrypt.
  -i <IV_VALUE>, --iv <IV_VALUE>, specify the iv value to encrypt/decrypt.LicenseApache License 2.0
Package: aogn
IntroductionAOGNis anAsynchronousOGN(Open Glider Network) client for modern Python.
It connects to the APRS servers and receives the planes', gliders', receivers', etc. APRS messages,
while still allowing you control of the program flow.This can simplify programs since:There are no callback or blocking functions (e.g.listen()orrun_forever()).One script/thread/process can still do other useful out-of-band tasks like
computing aggregate statistics and making web requests.To interpret the raw OGN messages, use a function likepython-ogn-client'sogn.parser.parse.Installationpip install aognUsageBasic example:importasyncioimportloggingimportsysimportaognlogging.basicConfig(stream=sys.stdout,level=logging.DEBUG,format='%(asctime)s%(levelname)s%(module)s%(message)s',datefmt='%b%d%H:%M:%S',)asyncdefexample()->None:conn=aogn.Client(aprs_user='NO-CALL',)try:whileTrue:# Get the APRS packet once available:raw_message=awaitconn.packet()logging.debug(raw_message)exceptKeyboardInterrupt:logging.info('OGN Gateway stopped.')awaitconn.disconnect()if__name__=='__main__':asyncio.run(example())Concurrent example, with raw_messageparsing:importasyncioimportloggingimportsyslogging.basicConfig(stream=sys.stdout,level=logging.DEBUG,format='%(asctime)s%(levelname)s%(module)s%(message)s',datefmt='%b%d%H:%M:%S',)fromaognimportClientfromogn.parserimportparse,ParseErrordefprocess_beacon(raw_message):beacon={}try:beacon=parse(raw_message)exceptParseErroraserr:logging.warning(f'ParseError:{err}')exceptNotImplementedErroraserr:logging.error(f'NotImplementedError:{err}')exceptAttributeErroraserr:logging.error(f'raw_message:{raw_message}')logging.error(f'beacon:{beacon}')logging.error(err)returnbeaconasyncdefexample()->None:conn=Client(aprs_user='NO-CALL',)# aprs_filter='t/s')try:whileTrue:raw_message=awaitconn.packet()ifraw_message:beacon=process_beacon(raw_message)exceptKeyboardInterrupt:logging.info('OGN Gateway stopped.')awaitconn.disconnect()asyncdefanother_io_function()->None:importrandomwhileTrue:sleep_duration=120*random.random()logging.debug(f'Concurrently sleeping for{sleep_duration:.0f}seconds...')awaitasyncio.sleep(sleep_duration)asyncdefmain():awaitasyncio.gather(example(),another_io_function())if__name__=='__main__':asyncio.run(main())
Package: aoi
🍥 aoiA simple python based sqlite3 CLI.$python-mpipinstallaoiUsage$aoi[-c"path to connect"]# if the above fails try executing using full python path. ( read note below image. )$python-maoi[-c"path to connect"]using the -c/--connect option will connect the application to the provided db file path.If no option is provided,:memory:( in memory database ) will be used.Additional FeaturesApart from normal sqlite queries you can run the following commands within the CLI::h/:help: Get help for commands.:q/:quit: Exit the CLI.:r/:recent [amount=5]: Show last [amount=5] queries.:t/:tables: Shows the tables inside the databaseNOTETheaoicommand may fail if the executeable's path wasn't added to the terminal's/system's PATH, however running the library as a module (python -m aoi) will always work as long as python is added to path.InstallationRequires Python (3.8 or later)Installing aoi in your environment using pip, poetry or any favourable package manager# pip$pipinstallaoi# from pypi$python-mpipinstallgit+https://github.com/sarthhh/aoi.git# from source# poetry$poetryaddaoi# from pypi$poetryaddgit+https://github.com/sarthhh/aoi.git# from source
Package: aoirint-hg100rclient
aoirint_hg100rclientCATV回線用インターネットモデムHUMAX HG100R-02JGをHTTP API経由で操作するための非公式パッケージ。pip3installaoirint-hg100rclientAuthentication設定ファイル認証情報の保存hg100rlogin認証情報の削除hg100rlogout環境変数keyexampleHG100R_ROUTER_URLhttp://192.168.0.1HG100R_PASSWORDpasswordUsageWAN側IPv4アドレスの取得hg100rwanipv4WAN未接続時は0.0.0.0を返却。WAN側IPv6アドレスの取得hg100rwanipv6WAN未接続時はUnspecifiedを返却。モデム再起動hg100rreboot
Package: aoirint-id3
aoirint_id3pyThis library is under construction and before alpha stage. API will be changed without notice. There are many bugs and unimplemented features.Python Library to parse audio ID3 tag specified byID3.org.This library is intended to be a non-GPL dependent ID3 tag parser.EnvironmentWindows 10, Ubuntu 20.04Python 3.9, 3.10, 3.11InstallPyPIpip3installaoirint-id3UsageSeeexample.ImplementationID3v1ID3v1.1(Partial) ID3v2.2(Partial) ID3v2.3Implemented ID3v2.2 FramesTT2: Song titleTP1: Artist nameTAL: Album nameTYE: YearTRK: Track number and Total track numberCOM: CommentImplemented ID3v2.3 FramesTIT2: Song titleTPE1: Artist nameTALB: Album nameTYER: YearTRCK: Track number and Total track numberCOMM: CommentAPIC: Album artTODOSupport more ID3v2.2 framesAlbum artSupport more ID3v2.3 framesUser-friendly ID3v2 Frame APIPoetry referenceLock Python version with pyenvenvPYTHON_CONFIGURE_OPTS="--enable-shared"pyenvinstall3.9.x
pyenvlocal3.9.x

poetryenvremovepython
poetryenvusepythonInstall dependenciespoetryinstallAdd a packagepoetry add 'mypackage'
poetry add --group test 'mypackage'
poetry add --group build 'mypackage'Dump requirements.txtpoetryexport--without-hashes-orequirements.txt
poetryexport--without-hashes--withtest-orequirements-test.txt
poetryexport--without-hashes--withbuild-orequirements-build.txtRun pytestpoetryrunpytesttests/Referencehttps://web.archive.org/web/20210816205319/https://id3.org/id3v2-00https://web.archive.org/web/20220525235101/https://id3.org/d3v2.3.0https://ja.wikipedia.org/w/index.php?title=ID3%E3%82%BF%E3%82%B0&oldid=89477951https://www.loc.gov/standards/iso639-2/php/code_list.php
Package: aoirint-jmapy
aoirint_jmapyUnofficial JMA weather forecast API wrapper in Python気象庁天気予報データの非公式Pythonラッパー2022-05-27時点のAPIに対応気象庁の天気予報ページ:https://www.jma.go.jp/bosai/forecast/気象庁ホームページ コンテンツの利用規約:https://www.jma.go.jp/jma/kishou/info/coment.htmlInstallpip3installaoirint_jmapyUsage東京都 東京地方のデータを見る例fromaoirint_jmapyimportJmaApi,Telops# UserAgentに含めるため、あなたのアプリケーション名、バージョンを設定することを推奨# UserAgentは次のようになります: MyWeatherApp 0.1.0 / aoirint_jmapy 20220527.4# アプリケーションを一般に配布する場合、不具合等により不特定多数の端末から# 気象庁のサーバに負荷をかけることがないように、自分でキャッシュサーバを立てること等を推奨# jma_url以下のパスを揃えると切り替えできるjma=JmaApi(jma_url='https://www.jma.go.jp',app_name='MyWeatherApp',app_version='0.1.0',)# 東京都forecast=jma.forecast(area_id='130000')print(forecast)## 東京地方print(forecast[0])### 3日間予報print(forecast[0].timeSeries[0])### 週間予報print(forecast[0].timeSeries[1])### 3日間天気概況overview_forecast=jma.overview_forecast(area_id='130000')print(overview_forecast.text)### 週間天気概況overview_week=jma.overview_week(area_id='130000')print(overview_week.text)# WeatherCodeを対応するテキストにする（Third party contentsの項を参照）weather_code='101'print(Telops[weather_code][3])# 晴時々曇area_idを調べる※ 単一の地点のみでいい場合、気象庁の天気予報ページから手動で選択して実際のリクエストURLから抽出する方が簡単# エリアリストarea=jma.area()## センターリスト（気象台リスト）print(area.centers)### 北海道地方: center_id=010100#### 宗谷地方: area_id=011000#### 上川・留萌地方: area_id=012000print(area.centers['010100'])### 関東甲信地方: center_id=010300#### 東京都: area_id=130000#### 神奈川県: area_id=140000print(area.centers['010300'])Supported data url listhttps://www.jma.go.jp/bosai/common/const/area.jsonhttps://www.jma.go.jp/bosai/forecast/const/forecast_area.jsonhttps://www.jma.go.jp/bosai/forecast/const/en_amedas.jsonhttps://www.jma.go.jp/bosai/forecast/const/anniversary.jsonhttps://www.jma.go.jp/bosai/forecast/const/week_area.jsonhttps://www.jma.go.jp/bosai/forecast/const/week_area05.jsonhttps://www.jma.go.jp/bosai/forecast/const/week_area_name.jsonhttps://www.jma.go.jp/bosai/forecast/data/overview_forecast/{area_id}.jsonhttps://www.jma.go.jp/bosai/forecast/data/overview_week/{area_id}.jsonhttps://www.jma.go.jp/bosai/forecast/data/forecast/{area_id}.jsonhttps://www.jma.go.jp/bosai/warning/data/warning/{area_id}.jsonThird party contents「晴」「曇後雨」などのテキストは、API中でweatherCodeという数値IDで識別されます。
この数値IDに対応するテキストはAPIから取得できず、JavaScriptコードとして埋め込まれています。
利便性のため、この辞書をダンプしたものをライブラリに同梱し、コード中から参照できるようにしています。aoirint_jmapy/static/const_telops.jsonデータの出典: 気象庁ホームページhttps://www.jma.go.jp/bosai/forecast/気象庁ホームページ コンテンツの利用規約:https://www.jma.go.jp/jma/kishou/info/coment.htmlUpdate const_telops.jsonhttps://www.jma.go.jp/bosai/forecast/を開く。
開発者ツールで以下を実行、出力をコピーして貼り付けする。console.log(JSON.stringify(Forecast.Const.TELOPS))DevelopmentEnvironmentpython3-mvenvvenvsourcevenv/bin/activate

pip3install-rrequirements.txtLock dependenciespip3installpip-tools

pip-compilerequirements.in
pip-compilerequirements.test.inTest# Download some JMA API response for test./get_testdata.sh

pip3install-rrequirements.test.txt

mypyaoirint_jmapy/

pytesttests/ReleaseGitHub Releaseを作成するとGitHub Actionsにより自動でPyPIにリリースされる。
Package: aoirint-liveinfo
liveinfopyInstallationPython 3.10PyPIhttps://pypi.org/project/aoirint-liveinfo/pip3installaoirint-liveinfoBinaryhttps://github.com/aoirint/liveinfopy/releasesUsageニコニコ生放送live.nicovideo.jpliveinfo-snicolive"co5633084"# 番組 （ 月刊ニコニコインフォチャンネル https://live.nicovideo.jp/watch/lv339313375 ）liveinfo-snicolive"lv339313375"# コミュニティ （ ニコニコ動画プレミアムアワード https://com.nicovideo.jp/community/co5683564 ）liveinfo-snicolive"co5683564"# ユーザー （ ニコニコプレミアムDAY https://www.nicovideo.jp/user/123430062 ）liveinfo-snicolive"user/123430062"# ニコニコチャンネル （ウェザーニュースチャンネル https://ch.nicovideo.jp/weathernews ）liveinfo-snicolive"ch1072"期待される挙動と既知の問題放送中の番組がある場合、その番組を返します。最後に放送した番組がある場合、その番組を返します。
番組が放送中かどうか判定するには、放送開始時間（start_date）と放送終了時間（end_date）および現在時刻が利用できます。番組ID（lv*）ではなく、コミュニティID（co*）やユーザID（user/*）、ニコニコチャンネルID（ch*）を渡した場合、https://live.nicovideo.jp/watch/*に各IDを設定したときと同じ挙動をします。既知の問題として、ニコニコ公式チャンネルの月刊ニコニコインフォチャンネルが放送中でないときに上記操作をしたとき、番組が存在しない（not_found）扱いになることが確認されています。
これはニコニコまたは当該チャンネルの仕様として、修正は考えていません（「公式」番組を放送した場合または「公式」番組しか放送したことがない場合に起きる可能性があるかも？）。# Return not_found (at least not-onair status)# ニコニコチャンネル （月刊ニコニコインフォチャンネル https://ch.nicovideo.jp/weekly-niconico-info ）liveinfo-snicolive"ch2646073"YouTube LiveAPIキーYouTube Data API v3を使用します。APIキーが必要です。
以下の公式ドキュメントに沿って、YouTube Data API v3にアクセスできるAPIキーを発行してください。https://developers.google.com/youtube/v3/getting-startedCLIでは、APIキーは、引数の値・引数の値で指定されたファイル・環境変数の値・環境変数の値で指定されたファイル、のいずれかとして渡します。
自身の用途に適した安全な方法でAPIキーを渡すようにしてください。なお、CLI以外の利用（ライブラリとしての利用）では、これらの引数や環境変数は使用されません。引数の値:--ytlive_api_key引数の値で指定されたファイル:--ytlive_api_key_file環境変数の値:LIVEINFO_YTLIVE_API_KEY環境変数の値で指定されたファイル:LIVEINFO_YTLIVE_API_KEY_FILE使用例引数にはチャンネルID（URL・ハンドル名は使用不可）を渡してください。liveinfo-sytlive--ytlive_api_key_file/secrets/ytlive_api_key"UC7OazbQ3Eo9vrkcReXGIZkQ"ハンドル名が設定されたチャンネルでは、チャンネルIDがURLに含まれなくなるため、
チャンネルIDを調べるのが難しいことがあります。
チャンネル個別ページを開き、開発者ツールで以下のJavaScriptコードを実行すると、簡単にチャンネルIDを確認できます（2022-11-28 現在）。document.querySelector('meta[itemprop="channelId"]').content現在の仕様最新5件の動画・生放送・プレミア公開動画から、生放送・プレミア公開動画を抽出公開設定が「公開」のコンテンツのみを返す（限定公開、非公開は含まれない）liveBroadcastContentライブ配信予約:upcomingライブ配信中:live終了済みのライブ配信・動画:nonestatus.uploadStatusuploaded: ライブ配信中processed: 終了済みのライブ配信・プレミア公開動画DevelopmentInstall dependenciespython3 -m venv venv
source venv/bin/activate

pip3 install -r requirements.txtIf you are using pyenv, seepyenv and PyInstaller.Run testflake8

mypy.

pytesttests/API研究以下、未実装または実装予定のない内容が含まれます。ニコニコ生放送live.nicovideo.jphttps://com.nicovideo.jp/api/v1/communities/{community_id}/lives/onair.jsonコミュニティで放送中の番組を返す（コミュニティ個別ページの放送Alert表示用）{community_id}には、コミュニティIDco*の数値部分（*）が入りますニコニコチャンネルプラスnicochannel.jphttps://nfc-api.nicochannel.jp/fc/fanclub_sites/{fanclub_site_id}/live_pages?page={page}&live_type={live_type}&per_page={per_page}https://nicochannel.jp/{channel_slug}/livesで表示される生放送番組一覧fanclub_site_id:channel_slugとは異なる数値IDlive_type1(CURRENT): 放送中2(SCHEDULED): 放送予定3(FINISHED): 過去の放送（すべて）4(ARCHIVED): 過去の放送（生放送アーカイブ）「すべて」と「生放送アーカイブ」の違い: 調査中（字面から、アーカイブが残っていない放送＝タイムシフト非公開相当？と残っている放送の区別？）page1始まりper_page初期値live_type=1:10初期値live_type=2:6初期値live_type=3:8初期値live_type=4:8
Package: aoirint-miyadaiku-theme-blog
aoirint_miyadaiku_theme_blogMiyadaiku - DocMiyadaiku - GitHubMiyadaiku - PyPIpip3 install aoirint_miyadaiku_theme_blog# in document directory with config.yml,
miyadaiku-build -sw .Sample config.yml# Miyadaiku config file

# Base URL of the site
site_url: https://www.example.com

# Title of the site
site_title: Your site title

# Default language code
lang: ja-JP

# Default charset
charset: utf-8

# Default timezone
timezone: Asia/Tokyo

copyright: Copyright © 20xx Your Name.

favicon: /favicon.ico

# ga_tracking_id: UA-...

twitter_name: example
github_name: github


# List of site theme
themes:
  - aoirint_miyadaiku_theme_blog
Package: aoirint-psdlayer2dirpy
psdlayer2dirpyGitHub:https://github.com/aoirint/psdlayer2dirpyPyPI:https://pypi.org/project/aoirint-psdlayer2dirpy/Docker Hub:https://hub.docker.com/r/aoirint/psdlayer2dirpyUsageBinaryDownload fromReleases../psdlayer2dir image.psd -o output/PyPIpip3installaoirint_psdlayer2dirpy

psdlayer2dirimage.psd-ooutput/Dockerdockerpullaoirint/psdlayer2dirpy

dockerrun--rm-v"$PWD:/work"-w/workaoirint/psdlayer2dirpyimage.psd-ooutput/DevelopmentThis repository usesPoetry.pyenv + PoetryenvPYTHON_CONFIGURE_OPTS="--enable-shared"pyenvinstall3.10.10
pyenvlocal3.10.10

poetryenvremovepython
poetryenvusepython
poetryinstallFormat codepoetryrunpysenrunlintformatLibrary management# Add dependencypoetryadd{package_name}poetryadd-Gdev{package_name}# Dump `requirements*.txt`poetryexport--without-hashes-orequirements.txt
poetryexport--without-hashes--withdev-orequirements-dev.txtDockerdockerbuild-tpsdlayer2dirpy.

dockerrun--rm-v"./work:/work"-w/workpsdlayer2dirpyimage.psd-ooutput/Dependenciespsd-tools:DocsGitHubPyPI
Package: aokitools
MIT LicenseCopyright (c) 2021 aokitoolsPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: aoku
AboutThe Aoku.py library is a module with simplified functions through which anyone can create their own Discord bot.Aoku.py Easy to learn and also does not have any complex functionsExamplefromaokuimportaokuBotbot=aokuBot(intents=True,selfbot=False)bot.onReady("Bot is ready to use!")bot.onMessage()bot.newCommand(name="!ping",code="Pong! $pingms")bot.newCommand(name="!uptime",code="Uptime: $uptime")bot.start("BOT_TOKEN",selfbot=False)
Package: aomaker
Quickly Arrange,Quickly Test!详细使用指南🧭核心思想AoMaker，即 Api object Maker，那什么是API Object呢？API Object是Page Object设计模式在接口测试上的一种延伸，顾名思义，这里是将各种基础接口进行了一层抽象封装，将其作为 object，通过不同的 API 对象调用来组装成不同的业务流场景。举个简单例子：有一个购物车功能，它有如下接口：add，将物品添加到购物车list，查看购物车内所有物品delete，清空购物车内所有物品那么，我们通过ao的思想来封装这个功能所有接口：classShoppingTrolley:defadd(self):"""添加物品到购物车"""passdefdelete(self):"""清空购物车"""passdeflist(self):"""查看购物车内所有物品"""pass当我们需要测试购物车的增-查-删流程时，只需要实例化ShoppingTrolley类，通过调用对应的接口对象，即可完成业务场景的组装：classTestShoppingTrolley:deftest_shopping(self):"""测试购物车增-查-删流程"""st=ShoppingTrolley()# 1.添加物品到购物车st.add()# 2.查看购物车内物品st.list()# 3.清空购物车st.delete()解释了API Object，那Maker又怎么理解呢？Maker其实就是框架本身提供各种辅助手段帮助快速的去编排ao和case。什么手段？怎么辅助呢？栗子：classInstance(BaseApi):@aomaker.dependence(image_api.describe_images,"describe_images")@aomaker.dependence("instance.describe_instance_types","instance_types",imp_module="apis.iaas.instance.instance")@aomaker.async_api(ins_listener,"instances")defcreate_instance(self,test_data:dict,**kw_params):"""创建主机"""kw_params["describe_images"]=self.cache.get_by_jsonpath("describe_images","$..image_id")kw_params["instance_types"]=self.cache.get_by_jsonpath("instance_types","$..instance_type_id")kw_params["cpu"]=test_data["cpu"]kw_params["memory"]=test_data["memory"]params_model=model.RunInstanceModel(**kw_params)resp=self.send_http(params_model)returnresp对于一个接口的封装，其实核心的处理就是接口参数进行参数化处理，一个接口的参数一般可分为以下三种情况：常量：即不需要参数化的参数，写死即可上游依赖变量：即该参数需要调用另一个接口，从其返回值中提取测试数据：即需要从用例层传入的测试数据，一般会做数据驱动其中，对于上游依赖变量的处理是每个接口测试框架必须要面对的问题，aomaker的解法是通过@dependence装饰器去标注该接口的依赖，让其自动识别并调用依赖，并结合aomaker特殊的变量管理机制去灵活存取依赖值。此外，如果该接口是一个异步接口，那么还需要对其进行异步处理，aomaker的解法依然是通过装饰器标注，通过@async_api指定该接口的异步处理函数，在接口调用并正常收到返回后，将进行异步处理。通过上面的栗子可以看出，aomaker对于一个接口的定义，包括：前置：接口的上游依赖调用（同一个依赖只会调用一次）定义：对接口进行http协议填充，包括接口参数的参数化处理、请求发送（headers等公共数据隐藏在基类中自动处理）后置（如果是异步）：在接口调用完成并得到正常反馈后，开始自动进行轮询处理，直到得到异步任务完成的反馈这样的目的是为了保证接口定义功能单一、简洁，方法中只有接口的定义，没有过多的数据处理、逻辑判断等操作，另一方面，提高了复用性，不用反复处理前后置并且同样的依赖不会重复调用。当完成了这样一个ao的定义，就可以供上层（用例层或业务层）调用，在调用层不用再去关心该怎么处理它的依赖关系，该怎么处理后置操作，只需要调用ao这块积木去组装你的用例或业务即可，内部 细节全由框架自动帮你完成。aomaker早期1.0版本中，其实还提供了两种自动生成ao和case的方式：通过yaml模板自动生成（包括har和swagger转换）通过流量录制自动生成当时受httprunner的影响较大，陷入了一些思维定式，觉得通过模板转换自动生成代码感觉很高效，但经过长时间的项目实践，发现模板会有很多条条款款的限制，每个项目又不尽相同，这样反而限制了灵活性（没有说httprunner不好的意思，hr设计得非常优秀，收益良多，可以说没有hr就没有aomaker），处处掣肘不能放飞自我策马奔腾。所以后来在2.0版本中，基本弃用了这两种方式（但代码依然保留，或许有人喜欢呢），还是更推荐直接撸代码来得快，aomaker只是提供了一些辅助工具，帮你撸得更快更稳更方便，可扩展性还是非常高的，不会限制你的发挥。定位一款基于pytest，将接口通过ao 对象方式来编排管理的接口自动化框架，让测试人员能快速完成自动化项目搭建和高可维护性脚本的编写，快速开始测试。特性提供 CLI 命令提供脚手架一键安装，开箱即用变量管理简单简洁处理依赖和异步接口不同粒度的重试机制三种方式快速编写 ao 和 case支持多进程和多线程易扩展丰富的断言支持流量录制支持 pytest 所有用法和插件allure 报告优化测试报告消息通知...交流如果对该框架感兴趣以及有更多好的想法，欢迎交流探讨~
Package: aonsq
aonsqnsq clientExampleimportorjsonimportasynciofromdatetimeimportdatetime,timezonefromloguruimportloggerfromaonsqimportNSQMessage,NSQasyncdefmsg_handler(msg:NSQMessage)->bool:logger.debug(f"msg:{msg.id}")returnTrueasyncdeftest():mq=NSQ(host="127.0.0.1",port=4071)awaitmq.connect()awaitmq.sub("demo","test",msg_handler)whileTrue:forjinrange(1000):awaitmq.pub("demo",orjson.dumps({"id":j,"ts_created":datetime.now(timezone.utc)}))awaitasyncio.sleep(1)try:asyncio.get_event_loop().run_until_complete(test())exceptKeyboardInterrupt:pass
Package: aoo
📦 setup.py (for humans)This repo exists to providean example setup.pyfile, that can be used
to bootstrap your next Python project. It includes some advanced
patterns and best practices forsetup.py, as well as some
commented–out nice–to–haves.For example, thissetup.pyprovides a$ python setup.py uploadcommand, which creates auniversal wheel(andsdist) and uploads
your package toPyPiusingTwine, without the need for an annoyingsetup.cfgfile. It also creates/uploads a new git tag, automatically.In short,setup.pyfiles can be daunting to approach, when first
starting out — even Guido has been heard saying, "everyone cargo cults
thems". It's true — so, I want this repo to be the best place to
copy–paste from :)Check out the example!Installationcdyour_project# Download the setup.py file:#  download with wgetwgethttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.py-Osetup.py#  download with curlcurl-Ohttps://raw.githubusercontent.com/navdeep-G/setup.py/master/setup.pyTo DoTests via$ setup.py test(if it's concise).Pull requests are encouraged!More ResourcesWhat is setup.py?on Stack OverflowOfficial Python Packaging User GuideThe Hitchhiker's Guide to PackagingCookiecutter template for a Python packageLicenseThis is free and unencumbered software released into the public domain.Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any means.
Package: aop
# Advice[Aspect-oriented programming](https://en.wikipedia.org/wiki/Aspect-oriented_programming)## TODO1. FIX starred import1. Patch already imported objects (`patch_project`)## Usage```pythonimport aopdef multiply(context):print(context.args)print(context.kwargs)yieldcontext.result *= 100aop.register(handler=multiply,modules=aop.match(equals='math'),targets=aop.match(regexp='(sin|cos)'))```Ok, let's check:```pythonIn [2]: import mathIn [3]: math.cos(0)(0,){}Out[3]: 100.0```
Package: aop2db
Package for compiling the adverse outcome pathway (AOP) data into a relational database. The data is publicly available at theAOP website.Installationaop2dbcan be directly installed from PyPi with pip:$ pip install aop2dbUsageTo load the data into a relational database:$ aop2db loadTo set the driver of your database:$ aop2db conn mysql+pymysql://<user>:<password>@<server>/<database>DisclaimerAOP2DB is a scientific software that has been developed in an academic capacity, and thus comes with no warranty or
guarantee of maintenance, support, or back-up of data.
Package: aopclient
# aopclient
Client for the AOP# To run tests:
Clone this repository, and then:
cd aopclient
pip install pytest
pytestSample code:from aopclient import AOLClient
client = AOLClient()
client.show_config()
client.connect()
client.get_organizations()
client.get_campaigns(org_id)
client.get_campaigns_by_advertiser(org_id, ad_id)
client.get_campaigns_by_advertiser_by_campaign(org_id, ad_id, campaign_id)
tactics = client.get_tactics_by_campaign(org_id, ad_id, campaign_id)
creatives = client.get_creative_assignments(org_id, ad_id, campaign_id, tactic_id)
private_deal_assignments = client.get_deal_assignments(org_id, ad_id, campaign_id, tactic_id)
flights = client.get_flights_by_tactic_id(7000038774, 7000052577, 5969, 355426) # (org_id, ad_id, campaign_id, tactic_id)advertiser = client.get_advertiser(7000095690, 7000092141) # (org_id, ad_id)
Package: a-operators
Novigi Custom Airflow OperatorsThis Repo contains custom airflow operators which were writen by Novigi Pty LtdVersion No - 1.0Bitbucket Link -https://Prasadi1994@bitbucket.org/novigi/novigi_operators.gitHow do I get set up?Summary of set upConfigurationDependenciesDatabase configurationHow to run testsDeployment instructionsContribution guidelinesWriting testsCode reviewOther guidelinesWho do I talk to?Repo owner or adminOther community or team contact