Saravanan666/pypi-org huggingface dataset:
Package: asyncgp
asyncgp -- A database interface library based on asyncpg for GreenPlum and Python/asyncioasyncgpis a database interface library based on asyncpg for
GreenPlum and Python/asyncio.asyncgp requires Python 3.5 or later and add supported for GreenPlum versions 5.x.DocumentationYou can refer to asyncpg documenthere.Installationasyncgp is available on PyPI.
Use pip to install:$pipinstallasyncgpor:$gitclonehttps://github.com/MyColorfulDays/asyncgp.git
$cdasyncgp
$pythonsetup.pyinstallBasic Usageimportasyncioimportasyncgpasasyncpgasyncdefrun():conn=awaitasyncpg.connect(user='user',password='password',database='database',host='127.0.0.1')values=awaitconn.fetch('''SELECT * FROM mytable''')awaitconn.close()loop=asyncio.get_event_loop()loop.run_until_complete(run())
Package: async-gpib
async_gpibPython3 asyncioLinux GPIB Wrapper. The library requires Pythonasyncioand is a thin wrapper for the threaded Linux GPIB Wrapper
library.The library is fully type-hinted.Supported DevicesInstrumentsDeviceSupportedTestedCommentsFluke 5440B:heavy_check_mark::heavy_check_mark:HP 3478A:heavy_check_mark::heavy_check_mark:SetupThere are currently no packages for Linux GPIB available on all platforms. To install the library it is required to
install Linux GPIB.Linux GPIB:These instructions are for Ubuntu:sudoaptinstallsubversionbuild-essentialautoconflibtoolflexbisonpython3-dev
svncheckoutsvn://svn.code.sf.net/p/linux-gpib/code/trunklinux-gpib-codecd~/linux-gpib-code/linux-gpib-kernel
make
sudomakeinstall# ignore the signing errorssudogroupaddgpib# seems not to be installedsudomodprobeni_usb_gpibcd~/linux-gpib-code/linux-gpib-user
./bootstrap
./configure--sysconfdir=/etc
make
sudomakeinstall
sudoldconfigLinux GPIB Python module:Once Linux GPIB is installed, you can either install the python package or use thegpib-ctypespackage.python3-mvenvenv# virtual environment, optionalsourceenv/bin/activate
pipinstall-e~/linux-gpib-code/linux-gpib-user/language/python/async_gpib Python moduleThe package can be directly installed via Pypi:python3-mvenvenv# virtual environment, optionalsourceenv/bin/activate
pipinstallasync-gpibUsageInitialize the GPIB adapterfromasync_gpibimportAsyncGpib# Create a controller and talk to device address 22asyncwithAsyncGpib(name=0,pad=22)asgpib_device:# Add your code here...Seeexamples/for more working examples.Support for Multiple Devices:warning:Concurrency with multiple devices: Note, that when using a single adapter to control multiple devices,
there is no concurrency on the GPIB bus. This means, there isnospeed increase, when making asynchronous reads
from multiple devices on the bus regarding the transfer time.VersioningI useSemVerfor versioning. For the versions available, see thetags on this repository.DocumentationI use theNumpydocstyle for documentation.AuthorsPatrick Baus-Initial work-PatrickBausLicenseThis project is licensed under the GPL v3 license - see theLICENSEfile for details
Package: asyncgpio
AsyncGPIO allows easy access to the GPIO pins on your Raspberry Pi or
similar embedded computer.It is based on libgpiod and its CFFI adapter by Steven P. Goldsmith
<sgjava@gmail.com>, as downloaded fromgithub.To run examples, make sure to installtriofirst.Testing AsyncGPIO requires a Linux distribution that enables the mock-GPIO module.
As of mid-2020, Debian’s kernel does not include this module, but Raspbian’s does.If you can compile your own kernel: the option is named CONFIG_GPIO_MOCKUP,
in Device Drivers / GPIO support / Memory mapped GPIO drivers / GPIO
Testing Driver.Writing an actual test suite is TODO. There is a more elaborate test script
inDistKV-GPIO.
Package: asyncgram
Telegram requirementsTo be able to use this tool, you will require a Telegram bot token and a group chat ID.Telegram bot token referenceTelegram group chat ID referenceInstallationpip install asyncgramUsageOnce you have your telegram bot token and group chat ID, and you've install asyncgram, you are ready to get started.Creating a clientfrom asyncgram import Asyncgram

# replace XXX with your keys
TG_BOT_TOKEN = "XXX"
TG_GROUP_ID = "XXX"

client = Asyncgram(
    tg_token = TG_BOT_TOKEN, 
    tg_group = TG_GROUP_ID
)Logging messagesclient.start()

messages = [
    'Hello world',
    'My name is codeman',
    'My birthday was yesterday.'
]

for msg in messages: client.put(msg)

client.stop()This is a toy example to get you started. Recommended usage would be to put relevant messages from some form of a websocket connection such that it's logged in an asynchronous way.DonationsIf you liked this tool and would like to support me, kindly send your donations in ETH to 0xB08f9B316ddBCA4Dc5736153Cd63B8d9Bec46Bab
Package: async-graph-data-flow
async-graph-data-flowFull DocumentationPlease visithttps://civisanalytics.github.io/async-graph-data-flowPlease also check out thisblog postintroducing this package.LicenseBSD 3-Clause License. Please seeLICENSE.txtin the GitHub source code for details.Setting up a Development EnvironmentThe latest code under development is available on GitHub athttps://github.com/civisanalytics/async-graph-data-flow.
To obtain this version for experimental features or for development:gitclonehttps://github.com/civisanalytics/async-graph-data-flow.gitcdasync-graph-data-flow
pipinstall-e".[dev]"To run tests and styling checks:pytest
flake8srctestsexamples
black--checksrctestsexamplesFor MaintainersTo update the Sphinx documentation,
the source files that need editing are underdocs/source/;
everything else underdocs/is auto-generated.
After the manual updates underdocs/source/are ready,
the HTML pages are updated as follows:rm-rdocs/_sourcesdocs/_static&&rmdocs/*.html# Run the following command *twice* -- certain HTML updates only show up after multiple `sphinx-build` runs.sphinx-builddocs/sourcedocs
Package: async-graphql
Make graphql requests asynchronously, python 2.7 and more required.
Soon will come graphql subscriptions.The library is tiny, memory usage loading the module is also is good:Line #    Mem usage    Increment   Line Contents
================================================
    12     10.9 MiB     10.9 MiB   @profile
    13                             def profiled():
    14     13.0 MiB      2.1 MiB       import asyncio
    15     13.0 MiB      0.0 MiB       async def main(loop):
    16     13.5 MiB      0.5 MiB       from async_graphql import Client, errorsThis is good when using graphql in lots of replicated micro-services to not go out of memory.
Package: asyncgraphs
AsyncGraphsAsyncGraphs is a tiny ETL framework that leverages asyncio to make the execution concurrent whilst blocked on I/O.Source:https://github.com/SamVermeulen42/asyncgraphsDocumentation:https://samvermeulen42.github.io/asyncgraphs/FeaturesTypedSimple concurrency based on asyncioEasy construction of ETL graphsInstallationpip install asyncgraphsExampleThe following example prints random Pokémon and the games they appear in.It does this every 10 seconds and usesPokéApi.importaiohttpfromasyncgraphsimportGraph,runimportasynciofromfunctoolsimportpartialfromrandomimportrandintfromtypingimportDict,Anyasyncdefrandom_pokemon_id():whileTrue:yieldrandint(1,151)awaitasyncio.sleep(10)asyncdefget_pokemon_info(session:aiohttp.ClientSession,pokemon_id:int)->Dict[str,Any]:pokemon_url=f"https://pokeapi.co/api/v2/pokemon/{pokemon_id}"asyncwithsession.get(pokemon_url)asresponse:yieldawaitresponse.json()defformat_pokemon(pokemon_info:Dict[str,Any])->str:name=pokemon_info["name"]versions=(game['version']['name']forgameinpokemon_info['game_indices'])returnf"{name}:{', '.join(versions)}"asyncdefmain():asyncwithaiohttp.ClientSession()assession:g=Graph()g|random_pokemon_id()|partial(get_pokemon_info,session)|format_pokemon|printawaitrun(g)asyncio.run(main())
Package: asyncgridfs
asyncgridfs===========async mongo gridfs for tornadoInstallation------------Installing: `pip install asyncgridfs` or ` easy_install asyncgridfs`Usage-----import asyncmongoimport tornado.webfrom asyncgridfs import GridFSclass Handler(tornado.web.RequestHandler):@propertydef db(self):if not hasattr(self, '_db'):self._db = asyncmongo.Client(pool_id='mydb', host='127.0.0.1', port=27017, maxcached=10, maxconnections=50, dbname='test')return self._db@tornado.web.asynchronousdef get(self):fid = self.get_argument('fid')fs = GridFS(self.db)fs.get(ObjectId(fid),callback=self._on_get)@tornado.web.asynchronousdef post(self):f = self.request.files['imgFile'][0]content = f.pop('body')content_type = f.pop('content_type')filename = f.pop('filename')fs = GridFS(self.db)fs.put(content, contentType=content_type, filename=filename, callback=self._on_post)def _on_get(self, fileobj):self.set_header('Content-Type', fileobj['contentType'])self.write(fileobj['data'])self.finish()def _on_put(self, _id):self.write(str(_id))self.finish()
Package: async-gsm-modem
async-gsm-modemasync-gsm-modem is YetAnother™ Python library for controlling an AT GSM modem using asyncio.Installationpip3installasync-gsm-modemUsageimportasynciofromasync_gsm_modem.quectel_ec25importModemasyncdefexample():modem=Modem('/dev/ttyUSB2',115200)awaitmodem.connect()awaitmodem.ping()formessageinawaitmodem.list_messages():print(message)awaitmodem.close()loop=asyncio.get_event_loop()loop.run_until_complete(example())TODOFully implement EC25 moduleImplement generic modem classMMS functionalityTestingMore examplesDocumentationFull typingContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseApache 2
Package: asyncgTTS
asyncgTTSAsynchronous interfaces to theofficial Google Text to SpeechoreasygTTSAPIs written with aiohttp.ExamplesasyncgTTSimportasynciofromsubprocessimportPIPE,runimportaiohttpimportasyncgTTSasyncdefmain():asyncwithaiohttp.ClientSession()assession:gtts=awaitasyncgTTS.setup(premium=True,session=session,service_account_json_location="SERVICE_ACCOUNT.json")hello_world_ogg=awaitgtts.get("Hello World",voice_lang=("en-US-Standard-B","en-us"))hello_world_mp3=awaitgtts.get("Hello World",voice_lang=("en-US-Standard-A","en-us"),ret_type="MP3")withopen("Hello_world.ogg","wb")asf:f.write(hello_world_ogg)withopen("Hello_world.mp3","wb")asf:f.write(hello_world_mp3)asyncio.run(main())easygTTSimportasyncioimportaiohttpimportasyncgTTSasyncdefmain():asyncwithaiohttp.ClientSession()assession:gtts=awaitasyncgTTS.setup(premium=False,session=session)hello_world=awaitgtts.get(text="Hello World")withopen("Hello_world.mp3","wb")asf:f.write(hello_world)asyncio.run(main())
Package: async-gTTS
asyncgTTSAsynchronous interfaces to theofficial Google Text to SpeechAPI written with aiohttp.Similar togoogleapis/python-texttospeechin concept, but asyncgTTS was designed with asynchronously in mind and is expected to be more performant.ExampleimportasyncioimportjsonfromasyncgTTSimportAsyncGTTSSession,ServiceAccountasyncdefmain():withopen("SERVICE_ACCOUNT.JSON")asservice_account_json:service_account_dict=json.load(service_account_json)service_account=ServiceAccount.from_service_account_dict(service_account_dict)asyncwithAsyncGTTSSession.from_service_account(service_account)asgoogle_tts:audio_bytes=awaitgoogle_tts.synthesize("vine boom")withopen("Hello_world.mp3","wb")asf:f.write(audio_bytes)asyncio.run(main())
Package: asyncgui
AsyncGuiA thin layer that helps to wrap a callback-style API in an async/await-style API.How to useDespite its name, the application ofasyncguiisnotlimited to gui programs.
You can wrap any kind of callback-based APIs in it.
The simplest example of it would besched,
whose the whole feature is timer.
All you need is just few lines of code:importschedimportasyncguis=sched.scheduler()# Wrapping 'scheduler.enter()'asyncdefsleep(duration,*,priority=10):sig=asyncgui.ISignal()event=s.enter(duration,priority,sig.set)try:awaitsig.wait()exceptasyncgui.Cancelled:s.cancel(event)raiseasyncdefmain():print('A')awaitsleep(1)# Now you can sleep in an async-mannerprint('B')awaitsleep(1)print('C')asyncgui.start(main())s.run()And you already have structured concurrency APIs as well:asyncdefprint_numbers():foriinrange(10):awaitsleep(.1)print(i)asyncdefprint_letters():forcin"ABCDE":awaitsleep(.1)print(c)asyncdefmain():# Let print_letters() and print_numbers() race.# As soon as any of them finishes, the other one gets cancelled.tasks=awaitasyncgui.wait_any(print_letters(),print_numbers())iftasks[0].finished:print("print_letters() won")else:print("print_numbers() won")print('main end')A
0
B
1
C
2
D
3
E
print_letters() won
main endInstallationIt's recommended to pin the minor version, because if it changed, it means someimportantbreaking changes occurred.poetry add asyncgui@~0.6
pip install "asyncgui>=0.6,<0.7"Tested onCPython 3.8CPython 3.9CPython 3.10CPython 3.11CPython 3.12 (3.12.1 or later)Async-libraries who relies on thisasyncschedasynckivyasynctkinterasyncpygame
Package: async_gui
async_guiasync_guiis a library aimed to make use of threads in GUI applications simpler.
It’s inspired by PyCon talkUsing futures for async GUI programming in Python 3.3andtornado@gen.engineimplementation.Most of GUI toolkits don’t allow you to access graphical elements from non-GUI thread.
Python 3.2+ has nice new featureconcurrent.futures, but we can’t just
wait for result from future and callbacks are not very handy.Combination ofCoroutines via Enhanced Generators (PEP-342)andfuturescreates a rich and easy to use asynchronous programming model
which can be used for creating highly responsive GUI applications.ExampleDemo of button click handler:@engine.asyncdefon_button_click(self,*args):self.status_label.setText("Downloading image...")# Run single task in separate threadimage_data=yieldTask(self.load_url,"http://www.google.com/images/srpr/logo4w.png")pixmap=QtGui.QPixmap.fromImage(QtGui.QImage.fromData(image_data))self.image_label.setPixmap(pixmap)self.status_label.setText("Downloading pages...")urls=['http://www.google.com','http://www.yandex.ru','http://www.python.org']# Run multiple task simultaneously in thread poolpages=yield[Task(self.load_url,url)forurlinurls]self.status_label.setText("Done")avg_size=sum(map(len,pages))/len(pages)self.result_label.setText("Average page size:%s"%avg_size)Tasks yielded fromon_button_click()executed in thread pool, but
GUI updates done in the GUI thread.
For CPU-bound applications there is also ability to run tasks in pool of
processes.Seefull exampleinexamplesdirectory.FeaturesPython 2.7+ (futuresrequired),
Python 3+ supportPyQt4/PySide, Tk, Wx, Gtk GUI toolkits support. Easy to add anotherCan execute tasks in Thread, Process, Greenlet (geventrequired)Possibility to run multiple tasks at the same timeStraightforward exception handlingFull test coverageInstallationUsingpip:$ pip install async_guiOr download, unpack and:$ python setup.py installTo run tests use:$ python setup.py testLinksDocumentationatreadthedocs.orgSource code and issue trackingatGitHub.History0.2.0 (2013-0x-xx)MultiTask can return generator of ready tasks instead waiting for all done0.1.0 (2013-04-06)initial PyPI release
Package: asyncgui-ext-clock
ClockAn event scheduler.fromasyncgui_ext.clockimportClockclock=Clock()# Schedules a function to be called after a delay of 20 time units.clock.schedule_once(lambdadt:print("Hello"),20)# Advances the clock by 10 time units.clock.tick(10)# The clock advanced by a total of 20 time units, and the callback function will be called.clock.tick(10)# => HelloIt also supports async-style APIs. The code below does the same thing as the previous one but in an async-style.importasyncguifromasyncgui_ext.clockimportClockclock=Clock()asyncdefmain():awaitclock.sleep(20)print("Hello")asyncgui.start(main())clock.tick(10)clock.tick(10)# => HelloThe two examples above effectively illustrate how this module works, but they are not practical.
In a real-world program, you probably want to callclock.tick()in a loop or schedule it to be called repeatedly using another scheduling API.
For example, if you are usingPyGame, you want to do:clock=pygame.time.Clock()vclock=asyncui_ext.clock.Clock()# main loopwhilerunning:...dt=clock.tick(fps)vclock.tick(dt)And if you are usingKivy, you want to do:fromkivy.clockimportClockvclock=asyncui_ext.clock.Clock()Clock.schedule_interval(vclock.tick,0)Installationpoetry add asyncgui-ext-clock@~0.1
pip install "asyncgui-ext-clock>=0.1,<0.2"Tested onCPython 3.10CPython 3.11
Package: asyncgur
asyncgurAn Asynchronous Imgur Wrapper to upload or get an image for PythonExample Usage:fromasyncgurimportImgurclient_id='YOUR_IMGUR_CLIENT_ID'imgur_app=Imgur(client_id)asyncdefmain():image,response=awaitimgur_app.upload_image(image='some_image_url_or_bytes')assertresponse.success==Trueandresponse.status==200print(image)loop=asyncio.get_event_loop()loop.run_until_complete(main())
Package: asynch
asynchIntroductionasynchis an asyncio ClickHouse Python Driver with native (TCP) interface support, which reuse most ofclickhouse-driverand comply withPEP249.Install>pipinstallasynchor if you want to installclickhouse-cityhashto enable
transport compression>pipinstallasynch[compression]UsageConnect to ClickHousefromasynchimportconnectasyncdefconnect_database():conn=awaitconnect(host="127.0.0.1",port=9000,database="default",user="default",password="",)Create table by sqlasyncdefcreate_table():asyncwithconn.cursor(cursor=DictCursor)ascursor:awaitcursor.execute('create database if not exists test')awaitcursor.execute("""CREATE TABLE if not exists test.asynch(`id`       Int32,`decimal`  Decimal(10, 2),`date`     Date,`datetime` DateTime,`float`    Float32,`uuid`     UUID,`string`   String,`ipv4`     IPv4,`ipv6`     IPv6)ENGINE = MergeTreeORDER BY id""")Usefetchoneasyncdeffetchone():asyncwithconn.cursor()ascursor:awaitcursor.execute("SELECT 1")ret=awaitcursor.fetchone()assertret==(1,)Usefetchmanyasyncdeffetchall():asyncwithconn.cursor()ascursor:awaitcursor.execute("SELECT 1")ret=awaitcursor.fetchall()assertret==[(1,)]UseDictCursorto get result with dictasyncdefdict_cursor():asyncwithconn.cursor(cursor=DictCursor)ascursor:awaitcursor.execute("SELECT 1")ret=awaitcursor.fetchall()assertret==[{"1":1}]Insert data with dictfromasynch.cursorsimportDictCursorasyncdefinsert_dict():asyncwithconn.cursor(cursor=DictCursor)ascursor:ret=awaitcursor.execute("""INSERT INTO test.asynch(id,decimal,date,datetime,float,uuid,string,ipv4,ipv6) VALUES""",[{"id":1,"decimal":1,"date":"2020-08-08","datetime":"2020-08-08 00:00:00","float":1,"uuid":"59e182c4-545d-4f30-8b32-cefea2d0d5ba","string":"1","ipv4":"0.0.0.0","ipv6":"::",}],)assertret==1Insert data with tupleasyncdefinsert_tuple():asyncwithconn.cursor(cursor=DictCursor)ascursor:ret=awaitcursor.execute("""INSERT INTO test.asynch(id,decimal,date,datetime,float,uuid,string,ipv4,ipv6) VALUES""",[(1,1,"2020-08-08","2020-08-08 00:00:00",1,"59e182c4-545d-4f30-8b32-cefea2d0d5ba","1","0.0.0.0","::",)],)assertret==1Use connection poolasyncdefuse_pool():pool=awaitasynch.create_pool()asyncwithpool.acquire()asconn:asyncwithconn.cursor()ascursor:awaitcursor.execute("SELECT 1")ret=awaitcursor.fetchone()assertret==(1,)pool.close()awaitpool.wait_closed()ThanksToclickhouse-driver, ClickHouse Python Driver with native interface support.LicenseThis project is licensed under theApache-2.0License.
Package: async-hcaptcha
AsyncHcaptchaInstallingPython 3.7 or higher and chrome with chromedriver are requiredpipinstallasync-hcaptchaExamplefromasync_hcaptchaimportAioHcaptchafromasync_hcaptcha.utilsimportgetUrlasyncdefgetAnswers(question,tasklist):fromosimportmakedirsmakedirs("captcha_images")answers={}tl={str(i):list(tasklist.keys())[i]foriinrange(len(tasklist.keys()))}fori,kintl.items():withopen(f"captcha_images/{i}.jpg","wb")asf:f.write(awaitgetUrl(tasklist[k],False))print(question)print("Answer with true/false or 1/0:")fori,uuidintl.items():ans=input(f"{i}? ").lower()ifansin("1","true"):answers[uuid]="true"else:answers[uuid]="false"returnanswersasyncdefmain():solver=AioHcaptcha("a5f74b19-9e45-40e0-b45d-47ff91b7a6c2","https://accounts.hcaptcha.com/demo",{"executable_path":"chromedriver.exe"},getAnswers)resp=awaitsolver.solve()print(resp)if__name__=="__main__":fromasyncioimportget_event_loopget_event_loop().run_until_complete(main())Automatically solved examplefromasync_hcaptchaimportAioHcaptchaasyncdefmain():solver=AioHcaptcha("a5f74b19-9e45-40e0-b45d-47ff91b7a6c2","https://accounts.hcaptcha.com/demo",{"executable_path":"chromedriver.exe"})resp=awaitsolver.solve()print(resp)if__name__=="__main__":fromasyncioimportget_event_loopget_event_loop().run_until_complete(main())Captcha with rqdata examplefromasync_hcaptchaimportAioHcaptchaasyncdefmain():solver=AioHcaptcha("a5f74b19-9e45-40e0-b45d-47ff91b7a6c2","https://accounts.hcaptcha.com/demo",{"executable_path":"chromedriver.exe"})resp=awaitsolver.solve(custom_params={"rqdata":"xHJHshn3p71FcYoVCW5zA3m2CFw59JXBecFaR2l90z/NjjoYaXq2FBTi05LPnOX1v/MwStZg9DZKQA4f4ExkDjwlMaS3AKGIrcb2rUKsg8nDI9IaXEFDAhWqvuuCuaW3urxO2J1B/NEkfS938O58cqrE00aPILCQPUHVU1l/Ek8"})print(resp)if__name__=="__main__":fromasyncioimportget_event_loopget_event_loop().run_until_complete(main())TODOMake hsw solving without seleniumAsync-hcaptcha uses code fromhcaptcha-challengerandpy-hcaptcha.
Package: asynchelper
Allows execution of unlimited number of asynchronous tasks while limiting the amount of active concurrent ones.UsageThere are only two functions (for now):asynchelper.TaskExecutor.map(task_generator: Iterable[callable], workers: Union(int, None) = 128)task_generatorcan be any iterable which holds (or generates) coroutines.workersis the maximum limit of active tasks concurrently.Nonefor no limit.This will keep pushing tasks in the iterable until it’s fully consumed.asynchelper.TaskExecutor.forever(task: callable, args: Iterable = [], workers: Union(int, None) = 128)taskis an async funtion to create a couroutine fromargsis an iterable of arguments to pass totaskworkersis the maximum limit of active tasks concurrently.Nonefor no limitThis will keep pushing thetask(*args), running them forever with a limit ofworkersactive tasks at any moment.asynchelperwas written byMario Nascimento.
Package: async-helper
async-helperasync-helper bySebastian SteinsLicence: MITUsageimport time, random
from async_helper import first_parallel_result

def time_consuming_function(i):
    print("I consume a lot of time")
    time.sleep(random.randint(1, 10))
    return i

candidates = [
    lambda: time_consuming_function(1),
    lambda: time_consuming_function(2),
]

best_effort_result = first_parallel_result(candidates)

print(best_effort_result)Giving preferenceimport time, random
from async_helper import first_parallel_result

def time_consuming_function(i):
    print("I consume a lot of time")
    time.sleep(random.randint(1, 10))
    return i

candidates = [
    0, lambda: time_consuming_function(1),  # This callable will start immediately.
    1, lambda: time_consuming_function(2),  # This callable will start with `1` sec delay.
]

best_effort_result = first_parallel_result(candidates)

print(best_effort_result)© 2021Sebastian Steins