Saravanan666/pypi-org huggingface dataset:
Package: txpool
SummaryA Python persistent process pool for use withTwisted. Provides the ability to run
Python callables asynchronously within a pool of persistent processes,
as long as the callable, its arguments, and its return value are all
picklable.Installingpipinstalltxpoolorpythonsetup.pyinstallExamplesHere are some simple examples to give you the idea:importglobfromtwisted.internetimportreactorfromtwisted.internet.deferimportinlineCallbacksimporttxpoolpool=txpool.Pool()@inlineCallbacksdefmain():result=yieldpool.apply_async(glob.glob,('*.pdf',))printresultreactor.stop()reactor.callWhenRunning(main)reactor.run()The callable can instead be specified as a string, using dotted notation
to specify the full path to the callable.fromtwisted.internetimportreactorfromtwisted.internet.deferimportinlineCallbacksimporttxpoolpool=txpool.Pool()@inlineCallbacksdefmain():# You can provide an optional timeout (in seconds) for the call# (the default is None).try:result=yieldpool.apply_async('glob.glob',('*.pdf',),timeout=5)exceptPoolTimeoutase:result=eprintresultreactor.stop()reactor.callWhenRunning(main)reactor.run()Thetxpool.Poolclass can be explicitly sized, asked to log its
actions, and/or given a custom name.importloggingfromtwisted.internetimportreactorfromtwisted.internet.deferimportinlineCallbacks,gatherResultsimporttxpoollogger=logging.getLogger('example')logger.addHandler(logging.StreamHandler())logger.setLevel(logging.DEBUG)pool=txpool.Pool(size=5,log=logger,name='twisting-by-the-pool')@inlineCallbacksdefmain():calls=('math.factorial',)*5args=[(n,)forninrange(150780,150785)]# You can wait until the pool is at full-strength (providing an# optional timeout if desired), but it's not required before# calling the "apply_async" method.  Jobs are queued until a# worker process is available.try:yieldpool.on_ready(timeout=10)exceptPoolTimeoutase:results=eelse:results=yieldgatherResults(map(pool.apply_async,calls,args))printresultstry:# You can gracefully close the pool, which ensures all jobs# already queued are completed before shutting down...yieldpool.close(timeout=10)exceptPoolTimeoutase:printe# ...or you can use force and immediately send SIGKILL to each# process in the pool.yieldpool.terminate(timeout=10)reactor.stop()reactor.callWhenRunning(main)reactor.run()
Package: txportal
# txportaltxportal 是一个基于Python/twisted开发的 wlan portal 协议处理模块, 支持cmccv1，cmccv2，huaweiv1，huaweiv2协议。## 安装pip install txportal -r requirements.txt## AC 模拟设备### tpsim 工具- 参数说明usage: tpsim [-h] [-ph PORTAL_HOST] [-pl PORTAL_LISTEN] [-v VENDOR][-e SECRET] [-p PORT] [-d] [-M] [-W] [-f FORK]optional arguments:-h, --help            show this help message and exit-ph PORTAL_HOST, --portal_host PORTAL_HOSTportal ip addr-pl PORTAL_LISTEN, --portal_listen PORTAL_LISTENportal ip addr-v VENDOR, --vendor VENDORportal protoal version:cmccv1,cmccv2,huaweiv1,huaweiv2-e SECRET, --secret SECRETportal share secret-p PORT, --port PORT  ac port, default 2000-d, --debug           debug option-M, --master          run master-W, --worker          run worker-f FORK, --fork FORK  worker fork num- 运行模拟进程启动4个 worker 子进程处理消息$ tpsim -M -d -f 4
Package: txpostgres
A Twisted wrapper for asynchronous PostgreSQL connections.Based on the interface exposed from the native Postgres C library by the Python
psycopg2 driver.Can be used as a drop-in replacement for Twisted’s adbapi module when working
with PostgreSQL. The only part that does not provide 100% compatibility is
connection pooling, although pooling provided by txpostgres is very similar to
the one Twisted adbapi offers.
Package: txproductpages
Access Red Hat Product Pages’s REST API asyncronously (non-blocking) using the
Twisted framework.Simple example: Fetching a releasefromtxproductpagesimportConnectionfromtwisted.internetimportdefer,reactor@defer.inlineCallbacksdefexample():pp=Connection()# fetch a releasetry:release=yieldpp.release('ceph-3-0')# release is a Munch (dict-like) object.print(release.name)exceptExceptionase:print(e)if__name__=='__main__':example().addCallback(lambdaign:reactor.stop())reactor.run()More ExamplesSeeexamples/directoryPackages that use this packagehelga-productpages
Package: txpy-azurehelper
A wrapper around the Azure SDK for Python developed with the goal to hide the
Azure SDK complexity, and so to allow easier use of Azure resources.IntroductionThis library provides a suite of helper functions for Azure. It is built around theMicrosoft SDK for Python. See alsoAzure for Python Developersfor additional information about the Azure support for Python.This library has been developed and tested with Python 3.7, Azure Core 1.3.0 and
AzureStorage Blob 12.3.0.Currently (V 0.1), only helper functions for the blob storage SDK are available.
More functions will come in future releases.InstallingYou can install the txpy-azurehelper package using:$ pip install txpy-azurehelperGetting the codeThe code is hosted athttps://github.com/tyxio/txpy-azurehelperCheck out the latest development version anonymously with:$ git clone https://github.com/tyxio/txpy-azurehelper.git
$ cd txpy-azurehelperTo install dependencies:$ pip install -Ur requirements.testing.txt
$ pip install -Ur requirements.txtTo install the minimal dependencies for production use (i.e., what is installed
withpip installtxpy-azurehelper) run:$ pip install -Ur requirements.txtQuick StartThe folderquickstartcontains examples of using the helper functions:quickstart_blobs_sync.py: use synchronous helper functions to work with containers and blobs.quickstart_blobs_async.py: use asynchronous helper functions to work with containers and blobs.Note that you must have a valid Azure Storage connection string or SAS key.Running TestsNote that tests require`pip install pyyaml`(this is included if you have installed dependencies from`requirements.testing.txt`)A valid Azure storage connection string must be provided in azure.cfg.To run the unit tests$ python -m unittestDocumentationRead the documentation onreadthedocs.ioIf you want more information about Azure Storage Blobs for Python, seeManage blobs with Python v12 SDK.
Package: txr
Mainly purposed for archiving text files as text files, but can archive any file and not only as text.txrwas inspired by tar, gzip and gunzip.
License: GPL v3 or later.Thetxrformat is composed of two files with the following extensions:.txr- a comma delimited index file (text)..txd- a data file (can either be text or binary). By default it is concatenation of the input files, separated by a sentinel).txruses:sha256 (for optional hashing, by default).zlib (for optional compressing).cryptography (for optional encrypting).Install:>>> pip install txrtxris a standalone application (It consist of a single source filetxr.py).
Using the above command installstxrboth as a console script and as a python module.
If you wish you could also just copytxr.pyand use it as a standalone app.Basic Usage:Archive a folder (or a single file)>>> txr c:\my_inputExtracting atxrfile:>>> txr -x c:\my_input.txrSee detailed help with all available parameters:>>> txrContributions are welcome.
Package: txradius
# txradiustxradius 是一个基于twisted的radius协议处理模块，提供对标准radius协议的解析处理，以及协议扩展能力。txradius 遵循LGPL开源协议。# 基于 txradius 的开源 radius软件[ToughRADIUS](https://github.com/talkincode/ToughRADIUS)
Package: txrc
Copyright and other protections apply.
Please see the accompanyingLICENSEandCREDITSfile(s) for rights and restrictions governing use of this software.
All rights not expressly waived or licensed are reserved.
If those files are missing or appear to be modified from their originals, then please contact the author before viewing or using this software in any capacity.Curious about integrating your project with the above services?
Jeff Knupp (@jeffknupp)describes how.txrc- Twisted Retrying Caller Inspired by Terry Jonestxrcenables retrying calls inTwisted.
It is based onTerry Jones’s proposal.
It is licensed under theMIT License.
See theLICENSEfile for details.
Source code isavailable on GitHub.
Seethe docsfor more information.ExamplesComing soon.IssuesIf you find a bug, or want a feature, pleasefile an issue(if it hasn’t already been filed).
If you’re willing and able, considercontributing.
Package: txRDQ
txRDQ (Resizable Dispatch Queue) provides a Twisted class for a
controllable priority queue for running jobs. You can obtain the contents
of the queue and the dispatched pool while running.  Jobs can be canceled
or reprioritized.  The size of the underway job pool can be changed
dynamically.  Job dispatch can be paused and resumed. The queue can be
stopped gracefully, returning jobs that had not yet been dispatched.Seehttp://blogs.fluidinfo.com/terry/2011/06/27/a-resizable-dispatch-queue-for-twisted/for some more detail.
Package: txretry
txretry provides a Twisted class, RetryingCall, that calls a function
until it succeeds. A back-off iterator (a generator function that yields
intervals) can be specified to customize the interval between retried
calls.  When/if the back-off iterator raises StopIteration the attempt to
call the function is aborted. An instance of the RetryingCall class
provides a start method that returns a Deferred that will fire with the
function result or errback with the first failure encountered.Usage of the class is described in the following blog post:http://blogs.fluidinfo.com/terry/2009/11/12/twisted-code-for-retrying-function-calls/
Package: txrudp
Implementation of a Reliable UDP Protocol Layer over Twisted.This implementation makes no explicit effort to adhere to any published
standard about RUDP (RFCs, etc).Installationpip install txrudpIn order to use encrypted connections, you need to installtxrudpwith
thecryptoextension:pip install txrudp[crypto]This extension denends on thePyNaClpackage, and attempts to install it
as part of the setup. Installation is known to fail on Windows. Seethisabout manually installingPyNaClon Windows.Python 3 supportSupport for Python 3 will be made available as soon as theprotobufpackage officially
supports Python 3.ResourcesOriginal node.js libraryOriginal port to PythonPyNaClProtobufLicensetxrudp is released under theMIT License.
Package: txServiceRegistry
# Python Twisted Rackspace Service Registry clientA Twisted Python client for Rackspace Service Registry.# LicenseThis library is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).# Usage```Pythonfrom txServiceRegistry import Clientfrom twisted.internet import reactorfrom twisted.web.client import AgentRACKSPACE_USERNAME = 'username'RACKSPACE_KEY = 'api key'client = Client(RACKSPACE_USERNAME, RACKSPACE_KEY)# Do somethingreactor.run()def resultCallback(result):print resultreactor.stop()```
Package: txsh
txsh is a dynamic wrapper around Twisted ProcessProtocol and
spawnProcess that allows you to call any program as if it were
a function and return a deferred with its exit code and output.fromtwisted.internetimportreactorfromtxshimportlsdefmy_callback(exc_info):print'Exit Code:',exc_info.statusprint'Output:',exc_info.stdoutprint'Errors:',exc_info.stderrreactor.stop()d=ls()d.addCallback(my_callback)reactor.run()
Package: txshark
AsynchronousTSharkwrapper forTwisted.Introductiontxsharkis based onpyshark.As pyshark, it uses TShark (Wireshark command-line utility) to analyze
network traffic by simply parsing the TShark pdml output (XML-based format).Parsing TShark pdml output is not the most efficient way (in terms of
performance) to analyze network traffic. It might not keep up with very
heavy traffic. But it works very well to decode low/specific traffic (using
a capture filter) and allows to take advantage of all the existing
Wireshark dissectors.This package provides a Twisted service to start and stop TShark.
It allows a Twisted app to decode packets from a live network or a file.RequirementsTool required:TShark! (should be in your PATH)Python packages required:TwistedlxmlUsageTsharkServiceCreate a service that inherits fromTsharkServiceand
override thepacketReceivedmethod to handle incoming packets:from twisted.python import log
from txshark import TsharkService


class SnifferService(TsharkService):

    def packetReceived(self, packet):
        """Override the TsharkService method"""
        log.msg("Packet received: {}".format(packet)The interfaces to listen to should be given as a list of{"name": <name>, "filter": <filter>}.
This allows to give a specific filter to each interface:service = SnifferService(
    [{"name": "eth0", "filter": "tcp and port 8521"},
     {"name": "eth1", "filter": "tcp and port 8522"}])To read packets from a  captured file, just give the name of the file
instead of the interface. If a filter is used in this case, it should
be a display filter (syntax different from a capture filter):service = SnifferService(
    [{"name": "test.pcap", "filter": "tcp.port == 8501"}])The filter is optional in both case.The service can be started with thestartServicemethod:service.startService()But as aTwisted Service, it is designed to be started automatically by aTwisted Application. Refer toTwisteddocumentation for more
information.Accessing packet dataData can be accessed in multiple ways. Packets are divided into layers,
first you have to reach the appropriate layer and then you can select your
field.All of the following work:packet['ip'].dst
>>> 192.168.0.1
packet.ip.src
>>> 192.168.0.100
packet[2].src
>>> 192.168.0.100
Package: txsphinx
An asynchronous Python driver for the Sphinx search engine, based on Twisted. The txsphinx package is an alternative to the original sphinxapi implemented on python.Because the original sphinxapi package has it’s own connection pool and blocking low-level socket operations, it is hard to fully implement network servers using the Twisted framework. Instead of deferring all operations to threads, now it’s possible to do it asynchronously, as easy as using the original API.
Package: txspinneret
(Spinneret is still young, its API should be considered unstable.)Spinneret is a collection of higher-level utilities (such as URL routing,
content type negotiation and processing query arguments) to make writing
complex Twisted Web applications far simpler and (hopefully) more fun! It is
designed to easily integrate with existing Twisted Web projects.For more inforead the docs.ContributeSeehttps://txspinneret.readthedocs.org/en/latest/contributing.htmlfor
information on contributing to Spinneret.Seehttp://github.com/jonathanj/txspinneretfor development.Installation$pipinstalltxspinneret
Package: txsshadmin
Create SSH Server public key / private key pairExample:$ mkdir keys
$ ckeygen -b 2048 -t rsa -f keys/id_rsaRun DemosCustom protocol over SSH:$ twistd -ny ./txsshadmin/demo.tacManhole REPL over SSH:$ ./txsshadmin/manhole_repl.pyCreate Your Own SSH ServiceCreate a Protocol HandlerSubclasstxsshadmin.proto_dispatcher.BaseHandler.  Override handler methods
you wish to customize.  When the handler is created, the SSH avatar is assigned
to itsavatarattribute.  Each handler method is passed an instance of the dispatcher.Create a Protocol FactoryUsetxsshadmin.proto_dispatcher.makeSSHDispatcherProtocolFactory()to create
a protocol factory from your handler.Create an SSH AvatarSubclasstxsshadmin.cred_base.SSHBaseAvatarto create an avatar for your
ssh service.  Assign the protocol factory you created to itsprotocolFactoryattribute.  The avatar is where you can define the capabilities of authenticated
users.  A protocol handler for a service with users with various capabilities
may delegate its handlers to its avatar.Create a RealmThe realm determines what avatar (if any) is returned when the authenticated
avatar ID and a list of interfaces is provided to the realm.  The resulting
avatar should support at least one of the provided interfaces.For a simple realm that returns only a single type of avatar, you can subclasstxsshadmin.cred_base.SSHBaseRealmand set theavatarFactoryattribute to
an avatar factory.  For more sophisticated realms, you can include logic that
returns different avatars based on capabilities keyed to the avatar ID.Create the SSH ServiceSubclasstxsshadmin.service.SSHServiceBase.  Set therealmattribute equal
to an instance of your realm.
Package: txStatHat
ATwistedAPI wrapper forStatHat’sEZ API.The usage is as simple as:from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks
from txstathat import txStatHat


@inlineCallbacks
def doSomeStats():
    sh = txStatHat('ezKeyOrEmail')
    yield sh.count('aCounter')  # Counts by 1 by default
    yield sh.count('anotherCounter', 42)
    yield sh.value('aValue', 0.42)


reactor.callLater(1, doSomeStats)
reactor.run()TheezKeyOrEmailis your e-mail address in the beginning, but can be
changed in the account settings to something more safe. There is no such thing
as a password.By default, errors are swallowed silently so disruptions at StatHat don’t lead
to disruption in your services by accident. To get network exceptions as well
as API error messages, setignore_errors=Falsewhen instantiating
txStatHat. You should only do so if you have really good reasons.Please note: At the moment, StatHat.com doesnotreport an error when
an incorrect EZ API key is submitted. Therefore the above example will work
without any effect even if you don’t replace the API key.StatHat.com seems to have generally a similar attitude towards errors as
txStatHat. They return an OK except if you use the API incorrectly (don’t
supply an API key for example). The difference is that ifignore_errorsis
left at the defaultTrue, network problems accessing the API are ignored as
well.Depending on the availability ofpyOpenSSL, txStatHat uses HTTPS for API calls
if possible. While there isn’t much real damage an attacker can do to you if
(s)he hijacks your API key, I strongly suggest to install and use it.
Package: txsyncml
Limited SyncML 1.1 server.
Only implements the “Refresh sync from client only”.As per the docs (chapter 6.3):The 'refresh sync from client only' is a synchronization type in
which the client sends all its data from a database to the server
(i.e., exports). The server is expected to replace all data in the
target database with the data sent by the client. I.e., this means
that the client overwrites all data in the server database.Stages of a SyncML SessionPkg #1 client initialization packagePkg #2 server init packagePkg #3 client modificationPkg #4 server modificationsPkg #5 mapping of data idsPkg #6 mapping statusAn initialization package generally contains the following information:Device capabilitiesRequested databases access, type of sync desiredAuthentication informationSync anchorsA modification package generally contains the following information:Synchronization commands: add, replace, delete, move …Data ids and contents associated with these commands (except for delete)A mapping package (only sent by client) generally contains the following information:Mapping information (a couple of LUID and GUID for each new item added from server)$ virtualenv ve
(ve)$ pip install -e .
(ve)$ twistd txsyncml --help
Package: txt2dub
txt2dubA text-based UI application for editing voiceover scripts and generating text to speech performances.What istxt2dubfor?txt2dubis a video content creation tool for writing scripts and generating overdub performances as MP3 files that can be imported into your video editing software. This supports a workflow for arranging video assets on your timeline based on the voice performance's timing. You can record your own voiceovers to replace the robotic text-to-speech performance, or you can keep the placeholders if that's the style you're targeting.This is how it looks to edit a script intxt2dub. As you type each script line is played aloud by the text-to-speech system. You can play back a line, reorder lines or insert new lines anywhere in the script. You can set the voice performer and the rate of speech for each line in the script. You can undo or redo actions without limit. You can also play back the whole script starting from the selected line.And here is the home screen.Who istxt2dubfor?txt2dubis designed to be easily installable on the major desktop platforms (Windows, Mac and Linux) without programming skills. More detailed installation instructions will be posted soon. For those familiar with Python, you can installtxt2dubin a virtual environment or globally with:pipinstalltxt2dubIt can be run from its installed script:txt2dubor from its Python module:python -m txt2dubWhy isn'ttxt2duban app or web-based service?txt2dubaims to unlock access to the text-to-speech services provided by your operating system, all wrapped in a simple application that tries to improve the workflow for voiceover script writing. It is built on top of theTextualrapid application development framework for text-based UIs. This makes it easy to install and run inany supported terminalwith Python 3.7 or later.This project doesn't require a subscription, a new account or payment. It's entirely open source, free to use, and it doesn't share your data or the content you create using it with anyone.Istxt2dubready for production use?It has been used successfully for production work by the project's author in Windows 10 and macOS Monterey. Testing on Mac will proceed in the near future. Linux testing will be community-driven. Please report issues with details about your OS (Windows, Mac, Linux + version) and Python environment (version) if you encounter bugs.
Package: txt2epub
TXT2EPUB中文说明A simple tool for converting TXT books into ePub.InstallationYou'll first need to have Python3 and Pip installed. If you're using Windows, then the default Python installer will come with Pip. If you're using Linux, you may need to install an extra package likepython3-pip. The exact package name depends on your distro.Then, execute the following command to install TXT2EPUB.pipinstalltxt2epubUsageYou may convert a file from the command line:txt2epubconvert-i<input>-o<output>...or using the GUI:txt2epubguiChapter DetectionThis program detects the book chapters and chapter titles following the standard TXT book format:Chapters are separated by three two new lines (i.e.,\n\n\n)The first line in a new chapter is the chapter's title.For example, in the text below, there are two chapters with titles "Chapter 1" and "Chapter 2."Chapter 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at sapien ante.

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae.


Chapter 2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at sapien ante.

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae.