Saravanan666/pypi-org huggingface dataset:
Package: aiolbry
aioLBRY, a Python API Wrapper for lbry & lbrycrdaioLBRY is a wrapper for thelbry daemonandlbrycrd daemonAPI for Python 3.7+(Python 2 will never be supported)InstallationWith pipSimply run the following$pipinstallaiolbryAnd you're done!Manually Cloning the RepositoryYou can either clone this repository or get a tarball from PyPI's
website for whatever version you want. Simply download it and# Simply clone the repository somewhere$gitclonehttps://gitlab.com/jamieoglindsey0/aiolbry# Or obtain a release from PyPI's site.$wget<extremelylonglinkgeneratedbyPyPI>

$tar-xzfaiolbry-x.x.x.tar.gzaiolbry/# Change directories into the newly created repository$cdaiolbry/# Now you simply run the setup.py file:$python3setup.pybuild_pyinstallUsageUsing the APIMake sure thatlbry-daemonis up and running, as you will not be able to
do anything without it.First, importLbrydApiorLbrycrdApifromaiolbryinto your project.API for LBRYDUsing the Generated CodeThe API generates all the functions from thelbryddocumentation, and translates
it into tangible, documented code.[1]importasyncio[2]fromaiolbryimportLbrydApi# Initialize the API[3]lbry=LbrydApi()[4]loop=asyncio.get_event_loop()# Just call the method as documented in the LBRYD API[5]loop.run_until_complete(lbry.claim_list(name="@lbry"))Calling the API ManuallySince all the code does is make requests to the lbry daemon, you can also
use it as you would with cURL on the commandline. In fact, this is
actually what the bodies of generated code do.# You can also use the traditional method of making requests# if you prefer the cURL commandline syntax, works the same.response=lbry.call("claim_list",{"name":"bellflower"})API For LbryCRDfromaiolbryimportLbrycrdApi# Provide the username and passwordlbrycrd=LbrycrdApi("username","password")# Just specify the method and the parametersresponse=lbrycrd.call("wallet_unlock",{"wallet_username","wallet_password"})
Package: aioldap
Not entirely ready, literally just started. Might shuffle things around a bit etc…This was initially going to be a complete “from scratch” LDAP library for asyncio. Having used ldap3 for quite a
while I thought: wouldn’t it be nice to have something ldap3-like but using normal asyncio. So I wrote this library which
is sort of based around ldap3, it uses ldap3’s encoding and decoding functions and I just dealt with the actual packet
handoff. As as for why I made this, well because I can… and because I was bored.I wouldn’t quite call this production ready yet, and it could do with a bit of cleaning up but if anyone actually
finds this library useful, raise an issue with anything you have and I’ll be happy to help out.In its current form it only supports Python3.6 as I have an async generator in the code, am looking at making it
Python3.5 compatible too.DocumentationEventually will be on readthedocsExampleSimple example of using aioboto3 to put items into a dynamodb tableconn=aioldap.LDAPConnection()awaitconn.bind(bind_dn=ldap_params['user'],bind_pw=ldap_params['password'],host=ldap_params['host'],port=ldap_params['port'])dn=user_entry('modify',ldap_params['test_ou1'])awaitconn.add(dn=dn,object_class='inetOrgPerson',attributes={'description':'some desc','cn':'some_user','sn':'some user','employeeType':['type1','type2']})awaitconn.modify(dn=dn,changes={'sn':[('MODIFY_REPLACE','some other user')],'employeeType':[('MODIFY_ADD','type3'),('MODIFY_DELETE','type1'),]})# Now search for userasyncforuserinconn.search(dn,search_filter='(uid=*)',search_scope='BASE',attributes='*'):assertuser['dn']==dnCreditsAll of the credit goes to @cannatag who literally had done all of the hard work for me.
Package: aiolib
# aiolib## DescriptionThe main purpose of this lib is to provide *asyncio* compatbile alternatives for items of the standard library that aren't asyncio compatible. E.g. `itertools.chain.from_iterable()` doesn't work with `async_generators`, etc.I hope/guess the stdlib will catch up with this sooner or later. This lib is for those who need a shim as soon as possible.If you find something in the standard lib that doesn't work or play well with asyncio, please go ahead and add your replecement/wrapper!## Requirementsaiolib requires Python `>= 3.6`## Installpip install aioliborpipenv install aiolib## Library Documentation### builtins#### `aenumerate`Async version of: [enumerate](https://docs.python.org/3.6/library/functions.html#enumerate)Example:```pythonasync for i in aenumerate(chain(a_gen, range(10))):print(i)```### itertools#### `itertools.chain(*iterables)`Async version of: [chain](https://docs.python.org/3.6/library/itertools.html#itertools.chain) in the stdlib.This function can handle `AsyncGeneratorType`.Example:```python# Use with async_generator:async for i in chain(my_async_gen1, my_async_gen2):print(i)# Allows for mixing normal generators with async generators:async for i in chain(my_async_gen, range(10)):print(i)```#### `itertools.chain_from_iterable(iterable)`Async version of: [from_iterable](https://docs.python.org/3.6/library/itertools.html#itertools.chain.from_iterable) in the stdlib.This function can handle `AsyncGeneratorType`.Example:```python# Use with async_generator:async for i in chain_from_iterable(my_async_generator):print(i)# Works with normal items as well:async for i in chain_from_iterable([range(10)]):print(i)```### More items to comePull requests appreciated!## DevelopmentJust clone the repo and run:pipenv install --devThis project uses [yapf](https://github.com/google/yapf), but I don't really care how you format your pull requests. It would be auto-formatted later.
Package: aiolibgen
aiocrossrefAsynchronous client for Libgen APIExampleimportasynciofromaiolibgenimportLibgenClientasyncdefbooks(base_url,ids):client=LibgenClient(base_url)returnawaitclient.by_ids(ids)response=asyncio.get_event_loop().run_until_complete(books('http://gen.lib.rus.ec',[100500]))
Package: aiolifx
aiolifxaiolifx is a Python 3/asyncio library to control Lifx LED lightbulbs over your LAN.Most of it was taken from Meghan Clarkk lifxlan package (https://github.com/mclarkk)
and adapted to Python 3 (and asyncio obviously)InstallationWe are on PyPi sopip3 install aiolifxor
python3 -m pip install aiolifxAfter installation, the utilityaiolifxcan be used to test/control devices.NOTE: When installing with Python 3.4, the installation produce an error message
(syntax error). This can be safely ignored.How to useEssentially, you create an object with at least 2 methods:- register
- unregisterYou then start the LifxDiscovery task in asyncio. It will register any new light it finds.
All the method communicating with the bulb can be passed a callback function to react to
the bulb response. The callback should take 2 parameters:- a light object
- the response messageThe easiest way is to look at the file in the examples directory. "Wifi" and "Uptime" use
a callback to print the info when it is returned.In essence, the test program is thisclass bulbs():
""" A simple class with a register and unregister methods
"""
    def __init__(self):
        self.bulbs=[]

    def register(self,bulb):
        self.bulbs.append(bulb)

    def unregister(self,bulb):
        idx=0
        for x in list([ y.mac_addr for y in self.bulbs]):
            if x == bulb.mac_addr:
                del(self.bulbs[idx])
                break
            idx+=1

def readin():
"""Reading from stdin and displaying menu"""

    selection = sys.stdin.readline().strip("\n")
    DoSomething()

MyBulbs = bulbs()
loop = aio.get_event_loop()
discovery = alix.LifxDiscovery(loop, MyBulbs)
try:
    loop.add_reader(sys.stdin, readin)
    discovery.start()
    loop.run_forever()
except:
    pass
finally:
    discovery.cleanup()
    loop.remove_reader(sys.stdin)
    loop.close()Other things worth noting:-  Whilst LifxDiscovery uses UDP broadcast, the bulbs are
   connected with Unicast UDP

- The socket connecting to a bulb is not closed unless the bulb is deemed to have
  gone the way of the Dodo. I've been using that for days with no problem

- You can select to used IPv6 connection to the bulbs by passing an
  IPv6 prefix to LifxDiscovery. It's only been tried with /64 prefix.
  If you want to use a /48 prefix, add ":" (colon) at the end of the
  prefix and pray. (This means 2 colons at the end!)

- I only have Original 1000, so I could not test with other types
  of bulbs

- Unlike in lifxlan, set_waveform takes a dictionary with the right
  keys instead of all those parametersDevelopmentRunning locallyRun this command each time you make changes to the project. It enters at__main__.pypip3install.&&aiolifxThanksThanks to Anders Melchiorsen and Avi Miller for their essential contributions
Package: aiolifxc
AioLifxCAioLifxC is a Python 3/asyncio library to control Lifx LED lightbulbs over your LAN.Most of it was originally taken from theMeghan Clarkk lifxlan packageand adapted to Python 3 (and asyncio obviously)This is a fork fromFrançois Wautier’s package.
It uses coroutines as opposed to callbacks. If you prefer callbacks,
please see his implementation instead. This was forked from version 0.5.0.InstallationWe are on PyPi so:pip3 install aiolifxcor:python3 -m pip install aiolifxcHow to useIn essence, the test program is this:def readin():
"""Reading from stdin and displaying menu"""

    selection = sys.stdin.readline().strip("\n")
    DoSomething()

loop = aio.get_event_loop()
devices = Devices(loop=loop)

loop.add_reader(sys.stdin, readin)

devices.start_discover()

try:
    loop.run_forever()
except Exception as e:
    print("Got exception %s" % e)
finally:
    loop.remove_reader(sys.stdin)
    loop.close()Other things worth noting:Whilst LifxDiscover uses UDP broadcast, the bulbs are
connected with Unicast UDPThe socket connecting to a bulb is not closed unless the bulb is deemed to have
gone the way of the Dodo. I’ve been using that for days with no problemYou can select to used IPv6 connection to the bulbs by passing an
IPv6 prefix to LifxDiscover. It’s only been tried with /64 prefix.
If you want to use a /48 prefix, add “:” (colon) at the end of the
prefix and pray. (This means 2 colons at the end!)I only have Original 1000, so I could not test with other types
of bulbsUnlike in lifxlan, set_waveform takes a dictionary with the right
keys instead of all those parametersHistory1.0.0 (UNRELEASED)ChangedAdd more log messages.Fix display of selected devices in sample app.Simplify API. Merge device classes into light classes.0.5.6 (2017-09-22)ChangedUpdate pip dependancies.Simplify start_discovery function.Update to Beta status.Fix API docs on readthedocs.FixedUpdate MANIFEST.in file.0.5.5 (2017-07-11)ChangedUpdate mypy from 0.511 to 0.520FixedEnsure we act on selected device in sample client.Fix mypy errors.Fix message size calculation.Add configurable grace period for unregister.0.5.4 (2017-07-07)FixedFix failure to re-register a light that went off-line.0.5.3 (2017-07-03)FixedFixed FD resource leak in discovery of existing lights.0.5.2 (2017-07-02)ChangedSignificant changes. Improvements to the API. Type hints, doc strings, etc.0.5.1 (2017-06-26)Initial version after fork fromhttps://github.com/frawau/aiolifx
Package: aiolifx-connection
AIOLIFX ConnectionA wrapper for aiolifx to connect to a single LIFX deviceFree software: BSD licenseDocumentation:https://aiolifx-connection.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.0.0 (2022-07-03)First release on PyPI.
Package: aiolifx-scenes
aiolifx-scenesAn async library with a single input and a single output.If you feed it a LIFX Cloud API Personal Access Token (PAT), it will return all the scenes you that token has access to on the LIFX Cloud.UsageTo generate a personal access token:visithttps://cloud.lifx.comand login using the same login credentials that you use for the LIFX smart phone app.Once logged in, click the arrow next to your email in the top right-hand corner of the "Cloud home" page to reveal the menu.With the menu revealed, click the "Personal access tokens" menu item.On the personal access tokens page, click the big blue "Generate new token" button.Once you have a personal access token, you can install the library:$pipinstallaiolifx-scenesWith the library installed, you can call it from your application:importaiolifx_scenesPAT="personal access token"scenes=awaitaiolifx_scenes.async_get_scenes(token=PAT)Top tip:useaiolifx_scenes.get_scenes()from non-async methods.Sanity checksAn extremely basic command-line tool is provided to enable easier sanity checking of your personal access token and existing LIFX scene information.To use the tool, set theLIFX_API_TOKENenvironment variable, then runlifx-scenes. If human readability is important to you, consider piping the output throughjq.For example:$LIFX_API_TOKEN="your_lifx_api_personal_access_token"lifx-scenes|jq[{'uuid':'031f1116-034f-4d92-a1f3-13420e532706','name':'My Scene','account':{'uuid':'bda95b31-948c-4c34-a330-c5f0c5eeb2a3'},'states':[{"selector":"id:d073d5xxxxxx","power":"off","brightness":0.25,"color":{"hue":0,"saturation":0,"kelvin":3500}},{"selector":"id:d073d5xxxxxx","power":"off","brightness":0.25,"color":{"hue":0,"saturation":0,"kelvin":2500}}],'created_at':1658591387,'updated_at':1679022191}]CreditsThis package was created withCookiecutterand thewaynerv/cookiecutter-pypackageproject template.
Package: aiolifx-themes
aiolifx-themesAsync library that applies color themes to LIFX lightsInstallationInstall this via pip (or your favourite package manager):pip install aiolifx-themesContributors ✨Thanks goes to these wonderful people (emoji key):Stephen Moore💻Avi Miller💻📖🚧This project follows theall-contributorsspecification. Contributions of any kind welcome!CreditsThis package contains code originally authored by@delfickforPhotons.This package was created withCookiecutterand thebrowniebroke/cookiecutter-pypackageproject template.
Package: aioli-guestbook
aioli-guestbook: RESTful HTTP API Package ExampleThe idea with this example is to show how a CRUD-type RESTful HTTP API package can be built with the Aioli Framework.DocumentationCheck out thePackage Documentationfor usage and info about the
HTTP and Service APIs.ExamplesEvery guestbook needs a guesthouse, right?Check out theexample directoryto see howaioli-guestbookcan be incorporated into an example Guesthouse Application.AuthorRobert Wikman <rbw@vault13.org>
Package: aiolimiter
aiolimiterIntroductionAn efficient implementation of a rate limiter for asyncio.This project implements theLeaky bucket algorithm, giving you precise control over the rate a code section can be entered:fromaiolimiterimportAsyncLimiter# allow for 100 concurrent entries within a 30 second windowrate_limit=AsyncLimiter(100,30)asyncdefsome_coroutine():asyncwithrate_limit:# this section is *at most* going to entered 100 times# in a 30 second period.awaitdo_something()It was first developedas an answer on Stack Overflow.Documentationhttps://aiolimiter.readthedocs.ioInstallation$pipinstallaiolimiterThe library requires Python 3.7 or newer.RequirementsPython >= 3.7Licenseaiolimiteris offered under theMIT license.Source codeThe project is hosted onGitHub.Please file an issue in thebug trackerif you have found a bug
or have some suggestions to improve the library.Developer setupThis project usespoetryto manage dependencies, testing and releases. Make sure you have installed that tool, then run the following command to get set up:poetryinstall--withdocs&&poetryrundoitdevsetupApart from usingpoetry run doit devsetup, you can either usepoetry shellto enter a shell environment with a virtualenv set up for you, or usepoetry run ...to run commands within the virtualenv.Tests are run withpytestandtox. Releases are made withpoetry buildandpoetry publish. Code quality is maintained withflake8,blackandmypy, andpre-commitruns quick checks to maintain the standards set.A series ofdoittasks are defined; runpoetry run doit list(ordoit listwithpoetry shellactivated) to list them. The default action is to run a full linting, testing and building run. It is recommended you run this before creating a pull request.
Package: aiolinebot
aiolinebotAioLineBotApi provides asynchronous interface for LINE messaging API✨ Features100% coverage: All endpoints of line-bot-sdk supported!100% compatible: Both async and sync methods for each endpoint provided!Up-to-date immediately: Update automatically when your line-bot-sdk is updated!by dynamic class building: making async api client at the first time you import this package, from the source of line-bot-sdk installed in your environment.🥳 UsageJust create instance of AioLineBotApi instead of LineBotApi. That's all.# line_api = LineBotApi("<YOUR CHANNEL ACCESS TOKEN>")line_api=AioLineBotApi("<YOUR CHANNEL ACCESS TOKEN>")Now you are ready to use both async and sync methods for each endpoint.# asyncloop=asyncio.get_event_loop()loop.run_until_complete(line_api.reply_message_async("<REPLY TOKEN>",TextMessage("Hello!")))# syncline_api.reply_message("<REPLY TOKEN>",TextMessage("Hello!"))Note that when you get binary content by stream, you should close the http response after finished.content=awaitline_api.get_message_content_async("<MESSAGE ID>")asyncforbincontent.iter_content(1024):do_something(b)awaitcontent.response.close()📦 Installation$ pip install aiolinebot⚙ Dependenciesaiohttpline-bot-sdkContributionAll kinds of contributions are welcomed🙇‍♀️🙇‍♀️🙇‍♀️Especially we need tests. Because of async we can't useresponsesthat is used in the tests for line-bot-sdk. So at first we have to find out the way of testing...If you have any ideas about testing post issue please🙏🙏🥘 ExampleThis is the echobot on Azure Functions.importloggingimportazure.functionsasfuncfromlinebotimportWebhookParserfromlinebot.modelsimportTextMessagefromaiolinebotimportAioLineBotApiasyncdefmain(req:func.HttpRequest)->func.HttpResponse:# create api clientline_api=AioLineBotApi(channel_access_token="<YOUR CHANNEL ACCESS TOKEN>")# get events from requestparser=WebhookParser(channel_secret="<YOUR CHANNEL SECRET>")events=parser.parse(req.get_body().decode("utf-8"),req.headers.get("X-Line-Signature",""))forevinevents:# reply echoawaitline_api.reply_message(ev.reply_token,TextMessage(text=f"You said:{ev.message.text}"))# 200 responsereturnfunc.HttpResponse("ok")
Package: aiolip
Async Lutron Integration ProtocolAsync Lutron Integration ProtocolFree software: Apache Software License 2.0Documentation:https://aiolip.readthedocs.io.Example UsageimportasyncioimportloggingfromaiolipimportLIPfromaiolip.dataimportLIPMode_LOGGER=logging.getLogger(__name__)asyncdefmain():lip=LIP()logging.basicConfig(level=logging.DEBUG)awaitlip.async_connect("192.168.209.70")defmessage(msg):_LOGGER.warning(msg)lip.subscribe(message)run_task=asyncio.create_task(lip.async_run())awaitrun_taskawaitlip.async_stop()if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(main())CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.0.0 (2021-01-18)First release on PyPI.
Package: aioli-sphinx-theme
Alabaster is a visually (c)lean, responsive, configurable theme for theSphinxdocumentation system. It is Python 2+3 compatible.It began as a third-party theme, and is still maintained separately, but as of
Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected
as the default theme.Live examples of this theme can be seen onthis project’s own website,paramiko.org,fabfile.organdpyinvoke.org.For more documentation, please seehttp://alabaster.readthedocs.io.NoteYou can install the development version viapip install-egit+https://github.com/bitprophet/alabaster/#egg=alabaster.
Package: aio-live-task-traces
aio-live-tasks-exceptionsTrace python asyncio tasks exceptions live!InstallationInstall the last released version usingpip:python3-mpipinstall-Uaio-live-task-tracesOr install the latest version from sources:gitclonegit@github.com:matan1008/aio-live-task-traces.gitcdaio-live-task-traces
python3-mpipinstall-U-e.UsageUsually, if you run a task that throws exception using asyncio you will not be aware
of the exception until the task is awaited or deleted. For example:importasyncioasyncdeffaulty_task():raiseException('foo')asyncdefmain():task=asyncio.create_task(faulty_task())awaitasyncio.sleep(3600)awaittaskif__name__=='__main__':# The exception will be printed after 3600 secondsasyncio.run(main())This package, will wrap each task you run so the exception will be traced
the moment it raises:importasynciofromaio_live_task_tracesimportset_live_task_tracesasyncdeffaulty_task():raiseException('foo')asyncdefmain():set_live_task_traces(True)task=asyncio.create_task(faulty_task())awaitasyncio.sleep(3600)awaittaskif__name__=='__main__':# The exception will be printed both immediately and after 3600 secondsasyncio.run(main())
Package: aiolo
aioloasyncio-friendly Python bindings forliblo, an implementation of the Open Sound Control (OSC) protocol for POSIX systems.InstallationInstall liblo:OS X:brew install libloUbuntu:apt-get install liblo7 liblo-devThen:pipinstallaioloExamplesOne of the many beautiful things in Python is support for operator overloading. aiolo embraces this enthusiastically to offer the would-be OSC hacker an intuitive programming experience for objects such asMessage,Bundle,Route, andSub.Simple echo serverimportasynciofromaioloimportAddress,Midi,Serverasyncdefmain():server=Server(port=12001)server.start()# Create endpoints# /foo accepts an int, a float, and a MIDI packetfoo=server.route('/foo',[int,float,Midi])ex=server.route('/exit')address=Address(port=12001)foriinrange(5):address.send(foo,i,float(i),Midi(i,i,i,i))# Notify subscriptions to exit in 1 secaddress.delay(1,ex)# Subscribe to messages for any of the routessubs=foo.sub()|ex.sub()asyncforroute,datainsubs:print(f'echo_server:{str(route.path)}received{data}')ifroute==ex:awaitsubs.unsub()server.stop()if__name__=='__main__':asyncio.get_event_loop().run_until_complete(main())MultiCastimportasyncioimportrandomfromaioloimportMultiCast,MultiCastAddress,Route,Serverasyncdefmain():# Create endpoints for receiving datafoo=Route('/foo',str)ex=Route('/exit')# Create a multicast groupmulticast=MultiCast('224.0.1.1',port=15432)# Create a cluster of servers in the same multicast groupcluster=[]foriinrange(10):server=Server(multicast=multicast)# Have them all handle the same routeserver.route(foo)server.route(ex)server.start()cluster.append(server)address=MultiCastAddress(server=random.choice(cluster))# Send a single message from any one server to the entire cluster.# The message will be received by each server.address.send(foo,'hello cluster')# Notify subscriptions to exit in 1 secaddress.delay(1,ex)# Listen for incoming strings at /foo on any server in the clustersubs=foo.sub()|ex.sub()asyncforroute,datainsubs:print(f'{route}got data:{data}')ifroute==ex:awaitsubs.unsub()forserverincluster:server.stop()if__name__=='__main__':asyncio.get_event_loop().run_until_complete(main())For additional usage see theexamplesandtests.Supported platformsTravis CI tests with the following configurations:Ubuntu 18.04 Bionic Beaver + liblo 0.29 + [CPython3.6, CPython3.7, CPython3.8, PyPy7.3.0 (3.6.9)]OS X + liblo 0.29 + [CPython3.6, CPython3.7, CPython3.8, PyPy7.3.0 (3.6.9)]ContributingPull requests are welcome, please file any issues you encounter.Changelog4.1.1 (2020-07-22)Prevent egg installation errors by passing zip_safe=False4.1.0Rectify some__hash__issues.4.0.0Use Python-based OSC address pattern matching rather than liblo's, supports escaped special charactersEnsure ThreadedServer.start() waits for thread to be initializedFix bug where subscribers might not receive pending dataFix bug where loop.remove_reader() was not being called on AioServer.stop()