Saravanan666/pypi-org huggingface dataset:
Package: takumi-client
Thrift client pool for Takumi.Install$pipinstalltakumi-clientUsageThis module relies ontakumi-configfor settings.CLIENT_SETTINGSservice: required, service name defined in thrift filethrift_file: required, existing thrift file pathpool_size: optional, connection pool size, default 30timeout: optional, connection timeout, default 30scheck_time: optional, time interval for checking failed connections, default 10shosts: optional, a list of hosts: [(‘hostname’, port)]extra args: vary for different hosts extensionsExample settings:CLIENT_SETTINGS={'demo':{'service':'PingService','thrift_file':'ping.thrift','hosts':[('localhost',1990),('localhost',8010),('localhost',1890)]}}To get a pool:fromtakumi_clientimportclientspool=clients['demo']To invoke an api:withpool.client_ctx()asc:c.ping()
Package: takumi-config
Takumi framework configuration manager.Configs are in yaml format stored inapp.yamlby default. An
environment vairableTAKUMI_APP_CONFIG_PATHcan be used to change
the path of the yaml file.To set current running environment of the app use environment vairableTAKUMI_ENV. The default env isdev.UsageFor the given config files:# app.yamlapp_name:echoapp:echo:servicesettings:settings# settings.pyDB_DSN='psycopg2+postgresql://root:123@localhost:5432/dev'>>># With this environment vairable set:>>># TAKUMI_ENV=prod>>>>>>fromtakumi_configimportconfig>>>print(config.env)'prod'>>>print(config.app_name)'echo'>>>config.settings.update({'TEST':True,'HELLO':'world'})>>>print(config.settings['TEST'])True>>>print(config.settings['DB_DSN'])'psycopg2+postgresql://root:123@localhost:5432/dev'
Package: takumi-ext
Simple extension system for extending Takumi framework.Install$pipinstalltakumi-extExampleHere is an extension for running codes before app starts and after app exists.app=AppRunner()app_runner_ext=ext['app-runner']ifapp_runner_ext:runner_ext=app_runner_ext(app)app.cfg.set('when_ready',lambdax:runner_ext.on_start())app.cfg.set('on_exit',lambdax:runner_ext.on_exit())app.run()To implement this extension:# package name runner_extclassRunnerExt(ExtBase):name='app-runner'def__init__(self,app):self.app=appdefon_start(self):print('app starting...')defon_exit(self):print('app existing...')Add the following config toapp.ymlto use the extension:extensions:-runner_ext
Package: takumi-http
Write http service as a thrift service.This package implements a protocol transformer from http to thrift. Just write
the service as a normal Takumi thrift service, then serve the service as a http
service. The developers don’t have to care about the details of the protocol
transformation, only add the configthrift_protocol_classto app.yaml and
your service can be served as a http service.Configthrift_protocol_class:takumi_http.HttpProtocolSettingsSession related settings:SECRET_KEY(required) secret key for encrypting cookies.PERMANENT_SESSION_LIFETIMEtimedelta of session lifetime, default 31 day.SESSION_COOKIE_DOMAINcookie domain.SESSION_COOKIE_PATHcookie path, default ‘/’.The attributessession_cookie_domainandsession_cookie_pathcan be
setted to api context to override default settings.ExamplefromtakumiimportTakumiapp=Takumi('PingService')app.use(save_session)@app.api_with_ctx@pass_requestdefsay_hello(request,name):request.session['user_id']=90return'Hello '+nameServe the AppUsingtakumi-clito the serve the
app.$takumiserveInvoke ApiThe http method is not very important. If the api has arguments usePOST,
if not useGET.Use a http client to invoke api:$curl-XPOSThttp://localhost:1993/say_hello-d'{"name":"world"}'API URL has this format:http://<domain>:<port>/<arbitrary>/<api_name>
Package: takumi-sqlalchemy
Sqlachmey utilities for Takumi.Add SettingsThe settingDB_SETTINGSmust be defined insettingsmodule.DB_SETTINGS={'test_db':{'dsn':'sqlite:///:memory:'}}Init AppIt’s not required to init app before using db. But it’s recommended to init app
first:db.init_app(app)Query DatabaseThe objectdbshould be used to query database. And the only preferred way
to query database is to use the context manager:withdb['test_db']assession:session.query(User).all()# or to use a different bindingwithdb['test_db'].using_bind('master')ass:s.query(User).all()# or to tag the querywithdb['test_db'].tag(hello=123,world=90)ass:s.query(User).all()
Package: takumi-thrift
Thriftpy instruments for passing metadata bidirectional.Example# ServerclassCtx(object):passctx=Ctx()ctx.response_meta={'server':'test'}classHandler(object):defsay_hello(name):assertctx.meta=={'hello':'test','client_name':'test_client'}returnResponse('Hello '+name,meta={'api':'say_hello'})processor=Processor(ctx,service,Handler())# Clientclient=Client(service,proto,meta={'client_name':'test_client'})res=client.call('say_hello','world',meta={'hello':'test'})assertres.meta=={'api':'say_hello','server':'test'}assertres.value=='Hello world'Data frame changeRequest data frame:before: message_begin args message_end
after:  meta_begin meta meta_end message_begin args message_endResponse data frame:before: message_begin result message_end
after:  meta_begin meta meta_end message_begin result message_end
Package: tal
talDeploys python GCP Functions with private git requirements.Installpip install talDeploying Functions:Add the following tomain.pyimport sys
 sys.path.append('lib')Put git dependencies inprivate_requirements.txt.Make sure there is nolib/directory.Runtal func deploy my_func --stage dev.Creating Repositories:Runtal repo create my_repoCreating Buckets:Runtal storage create-bucket my_bucketDeleting Buckets:Runtal storage delete-bucket my_bucketUploading Files:Runtal storage upload my_file.txt --bucket=my_bucket --path=my/nested/pathInspirationBuild like Tal:https://www.youtube.com/watch?v=CF6w2-WNZLE
Package: talalprotocol
TalalProtocolTalalProtocol.Deep Layered Encryption and SecurityFeaturesThis module provides various encryption algorithms and security exploits.All the scripts provided are meant for educational and research purposes only!Current ciphers:Vigenere Cipher: encryption and decryption options.Caesar Cipher: encryption and decryption options.Custom Binary Encryption Algorithm: ENCRYPTION ONLY!Linear and Binary Search Algorithms.Text and Email Penetration Scripts.EOLEnd of Life Cycle
Goodnight, Sweet PrinceCreditsPackage Writers:Talal Khalil (Creator & Lead Developer)Anahit Sarao (Lead Architect)TalalProtocolHistory0.1.0 (2016-09-15)First release code name: Apollo0.1.2 (2016-09-15)Patches and Bug fixes0.2.0 (2016-09-20)Custom Binary Encryption algorithm addedCaesar Cipher patched and completely optimizedVigenere Cipher patchedRun time improvement0.2.1 (2016-10-10)Code improvements.Minor Bug fixes.Linear and Binary Search Algorithms added.Text and Email Penetration Script added.0.3 (2017-7-29)Update for Python 3.6End of Life Cycle for TalalProtocol
Package: talamus-relatable
RelaTableA relational database -like table of rows.Supports foreign key -style referencing to an anotherRelaTableor other containers.An ExamplefromrelatableimportRelaTablecolors=["red","blue","green"]pet_names={"dog":"Musti","cat":"Mirri"}persons=RelaTable(primary_key_column="id",foreign_keys={"color":colors},rows=[{"id":123,"name":"Jaakko","color":0},{"id":456,"name":"Teppo","color":1},],)# Insert new user in the middle of the tablepersons.insert(1,{"id":789,"name":"Seppo","color":2})pets=RelaTable(# No primary key defined => index is usedforeign_keys={"name":pet_names,"owner":persons},rows=[{"name":"cat","owner":123},# index 0{"name":"dog","owner":456},# index 1],)print(persons)# Prints out:#   [{'id': 123, 'name': 'Jaakko', 'color': 'red'},#    {'id': 789, 'name': 'Seppo', 'color': 'green'},#    {'id': 456, 'name': 'Teppo', 'color': 'blue'}]print(pets)# Prints out:#   [{'name': 'Mirri', 'owner': {'id': 123, 'name': 'Jaakko', 'color': 'red'}},#    {'name': 'Musti', 'owner': {'id': 456, 'name': 'Teppo', 'color': 'blue'}}]print(persons[789].name)# Prints out:#   Seppoprint(pets[0].owner.color)# Prints out:#   redprint(pets[0].data())# Prints out the non-expanded row data:#   {'name': 'cat', 'owner': 123}
Package: tale
Tale is a framework for creating interactive fiction (text adventures), or MUDs (multi-user dungeons).It’s still being developed and new features are implement along the way,
but the current version is quite capable of running an interactive fiction story world.
Also the basics for a multi-user (MUD) server are working nicely.An example test/demo story is included in thestoriesdirectory of the distribution archive.
This will require you to extract the source archive manually.You can also run the tiny embedded test story like this, after you’ve installed the framework:$ python -m tale.demo.storyThe source code repository is on Github:https://github.com/irmen/Tale
Package: talentlms
TalentLMS API Python libraryPython implementation of theTalentLMS API.Method names correspond one-to-one to API method names but have underscores separating words in API method names.Example useimporttalentlmsAPI_KEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'lms=talentlms.api('example.talentlms.com',API_KEY)try:new_user=lms.user_signup({'email':'jsmith@example.com','first':'John','last':'Smith','login''jsmith','password':'XXXXXXXXXXXXX'})lms.user_set_status(new_user['id'],'active')excepttalentlms.UserAlreadyExistsError:passRequirementsPython >= 2.7LicenseMITCreditsWritten byIvan Butorin
Package: taler-util
taler-util contains util code for the GNU Taler project,
specifically it contains python code for:amount representationloggingconfiguration parsingtestsTo run the unittests, executetoxormake checkTaler Error CodesError codes are defined in taler/util/errorcodes.py.To generate the C header, runpython3 taler/util/gen_errcodes_c.pyInstallationThe wheel release can be installed as-is from pypi.org
as it includes only what is necessary.The source distribution tarball (sdist) includes two
build-systems:a small GNU guidelines following wrapper around python’s pippython’s default build-facility used via setupHow to upload to pypi.orgFrom top-level directory:$ make distInstall Twine, if it’s not installed yet:$ pip3 install twineUpload the files to PyPI (interactively providing the credentials):$ twine upload dist/*LicensePython modules contained in this package are licensed LGPL 3 (or later).This does not cover code contained in build-system/taler-build-scripts,
which is included in the source distribution of this software.
taler-build-scripts is (mostly) 0BSD / public-domain software.
Package: tales
Docshttps://elf.is-a.dev/docsWhat is Tales?Tales is a new, easy to use hypixel API wrapper designed with python.Installationpython -m pip install -U git+https://github.com/elfq/talesCoverageMinigamesBlitzBedwarsSkywarsSkyblockNetworkWatchdog InfoPlayer Info (all coins, kills, etc)more to comeExamplefromtalesimportplayer,apiapi.key="Your Hypixel API key"wins=player.blitz_wins("Technoblade")print(wins)
Package: talisker
Talisker is an enhanced runtime for your WSGI application that aims to provide
a common operational platform for your python microservices.It integrates with many standard python libraries to give you out-of-the-box
logging, metrics, error reporting, status urls and more.Python version supportTalisker 0.20.0 was the last to support Python 2.7.
Talisker version >=0.21.0 only supports Python 3.5, 3.6, 3.8 and 3.10, as
they come with Ubuntu LTS releases.Quick StartSimply install Talisker with Gunicorn via pip:pip install talisker[gunicorn]And then run your WSGI app with Talisker (as if it was regular gunicorn).:talisker.gunicorn app:wsgi -c config.py ...This gives you 80% of the benefits of Talisker: structured logging, metrics,
sentry error handling, standardised status endpoints and more.Note: right now, Talisker has extensive support for running with Gunicorn, with
more WSGI server support planned.Elevator PitchTalisker integrates and configures standard python libraries into a single
tool, useful in both development and production. It provides:structured logging for stdlib logging module (with grok filter)gunicorn as a wsgi runnerrequest id tracingstandard status endpointsstatsd/prometheus metrics for incoming/outgoing http requests and more.deep sentry integrationIt also optionally supports the same level of logging/metrics/sentry
integration for:celery workersgeneral python scripts, like cron jobs or management tasks.Talisker is opinionated, and designed to be simple to use. As such, it is not
currently very configurable. However, PR’s are very welcome!For more information, see The Documentation, which should be found at:https://talisker.readthedocs.io
Package: talisker-fork
Talisker is a runtime for your wsgi app that aims to provide a common
platform for your python services.tl;drSimply run your wsgi app with talisker as if it was gunicorn.:talisker app:wsgi -c config.py ...Talisker will wrap your app in a some simple WSGI middleware, and configure
logging to output structured logging like so:logger = logging.getLogger('app')
logger.info('something happened', extra={'context': 'I haz it'})will output:2016-01-13 10:24:07.357Z INFO app "something happened" svc.context="I haz it" request_id=...It also exposes some status endpoints you can use, go to the /_status/
url on your app to see them.This all works out of the box by using the talisker runner instead of
gunicorn’s, and there are many more features you can use too.Elevator PitchTalisker is based on a number of standard python tools:stdlib logging for logsgunicorn for a wsgi runnerrequests for http requestsstatsd for metrics (and optionally,prometheus_client)sentry for errorswerkzeug for thread locals and wsgi utilitiesIt also supports additionaly optional tools:celery for async tasksprometheus as an alternate metrics toolIt’s main job is to integrate and configure all the above in a single tool, for
use in both dev and production, which provides a standard set of features out
of the box:drop-in replacement for gunicorn as a wsgi runnerstandardised structured logging on top of python stdlib loggingrequest id tracingstandard set of status endpoints for your appeasier configuration via env varsmetrics foreverythingdeep sentry integration (WIP)All the above are available by just using the talisker entry point script,
rather than gunicorn.In addition, with a small amount of effort, your app can benefit from additional features:add structured logging tags to your application logssimple deeper nagios checks - just implement a/_status/checkurl in your appper-thread requests connection pool managementAdditionally, talisker provides additional tools for integrating with your
infrastructure:grok filters for log parsingrsyslog templates and config for log shipping (TODO)Talisker is opinionated, and derived directly from the authors’ needs and
as such not currently very configurable. However, PR’s are very welcome!For more information, see The Documentation, which should be found at:https://talisker.readthedocs.io
Package: talk2pdf
talk2pdftalk2pdf converts videos of talks into a PDF with the transcript and associated screenshots.VideoResultPrerequisitestalk2pdf uses OpenAI's APIs -- you will need an OpenAI API key.NoteYour API key is ONLY used to make OpenAPI calls.Create an OpenAI accountGo toplatform.openai.comClick on your account in the top rightClick View API KeysClick "Create new secret key"You will need to provide this API key to talk2pdf (see below)talk2pdfuses FFmpeg for video/audio operations and yt-dlp to download video from online streaming services.brew install ffmpeg yt-dlpapt-get install ffmpeg yt-dlpRunningWarningThis will cost ~$0.50 / hr of videoThis will generate a PDF in the current directory:With a youtube videopipenvshell
pipinstalltalk2pdfexportOPENAPI_SECRET=sk-...
python-mtalk2pdf<youtube-url>Or, with an existing video filepipenvshell
pipinstalltalk2pdfexportOPENAPI_SECRET=sk-...
python-mtalk2pdf<video-file>Configurationtalk2pdflooks inTALK2PDF_CONFIG_DIR, thenXDG_CONFIG_HOME/talk2pdf, and finally$HOME/.config/talk2pdffor aconfig.jsonfile.
You can put your OpenAI key in there instead of setting it in the environment{"openapi_secret":"sk-..."}talk2pdfusesTALK2PDF_CACHE_DIR, orXDG_CACHE_HOME/talk2pdf, or finally$HOME/.cache/talk2pdfas a cache directory.
This is where intermediate files are stored.Contributingpipenvshell
pipinstall--editable.
python-mtalk2pdf...pip install --upgrade build twine
rm -rf dist
python -m build
python3 -m twine upload dist/*Roadmapadd timestamps to each paragraph
Package: talkapps-client
Python client for Talk stickersA client to interact with theTalkstickers API.Fetch sticker packsGet images filesUpload sticker packsetc.Note: despite its name, this client does not interacts withtalkapps.github.io/sticker-store, so information defined there (tags, etc.) willnotbe fetched.This client connects to the Talk sticker API. Pleasedo not flood it.Installationpip3install--usertalkapps-clientThis module requirescryptography,protobuf,anyio, andhttpx(but they should
be installed with the previous command).Downloading a packTheStickerPackobject returned byawait StickersClient().get_pack(<pack_id>, <pack_key>)exposes the following attributes:id(string): the pack id. Equals topack_id;key(string): the pack key. Equals topack_key;title(string): the title of the pack;author(string): the author of the pack;nb_stickers(int): the number of stickers in the pack;cover(Sticker): the cover sticker;stickers(list): the list of stickers in the pack (which areStickerobjects).AStickerobject exposes the following attributes:id(int): the id of the sticker in the pack;emoji(string): the emoji mapped to this sticker;image_data(bytes): the webp image of the sticker.Uploading a packSame thing, but useLocalStickerPack(that does not containsidandkey)
instead ofStickerPack.You will need your Talk credentialsTo obtain them, open the Developer
Tools in Talk Desktop, and typewindow.reduxStore.getState().items.uuid_idto get your USER, andwindow.reduxStore.getState().items.passwordto get
your PASSWORD.Example usageSeeexamples/DevelopmentCreate apipenvwithpipenv install --dev;Edit the code you want;Don't forget to launch tests withpipenv run py.test.LicenseSeeLICENSELegalThis is not an official Talk project. This is an independant project.Talk is a registered trademark in the United States and other countries.AuthorNKDuykn145660@gmail.com
Package: talkback
talkbackRespond with your response to requestsUse routes file to map url path to respondersSee examples app inhttps://www.github.com/madhukumarseshadri/talkweb3Examples of GET / POST / PUT / DELETEExamples of managing formdata,In the responder, self.qs is query string.For GET / POST, form submission html forms,useself.processform()in the responder to get the formdata [ url encoded or multipart or text/plain ]After using processform, self.formdata.data is,For GET,
self.formdata.data is a dict of field names, value pairs and field name and values are python strings and percent decoded and plus sub-ed. Get the form values as shown below,type,fieldvalue,filename,content_type=self.formdata.data['fieldname']#ortype,fieldvalue,filename,content_type=self.formdata['fieldname']#type - empty or b'f' with f denoting input is file#fieldvalue -  contents of file as bytes or field value#filename - name of the file if file#content_type - content_type of file if fileFor POST,
self.formdata.data - dict is byte field name value pairs if post is mutlipart/formdata
For url encoding posts, default encoding is utf8 no need to provide, provide python supported encoding or none for bytes in self.processforms(encoding=None). For utf8, values are percent decoded and plus sub-edtype,fieldvalue,filename,content_type=self.formdata.data['fieldname']#ortype,fieldvalue,filename,content_type=self.formdata['fieldname']For multipart/formdata with files,type,fieldvalue,filename,content_type=self.formdata.data[b'fieldname']ortype,fieldvalue,filename,content_type=self.formdata[b'file']fortype,fieldvalue,filename,content_typeinself.formdata[b'files']:#input is multiple filesAJAX formdata GET and POSTGET / POST formsSee examples appFor PUT,use self.processinput() within a responderFor DELETEuse self.processinput() within a responderOPTIONS / HEAD / CONNECT AND TRACE for http server to manageExamples for using session and cookies - see session.py in examplesfskeeper - keeps the sesson as file and pickles the session object to file
sqlkeeper - keepes the session in the database in session table
Package: talk-cloud
拓课云 Python SDK。功能特性拓课云接入api安装为了简化安装过程，推荐使用 pip 进行安装pipinstalltalk-cloud升级 talk-cloud 到新版本:pip install -U talk-cloud如果需要安装 GitHub 上最新代码:pip install https://github.com/ni-ning/talk-cloud/archive/master.zip
Package: talk-codebase
talk-codebaseTalk-codebase is a tool that allows you to converse with your codebase using Large Language Models (LLMs) to answer your
queries. It supports offline code processing using LlamaCpp andGPT4Allwithout
sharing your code with third parties, or you can use OpenAI if privacy is not a concern for you. Please note that
talk-codebase is still under development and is recommended for educational purposes, not for production use.InstallationRequirement Python 3.8.1 or higher
Your project must be in a git repositorypipinstalltalk-codebaseAfter installation, you can use it to chat with your codebase in the current directory by running the following command:talk-codebasechat<path>Select model type: Local or OpenAIOpenAIIf you use the OpenAI model, you need an OpenAI API key. You can get it fromhere. Then you
will be offered a choice of available models.LocalIf you want some files to be ignored, add them to .gitignore.Reset configurationTo reset the configuration, run the following command:talk-codebaseconfigureAdvanced configurationYou can manually edit the configuration by editing the~/.config.yamlfile. If you cannot find the configuration file,
run the tool and it will output the path to the configuration file at the very beginning.Supported Extensions.csv.doc.docx.epub.md.pdf.txtpopular programming languagesContributingIf you find a bug in talk-codebase, please report it on the project's issue tracker. When reporting a bug, please
include as much information as possible, such as the steps to reproduce the bug, the expected behavior, and the actual
behavior.If you have an idea for a new feature for Talk-codebase, please open an issue on the project's issue tracker. When
suggesting a feature, please include a brief description of the feature, as well as any rationale for why the feature
would be useful.You can contribute to talk-codebase by writing code. The project is always looking for help with improving the
codebase, adding new features, and fixing bugs.