Saravanan666/pypi-org huggingface dataset:
Package: wait-for-dep
wait-for-depWaits for a dependency before continuing. It's ment to be used in startup scripts like Docker's entrypoint.Installingpip install wait-for-depUsagewait-for-dep dependency-url-1 dependency-url-2 ... dependency-url-nie:wait-for-dep https://my-server/healthz/ psql://user@db-host/db-nameAvailable checksHTTP(s)HTTP and HTTPS are available by default. Follows redirects; only response with HTTP code 2XX is accepted as valid.Accepted URL schemashttp://https://Examplewait-for-dep https://my-server/healthz/ http://my-server/healthz/PostgreSQLRDBMS has to accept connection and allow to perform simple SELECT query.Installationpip install wait-for-dep[postgres]Accepted URL schemaspostgres://postgresql://psql://Examplewait-for-dep psql://admin:password@db-host/db_nameMySQLRDBMS has to accept connection and allow to perform simple SELECT query.Installationpip install wait-for-dep[mysql]Accepted URL schemasmysql://Examplewait-for-dep mysql://admin:password@db-host/db_nameRedisRdis has to accept connection to selected database (defaults to 0).Installationpip install wait-for-dep[redis]Accepted URL schemasredis://Examplewait-for-dep redis://redis-host/5MemcachedMemcached has to accept connection.Installationpip install wait-for-dep[memcached]Accepted URL schemasmemcached://Examplewait-for-dep memcached://memcached-host/MongoDBMongoDB has to accept connection.Installationpip install wait-for-dep[mongodb]Accepted URL schemasmongodb://Examplewait-for-dep mongodb://admin:password@db-host/db_nameRabbitMQRabbitMQ has to accept connection to given vhost. You can use optional querystring paramsrequire_queueandrequire_exchangeto additionaly check if particular queue or exchange exists (check will fail otherwise).Installationpip install wait-for-dep[amqp]Accepted URL schemasamqp://Examplewait-for-dep amqp://admin:password@rabbit-host/vhost
wait-for-dep amqp://admin:password@rabbit-host/vhost?require_queue=myqueue
wait-for-dep amqp://admin:password@rabbit-host/vhost?require_exchange=myexchange
wait-for-dep amqp://admin:password@rabbit-host/vhost?require_exchange=myexchange&require_exchange=mysecondexchange&require_queue=myqueue&require_queue=mysecondqueueApache KafkaKafka has to accept connection. In HA mode (node count > 1) only one node is required to accept the connection.Installationpip install wait-for-dep[kafka]Accepted URL schemaskafka://Examplewait-for-dep kafka://kafka-host/
wait-for-dep kafka://kafka-first-host/,kafka://kafka-second-host/TCPPlain TCP is available by default. Service port is required.Accepted URL schemastcp://Examplewait-for-dep tcp://my-server:7624UnixUnix sockets are available by default.Accepted URL schemasunix://Examplewait-for-dep unix:///var/run/docker.sock
Package: wait-for-it
wait-for-itWait for service(s) to be available before executing a command.wait-for-itis a script that will wait on the availability of one or more TCP services (i.e.host:port) before executing a user-defined command.
It is useful for synchronizing the spin-up of interdependent services, such as linked docker containers.Sincev2.0.0,wait-for-itwill return the exit code of the executed command(s).Check out the wait-for-it docsInstallation$pipinstallwait-for-itDemoUsageUsage: wait-for-it [OPTIONS] [COMMANDS]...

  Wait for service(s) to be available before executing a command.

Options:
  -h, --help               Show this message and exit.
  -v, --version            Show the version and exit.
  -q, --quiet              Do not output any status messages
  -p, --parallel           Test services in parallel rather than in serial
  -t, --timeout seconds    Timeout in seconds, 0 for no timeout  [default: 15]
  -s, --service host:port  Services to test, in one of the formats: ':port',
                           'hostname:port', 'v4addr:port', '[v6addr]:port' or
                           'https://...'ExamplesTest to see if we can access port 80 onwww.google.com, and if it is available, echo the messagegoogle is up:$wait-for-it\--servicewww.google.com:80\--echo"google is up"[*] Waiting 15 seconds for www.google.com:80
[+] www.google.com:80 is available after 0 seconds
google is upYou can set your own timeout with the-tor--timeoutoption. Setting the timeout value to0will disable the timeout:$wait-for-it\--servicewww.google.com:80\--timeout0\--echo"google is up"[*] Waiting for www.google.com:80 without a timeout
[+] www.google.com:80 is available after 0 seconds
google is upMultiple services can be tested by adding additional-sor--serviceoptions:$wait-for-it\--servicewww.google.com:80\--servicewww.bing.com:80\--servicewww.duckduckgo.com:80\--echo"google, bing, and duckduckgo are up"[*] Waiting 15 seconds for www.google.com:80
[+] www.google.com:80 is available after 0 seconds
[*] Waiting 15 seconds for www.bing.com:80
[+] www.bing.com:80 is available after 0 seconds
[*] Waiting 15 seconds for www.duckduckgo.com:80
[+] www.duckduckgo.com:80 is available after 0 seconds
google, bing, and duckduckgo are upBy adding the-por--paralleloption,wait-for-itcan do the same in parallel rather than serial:$wait-for-it\--parallel\--servicewww.google.com:80\--servicewww.bing.com:80\--servicewww.duckduckgo.com:80\--echo"google, bing, and duckduckgo are up"[*] Waiting 15 seconds for www.bing.com:80
[*] Waiting 15 seconds for www.duckduckgo.com:80
[*] Waiting 15 seconds for www.google.com:80
[+] www.bing.com:80 is available after 0 seconds
[+] www.duckduckgo.com:80 is available after 0 seconds
[+] www.google.com:80 is available after 0 seconds
google, bing, and duckduckgo are upStatus message output can be suppressed with the-qor--quietoption:$wait-for-it\--quiet\--servicewww.google.com:80\--echo"google is up"google is upRelatedvishnubob/wait-for-itLicenseMIT ©Travis Clarke,Sebastian Pipping
Package: wait-for-it-to
waitforitWhatBadgesCode and Test QualitySonarQubePyPIThis is a library for letting your python code wait for a certain action to completeshort exampleGiven these functionsimportwait_for_it_todeffoo():returnTruedefbar(param):x=paramreturnFalseThis would immediatly return>>wait_for_it_to.be_true(foo)>>You can also pass parameters as a list>>wait_for_it_to.be_true(bar,args=[1])Traceback(mostrecentcalllast):File"<stdin>",line1,in<module>File"..\wait_for_it\wait_for_it_to\__init__.py",line27,inbe_trueraiseTimeoutError(msg)TimeoutError:expectedsomethingthatevaluatestoTrue,butgotFalseinsteadYou can also pass a timeout value in seconds>>wait_for_it_to.be_true(foo,timeout=5)Quite similar you have the functionality>>wait_for_it_to.be_false(bar,timeout=5,args[1])>>wait_for_it_to.equal(bar,False,timeout=5,args[1])>>wait_for_it_to.not_raise_an_exception(bar,timeout=5,RuntimeError)Version Historyhttps://github.com/studioj/wait_for_it/releases
Package: wait-for-message
wait-for-messageA simple client server utility that blocks until a message is received on a TCP/IP socket connection; useful for synchronizing interdependent networked jobs.Installationpipinstallwait-for-messagew4mUsageusage:w4m[-h]{send,wait}...

AsimpleclientserverutilitythatblocksuntilamessageisreceivedonaTCP/IPsocketconnection

positionalarguments:{send,wait}sendsendmessagetotcp/ipconnectionuntilacknowledgedormaximumattemptswaitwaitformessageontcp/ipconnectionuntilreceivedortimeout

optionalarguments:-h,--helpshowthishelpmessageandexitw4m sendsend message to tcp/ip connection until acknowledged or maximum attemptsusage:w4msend[-h]--ip-addressIP_ADDRESS--port-numberPORT_NUMBER--messageMESSAGE_TO_SEND[--delayDELAY][--attemptsMAX_ATTEMPTS]optionalarguments:-h,--helpshowthishelpmessageandexit--ip-addressIP_ADDRESStheipaddressoftheserver--port-numberPORT_NUMBERtheportnumbertheserverislisteningon--messageMESSAGE_TO_SENDthemessagetosend--delayDELAYnumberofsecondstodelaybetweenretries;default10--attemptsMAX_ATTEMPTSmaximumretryattempts;default6w4m waitwait for message on tcp/ip connection until received or timeout - if message received and if it contains a body print it to stdoutusage:w4mwait[-h][--ip-addressIP_ADDRESS]--port-numberPORT_NUMBER--messageMESSAGE_TO_WAIT_FOR[--timeoutTIMEOUT]optionalarguments:-h,--helpshowthishelpmessageandexit--ip-addressIP_ADDRESStheipaddresstobindto;default0.0.0.0--port-numberPORT_NUMBERtheportnumbertolistenon--messageMESSAGE_TO_WAIT_FORthemessagetowaitfor--timeoutTIMEOUTnumberofsecondstowaitformessage;default900(i.e.15minutes)ExamplewaitOn a Linux machine, start tcp/ip socket listening on port 8080 and wait for message. Note the script blocks until the expected message is received. If the message is not received a timeout error will be thrown. If the message received contains a body it is printed to stdout.w4mwait--port-number8080--message"ready to proceed"sendOn an other machine (this example we used a Windows machine), connect tcip/ip socket to the ip:port for the server and send several messages. Send will resend message until an acknowledgement is received. If no acknowledgement is received after max attempts a MaxAttemptsError is thrown.w4msend--ip-address192.168.1.199--port-number8080--message"a message"w4msend--ip-address192.168.1.199--port-number8080--message"another message"w4msend--ip-address192.168.1.199--port-number8080--message"ready to proceed:message body"DevelopmentBuild the Docker image:dockerimagebuild\-tw4m:latest.Run the Docker container:dockercontainerrun\--rm\-it\-v$PWD:/code\-p:8080:8080\w4m:latest\bash
Package: waitfornet
waitfornetA stupid simple python module to check whether you are online or notSynopsiswaitfornetis a stupid simple script, all it does is check whether you are online or not, and optionally wait until you go online.On production servers, you don't need such a script because you are always online. But on home PCs or laptops, we plebeians aren't always online! We sometimes have to fiddle with our WiFi connections, we may have a wireless router but we forget to switch them on sometimes. What if I have a scheduled cron job to run at that moment such as this:$> task1 && task2 && task3The above won't work properly if the tasks are dependent on an internet connection. Withwaitfornet, you can do something like this:$> waitfornet -w && task1 && task2 && task3The first command will wait until you go online and once you do, it will exit and then your other crons can run!Installationpip install waitfornetUsage-h, --help  show this help message and exit
  -w, --wait  Wait until online, keep trying
Package: waitforoutput
Wait For OutputWaits for a pattern to match output of a command or docker container logs.Features:Waiting for a pattern to appear in docker container logsWaiting for a generic command output to appearFinding container name by regexp patternReturns result as a exit code and messageOutput of checked command/container log is passed through to the consoleInstallingpipinstallwaitforoutputUsage with docker--containertakes a regexp expression, or a full container name. Output from container is streamed to the console until timeout is reached, at the end
only result is displayed - the container is not killed.If multiple containers are found the application will exit with an error.$waitforoutput'Configuration complete; ready for start up'--container'nginx_*'--timeout5/docker-entrypoint.sh:/docker-entrypoint.d/isnotempty,willattempttoperformconfiguration
/docker-entrypoint.sh:Lookingforshellscriptsin/docker-entrypoint.d/
/docker-entrypoint.sh:Launching/docker-entrypoint.d/10-listen-on-ipv6-by-default.sh10-listen-on-ipv6-by-default.sh:info:Gettingthechecksumof/etc/nginx/conf.d/default.conf10-listen-on-ipv6-by-default.sh:info:EnabledlistenonIPv6in/etc/nginx/conf.d/default.conf
/docker-entrypoint.sh:Launching/docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh:Launching/docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh:Configurationcomplete;readyforstartup[2021-05-1405:01:46.188][info]:MatchfoundUsage with any shell commandCommand specified with--commandparameter will be launched, and thewaitforoutputwill be streaming output until the--timeoutis reached.
After timeout the process will be killed.$waitforoutput'Linux'--command'uname -a'Linuxriotkit-dev5.10.23-1-MANJARO#1 SMP PREEMPT Thu Mar 11 18:47:18 UTC 2021 x86_64 GNU/Linux[2021-05-1405:01:46.188][info]:MatchfoundAuthorsCreated by Riotkit anarchist tech-collective.
Package: wait-for-service
wait-for-serviceWaits for a dependency before continuing. It's meant to be used in startup scripts like Docker's entrypoint.
This project is forked fromhttp://github.com/wlatanowicz/wait-for-serviceInstallingpip install wait-for-serviceUsagewait-for-service dependency-url-1 dependency-url-2 ... dependency-url-nie:wait-for-service https://my-server/healthz/ psql://user@db-host/db-nameAvailable checksHTTP(s)HTTP and HTTPS are available by default. Follows redirects; only response with HTTP code 2XX is accepted as valid.Accepted URL schemashttp://https://Examplewait-for-service https://my-server/healthz/ http://my-server/healthz/PostgreSQLRDBMS has to accept connection and allow to perform simple SELECT query.Installationpip install wait-for-service[postgres]Accepted URL schemaspostgres://postgresql://psql://Examplewait-for-service psql://admin:password@db-host/db_nameMySQLRDBMS has to accept connection and allow to perform simple SELECT query.Installationpip install wait-for-service[mysql]Accepted URL schemasmysql://Examplewait-for-service mysql://admin:password@db-host/db_nameRedisRdis has to accept connection to selected database (defaults to 0).Installationpip install wait-for-service[redis]Accepted URL schemasredis://Examplewait-for-service redis://redis-host/5MemcachedMemcached has to accept connection.Installationpip install wait-for-service[memcached]Accepted URL schemasmemcached://Examplewait-for-service memcached://memcached-host/MongoDBMongoDB has to accept connection.Installationpip install wait-for-service[mongodb]Accepted URL schemasmongodb://Examplewait-for-service mongodb://admin:password@db-host/db_nameRabbitMQRabbitMQ has to accept connection to given vhost. You can use optional querystring paramsrequire_queueandrequire_exchangeto additionaly check if particular queue or exchange exists (check will fail otherwise).Installationpip install wait-for-service[amqp]Accepted URL schemasamqp://Examplewait-for-service amqp://admin:password@rabbit-host/vhost
wait-for-service amqp://admin:password@rabbit-host/vhost?require_queue=myqueue
wait-for-service amqp://admin:password@rabbit-host/vhost?require_exchange=myexchange
wait-for-service amqp://admin:password@rabbit-host/vhost?require_exchange=myexchange&require_exchange=mysecondexchange&require_queue=myqueue&require_queue=mysecondqueueApache KafkaKafka has to accept connection. In HA mode (node count > 1) only one node is required to accept the connection.Installationpip install wait-for-service[kafka]Accepted URL schemasIf port is not specified 9092 will be assumed, topic is optional but recommendedkafka://bootstrap-hostkafka://bootstrap-host:9092kafka://bootstrap-host,bootstrap-host2:9092kafka://bootstrap-host/topickafka://bootstrap-host:9092/topickafka://bootstrap-host,bootstrap-host2:9092/topicExamplewait-for-service kafka://kafka-host/
wait-for-service kafka://kafka-first-host/,kafka://kafka-second-host/TCPPlain TCP is available by default. Service port is required.Accepted URL schemastcp://Examplewait-for-service tcp://my-server:7624UnixUnix sockets are available by default.Accepted URL schemasunix://Examplewait-for-service unix:///var/run/docker.sock
Package: wait-for-utils
wait-for-utilsWait for service(s) to be available before startup docker container.Installationpipinstallwait-for-utilsUsagePostgreSQLExample:wait-for-postgres-Additional documentation:wait-for-postgres--helpBy default, all settings are taken from the environment variables.POSTGRES_DBPOSTGRES_USERPOSTGRES_PASSWORDPOSTGRES_HOSTPOSTGRES_PORTPOSTGRES_CHECK_TIMEOUTPOSTGRES_CHECK_INTERVAL
Package: wai.tfutils
Library with utility functions for TensforFlow, to cut down on the amount
of code to write for making predictions.Changelog0.0.3 (2020-05-13)fixed howwai.tfutils.load_labelsdetermines maximum number of classes0.0.2 (2020-05-12)wai.tfutils.load_labelscan determine maximum number of classes to use now
directly from the label protobuf file (if not provided)0.0.1 (2020-01-22)initial release
Package: waiting
Overviewwaitingis a small library for waiting for stuff to happen. It basically waits for a function to returnTrue, in various modes.Waitingis compatible withfluxfor simulated timelines.UsageThe most basic usage is when you have a function you want to wait for:>>> predicate = lambda : TrueWaiting forever is very simple:>>> from waiting import wait, TimeoutExpired
>>> wait(predicate)
TrueIf your predicate returns a value, it will be returned as the result of wait():>>> result = object()
>>> wait(lambda: result) is result
TrueAtimeoutparameter can also be specified:>>> wait(predicate, timeout_seconds=10.5)
TrueWhen a timeout expires without the predicate being fullfilled, an exception is thrown:>>> try:
...     wait(lambda : False, timeout_seconds=0)
... except TimeoutExpired:
...     # expired!
...     pass
... else:
...     assert FalseSleeping polls the predicate at a certain interval (by default 1 second). The interval can be changed with thesleep_secondsargument:>>> wait(predicate, sleep_seconds=20)
TrueWhen waiting for multiple predicates,waitingprovides two simple facilities to help aggregate them:ANYandALL. They resemble Python’s built-inany()andall(), except that they don’t call a predicate once it has been satisfied (this is useful when the predicates are inefficient and take time to complete):>>> from waiting import wait, ANY, ALL
>>> wait(ANY([predicate, predicate]))
True
>>> wait(ALL([predicate, predicate]))
TrueTimeoutExpired exceptions, by default, don’t tell you much about what didn’t happen that you were expecting. To fix that, use thewaiting_forargument:>>> try:
...     wait(lambda : False, timeout_seconds=0, waiting_for="something that will never happen") #doctest: +ELLIPSIS
... except TimeoutExpired as e:
...     print(e)
Timeout of 0 seconds expired waiting for something that will never happenExponential backoff is supported for the sleep interval:>>> from waiting import wait
>>> wait(predicate, sleep_seconds=(1, 100)) # sleep 1, 2, 4, 8, 16, 32, 64, 100, 100, ....
True
>>> wait(predicate, sleep_seconds=(1, 100, 3)) # sleep 1, 3, 9, 27, 81, 100, 100, 100 ....
True
>>> wait(predicate, sleep_seconds=(1, None)) # sleep 1, 2, 4, 6, .... (infinity)
True
>>> wait(predicate, sleep_seconds=(1, None, 4)) # sleep 1, 4, 16, 64, ... (infinity)
TrueIf your predicate might raise certain exceptions you wish to ignore, you may useexpected_exceptionsto ignore them:>>> from waiting import wait
>>> wait(predicate, expected_exceptions=ValueError)
True
>>> wait(predicate, expected_exceptions=(ValueError, AttributeError))
TrueIf you’d like to maintain updates while waiting for a predicate to complete, you may useon_pollto pass a function to perform some behavior after every sleep. By default, this is a no-op.>>> import logging
>>> from waiting import wait
>>> try:
...    wait(lambda: False, timeout_seconds=5,               # Timeout after 5 seconds
...          on_poll=lambda: logging.warn("Waiting...")) # Log "Waiting..." six times.
... except TimeoutExpired:
...    pass
... else:
...    assert False
Package: waitlyst-python
waitlyst-python is a lightweight python library for tracking product analytics.Track every event on your appUnderstand your users and how to improve your productDocumentationPlease visithttps://waitlyst.co/docsto view the complete documentation.Getting StartedThis module is distributed via pypi. You can install it using pip:pipinstallwaitlyst-pythonTracking product analyticsUsing waitlyst-python:fromwaitlyst.indeximportWaitlystwaitlyst=Waitlyst('YOUR_SECRET_KEY')# Before tracking any event, you need to identify the userwaitlyst.identify('USER_ID')waitlyst.identify('USER_ID',{'firstName':'John','lastName':'Doe','email':'test@example.com'})# or you can use an anonymous id if you don't have a user id# when you identify a user with an anonymous id, waitlyst will automatically# reconcile the user in your dashboardwaitlyst.set_anonymous_id('ANONYMOUS_ID')# Tracking pageviewswaitlyst.page('Home Page')waitlyst.page('/homepage')waitlyst.page('/homepage',{'url':'https://example.com/homepage/','title':'Home page'})# Track a custom eventwaitlyst.track('itemPurchased',{"price":3000,"id":'1234',"quantity":1})
Package: waitredis
This is a simple wrapper script that starts a command once redis has finished
loading its dataset in memory.Installation:$ pip install waitredisSample usage:$ sudo restart redis-server && waitredis redis-cli time
redis-server start/running, process 20573
1) "1379426556"
2) "512325"Without the wrapper script (and if redis takes a significant amount of time to
load its dataset from disk), you get an error:$ sudo restart redis-server && redis-cli time
redis-server start/running, process 20504
(error) LOADING Redis is loading the dataset in memory
Package: wait-response
Wait for some HTTP response===========================Written in order to make functional tests less complicated.Retries a HTTP request until it responds as expected or reachesthe max attempt number.------------------------------------------------------------------Lets say we have an endpoint `http://localhost:8080/health` that giveus a json, e.g., `{ "status": "UP" }`. This script keep checking that endpointuntil it receives the `UP` status or it reaches the max number of attempts.# Install`pip install wait_response`# ModuleYou can use a function from the module to wait for status responses.```pythonimport wait_responsefrom wait_response import wait_response_status# Make 2 attempts to get status=UP, trying every 1 seconds.respCode = wait_response_status('http://localhost:8080/health', 2, 1, 'UP')print(respCode) # 0 if success or else, 1```# Script`wait_response url [OPTIONS]``url` is the required endpoint, e.g., `http://localhost:8080/health`.## Options* `--max-attempts default=20` The max number of attempts.* `--sleep defaul=1` Sleep time, in seconds, between checks.* `--status default=UP` The status to wait for. E.g., `GREEN` or `YELLOW`.# Developing## TestsUse `unittest``python -m unittest test.test_wait_response`## Run script
Package: waitress
Waitress is a production-quality pure-Python WSGI server with very acceptable
performance. It has no dependencies except ones which live in the Python
standard library. It runs on CPython on Unix and Windows under Python 3.8+. It
is also known to run on PyPy 3 (version 3.8 compatible python and above) on
UNIX. It supports HTTP/1.0 and HTTP/1.1.For more information, see the “docs” directory of the Waitress package or visithttps://docs.pylonsproject.org/projects/waitress/en/latest/3.0.0 (2024-02-04)Rename “master” git branch to “main”Fix a bug that would appear on macOS whereby if we accept() a socket that is
already gone, setting socket options would fail and take down the server. Seehttps://github.com/Pylons/waitress/pull/399Fixed testing of vendored asyncore code to not rely on particular naming for
errno’s. Seehttps://github.com/Pylons/waitress/pull/397HTTP Request methods and versions are now validated to meet the HTTP
standards thereby dropping invalid requests on the floor. Seehttps://github.com/Pylons/waitress/pull/423No longer close the connection when sending a HEAD request response. Seehttps://github.com/Pylons/waitress/pull/428Always attempt to send the Connection: close response header when we are
going to close the connection to let the remote know in more instances.https://github.com/Pylons/waitress/pull/429Python 3.7 is no longer supported. Add support for Python 3.11, 3.12 and
PyPy 3.9, 3.10. Seehttps://github.com/Pylons/waitress/pull/412Document that trusted_proxy may be set to a wildcard value to trust all
proxies. Seehttps://github.com/Pylons/waitress/pull/431Updated Defaultsclear_untrusted_proxy_headers is set to True by default. Seehttps://github.com/Pylons/waitress/pull/370