Saravanan666/pypi-org huggingface dataset:
Package: trio-run-in-process
Triorun_in_processTrio based API for running code in a separate processRead more in thedocumentation on ReadTheDocs.View the change log.Quickstartpipinstalltrio-run-in-processDeveloper SetupIf you would like to hack on trio-run-in-process, please check out theSnake Charmers
Tactical Manualfor information on how we do:TestingPull RequestsCode StyleDocumentationDevelopment Environment SetupYou can set up your dev environment with:gitclonegit@github.com:ethereum/trio-run-in-process.gitcdtrio-run-in-process
virtualenv-ppython3venv
.venv/bin/activate
pipinstall-e.[dev]Testing SetupDuring development, you might like to have tests run on every file save.Show flake8 errors on file change:# Test flake8when-changed-v-s-r-1trio_run_in_process/tests/-c"clear; flake8 trio_run_in_process tests && echo 'flake8 success' || echo 'error'"Run multi-process tests in one command, but without color:# in the project root:pytest--numprocesses=4--looponfail--maxfail=1# the same thing, succinctly:pytest-n4-f--maxfail=1Run in one thread, with color and desktop notifications:cdvenv
ptw--onfail"notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on trio-run-in-process failed'"../tests../trio_run_in_processRelease setupFor Debian-like systems:apt install pandocTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable (stagecan be alpha or beta).To issue the next version in line, specify which part to bump,
likemake release bump=minorormake release bump=devnum. This is typically done from the
master branch, except when releasing a beta (in which case the beta is released from master,
and the previous stable branch is released from said branch). To include changes made with each
release, update "docs/releases.rst" with the changes, and apply commit directly to master
before release.If you are in a beta version,make release bump=stagewill switch to a stable.To issue an unstable version when the current version is stable, specify the
new version explicitly, likemake release bump="--new-version 4.0.0-alpha.1 devnum"
Package: trio-scgi
This library implements the SCGI protocol (https://www.python.ca/scgi/protocol.txt).
It bases on Trio (https://trio.readthedocs.io/).SCGI is a very simple and lowlevel way to interface with HTTP servers to implement web application servers.In a typical setup, multiple web servers accept HTTP requests from clients and proxy those requests through
SCGI to multiple SCGI application servers.Seeexample/echofor a demo SCGI server.
Package: trio_serf
trio-serf is an async Python interface to Serf, the decentralised solution
for service discovery and orchestration.It usestrio <https://github.com/python-trio/trio>as its underlying
async framework. Previous versions used theanyio
<https://github.com/agronholm/anyio>wrapper, thus worked withasyncio,trio, andcurio, but this has been discontinued because of issues
with error handling.Installationtrio-serf requires a running Serf agent. SeeSerf’s agent documentationfor instructions.To install trio-serf, run the following command:$pipinstalltrio-serfor alternatively (you really should be using pip though):$easy_installtrio-serfor from source:$pythonsetup.pyinstallGetting StartedThese examples require a running async loop.Trio <https://github.com/python-trio/trio>is recommended, thoughasyncioworks too.fromtrio_serfimportserf_clientasyncwithserf_client()asclient:awaitclient.event('foo','bar')Stream usage:fromtrio_serfimportserf_clientasyncwithserf_client()asclient:asyncwithclient.stream('*')asstream:asyncforrespinstream:print(resp)DevelopmentYou can run the tests using the following commands:$serfagent--tagfoo=bar&# start serf agent$python3-mpytesttests
Package: trio-serial-windows
trio-serial-windowsImplements a serial port with aTrioStreaminterface on Windows.
Seetrio-serialfor the equivalent functionality on Linux and MacOS.Example usage (assuming a looped back serial connection):importtrioimporttrio_serial_windowsasyncdefmain():asyncwithtrio_serial_windows.SerialStream("COM5",baudrate=115200)asport:awaitport.send_all(b"Hello, World!")awaittrio.sleep(0.2)print(awaitport.receive_some())trio.run(main)
Package: trio-socks
trio-sockstrio-socks provides a trio.abc.HalfCloseableStream that routes its traffic through a SOCKS proxy serverExampleimporttriofromtrio_socksimportsocks5asyncdefparse_public_ip(stream):awaitstream.send_all('GET / HTTP/1.1\r\nHost: api.ipify.org\r\n\r\n'.encode())text=(awaitstream.receive_some()).decode()i=text.rfind('\r\n\r\n')my_ip=text[i+4:]print(f'{my_ip=}')asyncdefprint_public_ip():asyncwithsocks5.Socks5Stream(destination=('api.ipify.org',80),proxy=('10.179.205.114',1664))asstream:awaitparse_public_ip(stream)asyncwithawaittrio.open_tcp_stream('api.ipify.org',80)asstream:awaitparse_public_ip(stream)trio.run(print_public_ip)
Package: triotp
Seedocumentationfor more informations.IntroductionThis project is a simplified implementation of theErlang/ElixirOTPframework.It is built on top of theTrioasync library and provides:applications:the root of a supervision treesupervisors:automatic restart of children tasksmailboxes:message-passing between tasksgen_servers:generic server taskWhy ?Since I started writing Erlang/Elixir code, I’ve always wanted to use its
concepts in other languages.I made this library for fun and most importantly: to see if it was possible.
As it turns out, it is!
Package: trio-util
An assortment of utilities for the Trio async/await framework, including:wait_any, wait_all, move_on_when - avoid nursery blocks for simple casesAsyncBool, AsyncValue - value wrappers with the ability to wait for
a specific value or transitionperiodic - periodic loop which accounts for its own execution
time@trio_async_generator - decorator which adapts a generator containing
Trio constructs for safe useazip, azip_longest - async zip with parallel iterationRepeatedEvent - if you really, really want to reuse an eventand more (... obscure stuff you probably don't need)!
Package: trio-vis
trio-vistrio-visis a plugin for visualizing the scope history of your Trio project.How to useInstalltrio-visviapip install trio-vis(trio-vis-pip)In your source code, registerSC_Monitor()as an Instrument while runningtriofromtrio_visimportSC_Monitortrio.run(my_main_funciton,instruments=[SC_Monitor()])After your program finished(or exited), the scope history would be stored in./sc-logs.jsonUpload your log file tosc-visualizer, this is a twin project which focuses on visualization work.See your visualization result and help us improve.ConfigurationImportVisConfigfromtrio_vis, and provide it as an argument while making yourSC_Monitorobject.fromtrio_visimportSC_Monitor,VisConfigcfg=VisConfig(print_task_tree=True)trio.run(my_main_funciton,instruments=[SC_Monitor(config=cfg)])What does it dotrio-visutilize theInstrument APIto monitor the lifetime of scopes (Task,Nursery).
Since theInstrument APIdoesn't provide callbacks forNursery, we make inferences on our own.Why visualizeDerived fromcurio,triocombines the idea of Structured Concurrency with existing single-threaded event-driven architecture. Which does make concurrent programs more manageable.To make trio comparable with curio, contributors of trio also want to mimic the feature ofcurio-monitorto monitor the current system running state. This idea could be traced back totrio-issue-413.Since then, projects have been developed (shown below).However,trio is not curio, at least lifetimes of scopes are structured by nature. I argue that by utilizing the feature of Structured Concurrency, we could visualize programs better.
Developers could easily conceptualize their program, and bring their developing experience to the next level.Previous workpython-trio/trio-monitor: officail project developed under trio, however it use the old InstruementAPIsyncrypt/trio-inspector: is a webmonitor to visualize the current state of the programTronic/trio-web-monitor: a experiment to unified all previous work, developed byTronicoremanj/trio-monitorFuture planThis project is in an early developing stage. Stay tuned for future update.
Package: trio-websocket
Trio WebSocketThis library implements both server and client aspects of thethe WebSocket
protocol, striving for safety,
correctness, and ergonomics. It is based on thewsproto
project, which is aSans-IOstate machine that implements the
majority of the WebSocket protocol, including framing, codecs, and events. This
library handles I/O usingthe Trio
framework. This library passes theAutobahn Test Suite.This README contains a brief introduction to the project. Full documentationis
available here.AlternativesIf you happen to only need a server, using Quart via thequart-trioextension may suffice.  While trio-websocket is more flexible, Quart covers
both HTTP and WebSocket within a single framework, and serving both from the
same port is straightforward.  There has yet to be a performance comparison.InstallationThis library requires Python 3.7 or greater. To install from PyPI:pip install trio-websocketClient ExampleThis example demonstrates how to open a WebSocket URL:importtriofromsysimportstderrfromtrio_websocketimportopen_websocket_urlasyncdefmain():try:asyncwithopen_websocket_url('wss://echo.websocket.org')asws:awaitws.send_message('hello world!')message=awaitws.get_message()print('Received message:%s'%message)exceptOSErrorasose:print('Connection attempt failed:%s'%ose,file=stderr)trio.run(main)The WebSocket context manager connects automatically before entering the block
and disconnects automatically before exiting the block. The full API offers a
lot of flexibility and additional options.Server ExampleA WebSocket server requires a bind address, a port, and a coroutine to handle
incoming connections. This example demonstrates an "echo server" that replies to
each incoming message with an identical outgoing message.importtriofromtrio_websocketimportserve_websocket,ConnectionClosedasyncdefecho_server(request):ws=awaitrequest.accept()whileTrue:try:message=awaitws.get_message()awaitws.send_message(message)exceptConnectionClosed:breakasyncdefmain():awaitserve_websocket(echo_server,'127.0.0.1',8000,ssl_context=None)trio.run(main)The server's handlerecho_server(…)receives a connection request object.
This object can be used to inspect the client's request and modify the
handshake, then it can be exchanged for an actual WebSocket objectws.
Again, the full API offers a lot of flexibility and additional options.
Package: trio-websockets
What istrio-websockets?trio-websocketsis a library for building WebSocketserversandclientsin
Python, based ontrio, an asynchronous I/O framework.Currently a work in progress. The status is:The client-side works.The server-side does not.History of the libraryThe code is originally forked from aaugustin’swebsocketslibrary for asyncio,
with the following changes:Rip out all asyncio things, replace with trio.Rip out the websocket protocol code, replace with wsproto.What remains of the original websockets library itself?Most of the remaining code seems to be additional error checking around connection
state. Rather than a “trio.BrokenStreamError”, you will receive a ConnectionClosed
exception when trying to write on a closed connection.The same/very similar interface to websockets, which might be slightly more
user-friendly than a raw wsproto connection (say, exposing attributes like .subprotocol,
which wsproto passes along during the ConnectionEstablished event).TODOPort the server-side.Make the examples run.Make the tests run.Support for curio.Cleanup documentation and readme.Experiment with a different architecture, using reader/writer tasks.How to use itHere’s a client that says “Hello world!”:#!/usr/bin/env pythonimporttrioimporttrio_websocketsasyncdefhello(uri):asyncwithtrio_websockets.connect(uri)aswebsocket:awaitwebsocket.send("Hello world!")trio.run(hello,'ws://localhost:8765')And here’s an echo server (for Python ≥ 3.6):#!/usr/bin/env pythonimporttrioimporttrio_websocketsasyncdefecho(websocket,path):asyncformessageinwebsocket:awaitwebsocket.send(message)trio.run(trio_websockets.serve,echo,'localhost',8765)Does that look good?Start here.What else?Bug reports, patches and suggestions welcome! Just open anissueor send apull request.trio-websocketsis released under theBSD license.
Package: trioyoyo
Trioyoyo
A port of oyoyo to trio for Python 3.5+Uses trio instead of its original threading client. Creating an IRCClient instance will create the protocol instance.
To start the connection await IRCClient.connect();Uses oyoyo from [illuminatedWax](https://github.com/illuminatedwax)’sPesterchum, slightly modified
oyoyo is an IRC library for Python, this project makes it completely asynchronous, with event callbacks
Package: trip
TRIP, Tornado & Requests In Pair, an async HTTP library for Python.Simple as Requests, Trip let you get rid of annoying network blocking.Coroutine in python 2.7+ can be this simple:importtripdefmain():r=yieldtrip.get('https://httpbin.org/get',auth=('user','pass'))print(r.content)trip.run(main)With Trip, you may finishone hundred requests in one piece of time.Trip gets its name from two powerful site packages and aims to combine them together.
Trip refers to ‘Tornado & Requests In Pair’, TRIP.
To put them together, I reused much of their codes about structure and dealing.
Actually I only made little effort to make a mixture. Thanks toTornadoandRequests.Through using Trip, you may take full advantage of Requests, including:
Sessions with Cookie persistence, browser-style SSL verification, automatic content decoding,
basic/digest authentication, elegant key/value Cookies.
Meanwhile, your requests are coroutine like using AsyncHTTPClient of Tornado, network blocking will
not be a problem.Found difficult optimizing spiders’ time consuming?
Found tricky using asyncio http packages?
Found heavy custimizing big spider framework?
Try Trip, you will not regret!InstallationPaste it into your console and enjoy:$python-mpipinstalltripDocumentsDocuments are here:http://trip.readthedocs.io/Advanced usageSome of the advaced features are listed here:Using async and await in python 3:importtripasyncdefmain():r=awaittrip.get('https://httpbin.org/get',auth=('user','pass'))print(r.content)trip.run(main)Sessions with Cookie persistenceimporttripdefmain():s=trip.Session()r=yields.get('https://httpbin.org/cookies/set',params={'name':'value'},allow_redirects=False)r=yields.get('https://httpbin.org/cookies')print(r.content)trip.run(main)Event hooksimporttripdefmain():defprint_url(r,*args,**kwargs):print(r.url)defrecord_hook(r,*args,**kwargs):r.hook_called=Truereturnrurl='http://httpbin.org/get'r=yieldtrip.get('http://httpbin.org',hooks={'response':[print_url,record_hook]})print(r.hook_called)trip.run(main)Timeoutsimporttripdefmain():r=yieldtrip.get('http://github.com',timeout=0.001)print(r)trip.run(main)Proxyimporttripproxies={'http':'127.0.0.1:8080','https':'127.0.0.1:8081',}defmain():r=yieldtrip.get('https://httpbin.org/get',proxies=proxies)print(r.content)trip.run(main)How to contributeYou may open an issue to share your ideas with me.Or fork thisprojectand do it your own onmasterbranch.Please write demo codes of bugs or new features. You know, codes help.Finally if you finish your work and make a pull request, I will merge it in time after essential tests.
Package: tripadvisorapi
Tripadvisor Content APIThis is a simple python wrapper for theTripadvisor Content API.Content APILocation DetailsA Location Details request returns comprehensive information about a location (hotel, restaurant, or an attraction) such as name, address, rating, and URLs for the listing on Tripadvisor.Location PhotosThe Location Photos request returns up to 5 high-quality photos for a specific location. The photos are ordered by recency.Location ReviewsThe Location Reviews request returns up to 5 of the most recent reviews for a specific location.Location SearchThe Location Search request returns up to 10 locations found by the given search query. You can use category ("hotels", "attractions", "restaurants", "geos"), phone number, address, and latitude/longtitude to search with more accuracy.Nearby Location SearchThe Nearby Location Search request returns up to 10 locations found near the given latitude/longtitude.Example CodeCreating new APIfromtripadvisorapiimportTripadvisorApi# Initialize API with your API keykey="YOUR_KEY"api=TripadvisorApi(key)Location Searchapi=TripadvisorApi(key)res=api.location_search("Los Angeles")res_json=json.loads(res.text)print(res_json)MIT LicenseCopyright (c) 2023 Alexander SchnablPermission 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: tripay
tripayTripay Client For Python (UNOFFICIAL)Support:Sandbox & Production ModeGet Payment InstructionFee CalculatorGet Payment ChannelsClosed PaymentHelper to make order itemsAutomatic signature generationRequest paymentDetail transactionList transactionOpen PaymentAutomatic signature generationRequest paymentDetail transactionList transactionEasy to useUsageInstallation:pip install tripaySetup client:fromtripayimportTriPaytripay=TriPay(api_key="DEV-xxx",merchant_code="xxx",merchant_private_key="xxx",debug=True# sandbox mode)Get Payment Instruction:tripay.get_payment_instruction("BRIVA").json()Fee Calculator:tripay.fee_calculator(5000).json()Get Payment Channels:tripay.get_payment_channel().json()Closed Payment:# access to closed paymentscp=tripay.closed_payment# creating itemsitems=[]items.append(cp.create_item(sku="099999888",name="sabun",price=2500,quantity=10))# request paymentresp=cp.request("BRIVA",2500*10,customer_name="Dadang",customer_email="someone@test.com",customer_phone="0899988234",order_items=items).json()print(resp)Open Payment:# notes: for open payments currently does not support sandbox modetripay.debug=False# access to open paymentsop=tripay.open_payment# request paymentresp=op.request("BCAVA").json()print(resp)
Package: tripcode
This module provides a function to calculate tripcodes:>>> from tripcode import tripcode
>>> tripcode('tea')
'WokonZwxw2'
>>> tripcode(u'ｋａｍｉ')
'yGAhoNiShI'It’s notable only in that it also provides a (slow) pure-Pythoncrypt(3)implementation, which it uses as a fall-back on platforms that don’t have
one of their own (e.g. Windows):>>> from tripcode import _crypt
>>> _crypt('encrapt', 'xy')
'xyk2vcIZuU2vU'
Package: tripcode3
This module provides a function to calculate tripcodes:pipinstall-Utripcode3>>>fromtripcodeimporttripcode>>>tripcode('tea')'WokonZwxw2'>>>tripcode(u'ｋａｍｉ')'yGAhoNiShI'It doesn't usecrypt(3)implementation, but require crossplatformpasslibInspired  byhttps://pypi.org/project/tripcode/
Package: tripleo-ansible
Team and repository tagsTripleO AnsibleTripleO Ansible project repository. Contains Ansible playbooks, roles, and
plugins for use with TripleO.Documentation for the project can be found at:https://docs.openstack.org/tripleo-ansible/latest/Release notes for the project can be found at:https://docs.openstack.org/releasenotes/tripleo-ansible/The project source code repository is located at:https://opendev.org/openstack/tripleo-ansible/The project home is at:https://launchpad.net/tripleoThe project bug tracker is located at:https://bugs.launchpad.net/tripleo
Package: tripleo-common
Team and repository tagstripleo-commonA common library for TripleO workflows.Free software: Apache licenseDocumentation:https://docs.openstack.org/tripleo-common/latest/Source:http://opendev.org/openstack/tripleo-commonBugs:https://bugs.launchpad.net/tripleo-commonRelease notes:https://docs.openstack.org/releasenotes/tripleo-common
Package: tripleo-heat-templates
Team and repository tagstripleo-heat-templatesHeat templates to deploy OpenStack using OpenStack.Free software: Apache License (2.0)Documentation:https://docs.openstack.org/tripleo-docs/latest/Source:https://opendev.org/openstack/tripleo-heat-templatesBugs:https://bugs.launchpad.net/tripleoRelease notes:https://docs.openstack.org/releasenotes/tripleo-heat-templates/FeaturesThe ability to deploy a multi-node, role based OpenStack deployment using
OpenStack Heat. Notable features include:Choice of deployment/configuration tooling: puppet, (soon) dockerRole based deployment: roles for the controller, compute, ceph, swift,
and cinder storagephysical network configuration: support for isolated networks, bonding,
and standard ctlplane networkingDirectoriesA description of the directory layout in TripleO Heat Templates.environments: contains heat environment files that can be used with -eon the command like to enable features, etc.extraconfig: templates used to enable ‘extra’ functionality. Includesfunctionality for distro specific registration and upgrades.firstboot: example first_boot scripts that can be used when initiallycreating instances.network: heat templates to help create isolated networks and portspuppet: templates mostly driven by configuration with puppet. To use thesetemplates you can use the overcloud-resource-registry-puppet.yaml.validation-scripts: validation scripts useful to all deploymentconfigurationsroles: example roles that can be used with the tripleoclient to generatea roles_data.yaml for a deployment See theroles/README.rstfor additional details.Service testing matrixThe configuration for the CI scenarios will be defined intripleo-heat-templates/ci/and should be executed according to the following table:scn000scn001scn002scn003scn004scn006scn007scn009scn010scn013non-haovh-hakeystoneXXXXXXXXXXXglancerbdswiftfilergwfilefilerbdfilefilefilecinderrbdiscsiheatXXironicXmysqlXXXXXXXXXXXneutronovnovnovnovnovnovsovnovnovnovnneutron-bgpvpnwipneutron-l2gwwipom-rpcrabbitrabbitamqp1rabbitrabbitrabbitrabbitrabbitrabbitrabbitom-notifyrabbitrabbitrabbitrabbitrabbitrabbitrabbitrabbitrabbitrabbitredisXXhaproxyXXXXXXXXXXmemcachedXXXXXXXXXXpacemakerXXXXXXXXXXnovaqemuqemuqemuqemuironicqemuqemuqemuqemuqemuplacementXXXXXXXXXXntpXXXXXXXXXXXXsnmpXXXXXXXXXXXXtimezoneXXXXXXXXXXXXswiftXaodhXXceilometerXXgnocchirbdswiftbarbicanXcephrgwXcephmdsXmanilaXcollectdXdesignateXoctaviaXXExtra FirewallX
Package: tripleo-ipa
This repository contains Ansible for use integrating TripleO with FreeIPA.Installation$pipinstall--prefix=/usrtripleo-ipaOr, if you are installing from source, in the project directory:$pythonsetup.pyinstall--prefix=/usrContributingYou can create an environment to develop locally using the following.$python3.7-mvirtualenv--system-site-packages.venv$.venv/bin/pip3install-rmolecule-requirements.txt