Saravanan666/pypi-org huggingface dataset:
Package: trustpaylib
TrustPay payment solution integration helpers.Install$pipinstalltrustpaylibUsageLink approachCreate environment, payment request and generate signed link.>>>importtrustpaylib>>>>>>env=trustpaylib.build_environment(...aid="1234567890",...secret_key="abcd1234",...# api_url=trustpaylib.TRUSTCARD_API_URL,...)>>>pay_request=trustpaylib.build_pay_request(...AMT="123.45",...CUR="EUR",...REF="1234567890",...)>>>trustpay_client=trustpaylib.TrustPay(env)>>>trustpay_client.build_link(pay_request)'https://ib.trustpay.eu/mapi/paymentservice.aspx?AID=9876543210&REF=1234567890&AMT=123.45&SIG=DF174E635DABBFF7897A82822521DD739AE8CC2F83D65F6448DD2FF991481EA3&CUR=EUR'Form approachFirst merge payment request with environment variables, validate it and sign.trustpaylib.TrustPay.finalize_requestreturns prepared payment
request. As form action usetrustpay_client.environment.api_url.>>>pay_request=trustpay_client.finalize_request(pay_request)>>>trustpay_client.initial_data(pay_request){'AID': '9876543210', 'REF': u'1234567890', 'AMT': u'123.45', 'SIG': 'DF174E635DABBFF7897A82822521DD739AE8CC2F83D65F6448DD2FF991481EA3', 'CUR': u'EUR'}>>>trustpay_client.environment.api_url'https://ib.trustpay.eu/mapi/paymentservice.aspx'Redirects handlingThere’s not much you can (or should) do with redirect.NoteOfficial TrustPay documentation: DO NOT PERFORM ANY ACTION ON THIS REDIRECT.
Data is not signed and therefore cannot beconsidered as a verified payment result, such
as the signed results sent to Notification URL or NotificationEmail.But at least you can check the result code.>>># data received as get params to redirect...redirect_data={"REF":"1234567890","RES":3,"PID":"1212321"}>>>redirect=trustpaylib.build_redirect(**redirect_data)>>>>>>trustpay_client.get_result_desc_from_redirect(redirect).short'Authorized'>>>trustpay_client.get_result_desc_from_redirect(redirect).long'Payment was successfully authorized. Another notification (with result code 0 - success) will be sent when TrustPay receives and processes payment from 3rd party.'Notifications handlingFor received notification, first check signature.>>>notification_data={..."AID":"1234567890",..."TYP":"CRDT",..."AMT":"123.45",..."CUR":"EUR",..."REF":"9876543210",..."RES":"0",..."TID":"11111",..."OID":"1122334455",..."TSS":"Y",..."SIG":(..."97C92D7A0C0AD99CE5DE55C3597D5ADA"..."0D423991E2D01938BC0F684244814A37"...),...}>>>notification=trustpaylib.build_notification(**notification_data)>>>asserttrustpay_client.check_notification_signature(notification)Then check result code.>>>trustpay_client.get_result_desc_from_notification(notification).short'Success'>>>trustpay_client.get_result_desc_from_notification(notification).long'Payment was successfully processed.'
Package: trustpilot
trustpilotPython HTTP client forTrustpilot.FeaturesExtends therequests.Sessionclass with automatic authentication for public and private endpointsGET, POST, PUT, DELETE, HEAD, OPTIONS and PATCH methods are exposed on module levelImplements session factory and default singleton sessionProvides a simple hook systemCLItool with basic HTTP commandsInstallationInstall the package fromPyPIusingpip:pip install trustpilotUsage(forfull usage documentationcheckoutdocs)fromtrustpilotimportclientclient.default_session.setup(api_host="https://api.trustpilot.com",api_key="YOUR_API_KEY",)response=client.get("/foo/bar")status_code=response.status_codeYou can rely on environment variables for the setup of sessions so$envTRUSTPILOT_API_HOST=https://api.trustpilot.comTRUSTPILOT_API_KEY=fooTRUSTPILOT_API_SECRET=barCLIThetrustpilot_api_clientcommand is bundled with the installUsage:trustpilot_api_client[OPTIONS]COMMAND[ARGS]...

Options:--hostTEXTHostname--versionTEXTApiversion--keyTEXTApikey--secretTEXTApisecret--token_issuer_hostTEXTTokenissuerhostname--usernameTEXTTrustpilotusername--passwordTEXTTrustpilotpassword-c,--configFILENAMEJsonconfigfilename-e,--envFILENAMEDotenvfile-of,--outputformat[json|raw]Outputformat,default=json-v,--verboseVerbositylevel--helpShowthismessageandexit.

Commands:create-access-tokenGetanaccesstokendeleteSendaDELETErequestgetSendaGETrequestpostSendaPOSTrequestwithspecifieddataputSendaPUTrequestwithspecifieddataYou can also supply the variables with:--config/-c: As JSON config file in the following format:{"TRUSTPILOT_API_HOST":"foo","TRUSTPILOT_API_KEY":"bar","TRUSTPILOT_API_SECRET":"baz","TRUSTPILOT_API_VERSION":"v1","TRUSTPILOT_USERNAME":"username","TRUSTPILOT_PASSWORD":"password"}or--env/-e: As DotEnv config file in the following format:TRUSTPILOT_API_HOST=fooTRUSTPILOT_API_KEY=barTRUSTPILOT_API_SECRET=bazTRUSTPILOT_API_VERSION=v1TRUSTPILOT_USERNAME=usernameTRUSTPILOT_PASSWORD=passwordChangelogseeHISTORY.mdIssues / DEVReport issueshereand we welcome collaboration through PullRequests :-)
Package: trustpilot-authenticated-encryption
# Trustpilot authenticated encryption for python[![Build Status](http://travis-ci.org/trustpilot/python-authenticated-encryption.svg?branch=master)](https://travis-ci.org/trustpilot/python-authenticated-encryption)  [![Latest Version](https://img.shields.io/pypi/v/trustpilot_authenticated_encryption.svg)](https://pypi.python.org/pypi/trustpilot_authenticated_encryption) [![Python Support](https://img.shields.io/pypi/pyversions/trustpilot_authenticated_encryption.svg)](https://pypi.python.org/pypi/trustpilot_authenticated_encryption)Library for authenticated encryption used with Trustpilot.## Install```pip install trustpilot_authenticated_encryption```## UsageTo encrypt a message```from trustpilot_authenticated_encryption import encryptionmessage = 'this is the secret message'encrypt_key = "g9hH6MkVnlKlGa5IG+5R/uKgyrCJxOsh5fXlwK0mjH0="hash_key = "oGmd/bHHkd+N6P6lZQxyfikjU7c5P/mhWO/noCsERyY="encrypted_message = encryption.encrypt(message.encode("utf-8"), encrypt_key, hash_key)```
Package: trustpilot-json-logging
Trustpilot LoggingOpinionated json logging module used byTrustpilot,( based onpython-json-loggerbymadzak)InstallationInstall the package fromPyPIusingpip:pipinstalltrustpilot-loggingUsageimporttrustpilot_json_logginglogging=trustpilot_json_logging.setup_logging()logging.warning("i'm alive")# outputs# {"message": "i'm alive", "Module": "root", "Severity": "INFO"}Advanced Usageimporttrustpilot_json_logginglogging=trustpilot_json_logging.setup_logging("INFO",sys.stderr,ignore={"elasticsearch":"WARNING"})logging.info({"message":"i just arrived","age":32,"location":"north pole"})# outputs# {"message": "i just arrived", "age": 32, "location": "north pole", "Module": "root", "Severity": "INFO"}Publish new versionTo publish a new version:Make pr withyour changesgood linting:black .should be happybumpsemantic versionget pr reviewedmerge to masterpull master locally and runpoetry publishwith the TP pypi credentials
Package: trustpilotreviews
TrustPilotReaderUnofficial TrustPilot reviews collector. For Academic Use Only. READ:TrustPilot Terms of UseDisclamer:You, and you alone, are responsible for following TrustPilot terms and using this tool to gather their data. Respect
their servers and be thoughtful when gathering large amount of data.Unmatured Documetation :)This code implements basic data scraping of TrustPilot [default:Danish] Reviews .It is a prototype to be used for academic reasons only.
TrustPilot offers APIs to gather their dataGet it from PyPIpipinstalltrustpilotreviewsHow to use it:Import packagefromtrustpilotreviewsimportGetReviews1. Initiat ClassInitiate the class with either (a) passing a dictionary of companies as keys
and companies TrustPilot id as items or (b) adding them with dictionary syntax.e.g.# way a: Using dictionary with business idsid_dict={'Skat':'470bce96000064000501e32d','DR':'4690598c00006400050003ee'}d=GetReviews(id_dict)# ids dictionary can be loaded from text files e.g.lines=np.genfromtxt('data/business_ids.csv',delimiter=',',dtype=str,skip_header=1)#skipped headercsv_dict={key:itemforkey,iteminlines}d=GetReviews(csv_dict)# way b: Using dictionary assignmentd=GetReviews()d['Skat']='470bce96000064000501e32d'No business ids, no problem:fromtrustpilotreviewsimportGetReviews# Initiate it. Language will be requiredt=GetReviews()# Pass in web-page address as it appears in trustpilot.commate_id=t.get_id('www.mate.bike')# Check if everything is okifmate_id.ok:print(mate.business_id)# Gather data from that iddata=t.get_reviews()Having multiple websites, well, no problem:fromtrustpilotreviewsimportGetReviewst=GetReviews()# pass multiple web-pages as a listids=t.get_ids(['www.ford.dk','www.mate.bike'])print(ids)# same as print(t) as ids are added to que# gather data for those idsdata=t.get_reviews()Want to save it on a database instead of Pandas, done:fromtrustpilotreviewsimportGetReviewst=GetReviews()ids=t.get_ids(['www.ford.dk','www.mate.bike'])# mine data for those idst.get_reviews()# send them to in memory databaset.send_db('../data/','reviews')2. Reading Datadf=pd.DataFrame(t.dictData)or from stored sourcedf=pd.read_pickle('TrustPilotData.pkl')A full example:importnumpyasnpfromtrustpilotreviewsimportGetReviews# Dictionary from Datalines=np.genfromtxt('companies_ids.csv',delimiter=',',dtype=str,skip_header=1)csv_dict={key:itemforkey,iteminlines}d=GetReviews(csv_dict)# Select no for Norwegian Reviewsd.gather_data()# Saves as pandas dataframe pickled.save_data(file_name='NoTrustPilotData')TODOs:Allow different saving formats e.g. df.to_XXXSplit page_review funciton into connection and data parsing (better way to handler bad requests)Add more featuresWrite a better documetationTrustPilot Terms of Use
Package: truststore
TruststoreTruststore is a library which exposes native system certificate stores (ie "trust stores")
through anssl.SSLContext-like API. This means that Python applications no longer need to
rely on certifi as a root certificate store. Native system certificate stores
have many helpful features compared to a static certificate bundle like certifi:Automatically update certificates as new CAs are created and removedFetch missing intermediate certificatesCheck certificates against certificate revocation lists (CRLs) to avoid monster-in-the-middle (MITM) attacksManaged per-system rather than per-application by a operations/IT teamPyPI is no longer a CA distribution channel 🥳Right now truststore is a stand-alone library that can be installed globally in your
application to immediately take advantage of the benefits in Python 3.10+. Truststore
has also been integrated into pip as an opt-in method for verifying HTTPS certificates
with truststore instead of certifi.Long-term the hope is to make truststore the default way to verify HTTPS certificates in pip
and to add this functionality into Python itself. Wish us luck!InstallationTruststore is installed fromPyPIwith pip:$ python -m pip install truststoreTruststorerequires Python 3.10 or laterand supports the following platforms:macOS 10.8+ viaSecurity frameworkWindows viaCryptoAPILinux via OpenSSLUser GuideYou can injecttruststoreinto the standard librarysslmodule so the functionality is used
by every library by default. To do so use thetruststore.inject_into_ssl()function:importtruststoretruststore.inject_into_ssl()# Automatically works with urllib3, requests, aiohttp, and more:importurllib3http=urllib3.PoolManager()resp=http.request("GET","https://example.com")importaiohttphttp=aiohttp.ClientSession()resp=awaithttp.request("GET","https://example.com")importrequestsresp=requests.get("https://example.com")If you'd like finer-grained control you can create your owntruststore.SSLContextinstance
and use it anywhere you'd use anssl.SSLContext:importsslimporttruststorectx=truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)importurllib3http=urllib3.PoolManager(ssl_context=ctx)resp=http.request("GET","https://example.com")You can read more in theuser guide in the documentation.LicenseMIT
Package: trustwise
🦉 Trustwise Safety ModuleThe Trustwise Safety Module is a Python package designed to evaluate the RAG pipelines of a Language Model (LLM). It provides an aggregated Safety Score, along with various other individual scores and logs events during the query and index construction of the pipelines. Users can conveniently check event logs and safety score results stored in a MongoDB backend.🔧 InstallationInstall the Trustwise Safety Module using pip:pipinstalltrustwise🔥 FeaturesEvaluate RAG pipelines of an LLM.Aggregated Safety Score calculation.Event logging during query and index construction.Backend storage in MongoDB.Support for bulk scanning of responses from LLMs.🚀 Usage with Llama Indexfromllama_index.callbacksimportCallbackManagerfromtrustwise.callbackimportTrustwiseCallbackHandlerfromtrustwise.requestimportrequest_eval# Initialise Trustwise Callback Handleruser_id="Enter your User ID"experiment_id="Enter your experiment ID"tw_callback=TrustwiseCallbackHandler(user_id=user_id,experiment_id=experiment_id)# Configure the Handler with LlamaIndex Callback Managercallback_manager=CallbackManager([tw_callback])# Rest of the llamaindex code like indexing, llm response generation comes here###### Evaluate LLM responses #######scores=request_eval(user_id=user_id,experiment_id=experiment_id,query=query,response=response)print(scores)🔐 Trustwise API KeyGet your API Key by logging in through Github ->linkContributingWe welcome contributions! If you find a bug, have a feature request, or want to contribute code, please create an issue or submit a pull request.🪪 LicenseThis project is licensed under the MIT License - see the LICENSE file for details.
Package: trusty
TrustyPersistent dictionariesExample Usageimportosimporttrusty# Create a trusty dictionary at location `pack`.pack=trusty.get('pack')# Set a key value pair.pack['food']='lembas'# Persist the dictionary to disk.pack.save()# Confirm that the dictionary was saved.# The `location` specifies the path on disk.print(pack.location)print(os.path.abspath(pack.location))print(os.path.exists(pack.location))We can later retrieve the dictionary like so:importtrustynew_session=trusty.get('pack')print(new_session)# We can then further edit the data, and store it to the same location.new_session['supplies']='taters'new_session.save()
Package: trustyai
python-trustyaiPython bindings toTrustyAI's explainability library.SetupPyPiInstall from PyPi withpipinstalltrustyaiTo install additional experimental features, also usepipinstalltrustyai[extras]LocalThe minimum dependencies can be installed (from the root directory) withpipinstall.If running the examples or developing, also install the development dependencies:pipinstall'.[dev]'DockerAlternatively create a container image and run it using$dockerbuild-fDockerfile-tpython-trustyai:latest.
$dockerrun--rm-it-p8888:8888python-trustyai:latestThe Jupyter server will be available atlocalhost:8888.BinderYou can also run the example Jupyter notebooks
usingmybinder.org:DocumentationCheck out theReadTheDocs pagefor API references
and examples.Getting startedExamplesThere are several working examples available in theexamplesrepository.ContributingPlease see theCONTRIBUTING.mdfile for instructions on how to contribute to this project.
Package: truthbrush
truthbrushTruthbrush is an API client for Truth Social. Truthbrush is built and maintained by theStanford Internet Observatory.Currently, this tool can:Search for users, statuses, or hashtagsPull a user's statusesPull the list of "People to Follow" or suggested usersPull "trending" hashtagsPull "trending" Truth postsPull adsPull a user's metadataTruthbrush is designed for academic research, open source intelligence gathering, and data archival. It pulls all of the data from the publicly accessible API.InstallationTruthbrush is not yet available on PyPI. To install it, runpip install git+https://github.com/stanfordio/truthbrush.git, or clone the repository and runpip3 install .. Provided yourpipis setup correctly, this will maketruthbrushavailable both as a command and as a Python package.Note that Truthbrush requires Python 3.9 or higher.After installation, you will need to set your Truth Social username and password as environmental variables.export TRUTHSOCIAL_USERNAME=fooexport TRUTHSOCIAL_PASSWORD=barYou may also set these variables in a.envfile in the directory from which you are running Truthbrush.CLI UsageUsage: truthbrush [OPTIONS] COMMAND [ARGS]...

Options:
  --help     Show this message and exit.


Commands:
  search       Search for users, statuses or hashtags.
  statuses     Pull a user's statuses.
  suggestions  Pull the list of suggested users.
  tags         Pull trendy tags.
  trends       Pull trendy Truths.
  ads          Pull ads.
  user         Pull a user's metadata.Search for users, statuses, or hashtagstruthbrushsearch--searchtype[accounts|statuses|hashtags]QUERYPull all statuses (posts) from a usertruthbrushstatusesHANDLEPull "People to Follow" (suggested) userstruthbrushsuggestionsPull trendy tagstruthbrushtagsPull adstruthbrushadsPull all of a user's metadatatruthbrushuserHANDLEContributingContributions are encouraged! For small bug fixes and minor improvements, feel free to just open a PR. For larger changes, please open an issue first so that other contributors can discuss your plan, avoid duplicated work, and ensure it aligns with the goals of the project. Be sure to also follow thecode of conduct. Thanks!Development setup (ensure you havePoetryinstalled):poetryinstall
poetryshell
truthbrush--help# will use your local copy of truthbrushIf you prefer not to install Poetry in your root environment, you can also use Conda:condacreate-ntruthbrush-envpython=3.9
condaactivatetruthbrush-env

condainstall-cconda-forgepoetry
poetryinstallTo run the tests:pytest# optionally run tests with verbose logging outputs:pytest--log-cli-level=DEBUG-sPlease format your code withblack:black.WishlistSupport for the following capabilities is planned:...nothing right now! (Got an idea? Submit an issue/PR!)
Package: truthdiscovery
truthdiscoverytruthdiscoveryis a Python3 library that implements various truth discovery
algorithms.A truth discovery problem consists ofa number ofsourcesa number ofobjectsfor each source, a set ofclaimsmade by the source, with each claim
relating to a distinct objectAn object may be associated with multiple (conflicting) claims from different
sources, in which case it is not clear up front which is the true claim. It is
typically assumed that there is only one true claim for each object.Truth discovery addresses this by using the network of sources, claims and
objects to determine thetrustworthinessof sources, thebeliefin each
claim, and the true claim for each object.The general principle for most algorithms is that trustworthy sources make
believably claims, and believable claims are made my trustworthy sources.Most approaches areunsupervised, in that they do not use any prior knowledge
for the trustworthiness of sources etc.InstallationThis package should be installed withpip(using Python 3). It is recommended
to work in avirtualenvto
avoid conflicts with globally-installed packages:$ git clone <this repo>
$ cd truthdiscovery
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -e .Usage and documentationSee thefull documentation on readthedocs
Package: truthordare.py
📝 InfoAn easy to useTruth or Dare APIwrapper written inPython.💫 Main FeaturesVery easy to useCovers entire API⬇️ InstallationPython v3.8 or above is recommended# Windows

py -3 -m pip install truthordare.py





# Linux/macOS

python3 -m pip install truthordare.py🔃 Importimporttruthordare✅ CommandsYou can use the following Funtions :- truth() | dare() | paranoia() | wyr() | nhie()👼Exampleimporttruthordareprint(truthordare.truth())print(truthordare.dare())print(truthordare.nhie())print(truthordare.wyr())print(truthordare.paranoia())🔎 With rating parameterimporttruthordareprint(truthordare.truth("PG"))Valid Paramaters are: - "PG" , "PG13" , "R"☑️ Output Log (Example){'id':'ku9abgpkwrf4','type':'PARANOIA','rating':'PG','question':"Who's most likely to enjoy reading over watching movies?",'translations':{'bn':'কার সিনেমা দেখার চেয়ে বেশি পড়তে ভালো লাগে?','de':'Wer liest am ehest ten, anstatt sich Filme anzusehen?','es':'¿Quién es más probable que disfrute leyendo en lugar de ver películas?','fr':"Qui est le plus susceptible d'apprécier la lecture plutôt que de regarder des films\xa0?",'hi':'फिल्मेें देखने के बजाय पढ़ने का आनंद लेने की सबसे अधिक संभावना किसे है?','tl':'Sino ang mas malamang na mag-enjoy sa pagbabasa sa panonood ng mga pelikula?'}}
Package: truthtable
TruthtableUsage:
./truthtable.py [-hbn] [--help] [--bool|--numeric]
  -h | --help     Print this message
  -b | --bool     Use boolean values to fill the table
  -n | --numeric  Use numeric values to fill the table(defualt)
  -d | --debug    For printing intermediate representation of expression

Expression syntax:
  Variable name:
    [a-zA-Z]+
  Operations:
    &&  - conjunction
    ||  - disjunction
    ->  - implication
    <-  - converse implication
    <=> - biconditional
    ^   - exclusive disjunction
    ~   - negation
Examples:
    A && B ^ ~(~A || (A<=>C))
    A && B <=> ~(~A -> ~(~B <=> A))
    BC -> A -> C <=> ~(A || (BC && C))
Package: truvari
Toolkit for benchmarking, merging, and annotating Structural Variants📚WIKI pagehas detailed documentation.📈 SeeUpdateson new versions.📝 Read our Papers (#1,#2) to learn more.💻 InstallationTruvari uses Python 3.6+ and can be installed with pip:python3 -m pip install TruvariFor details and more installation options, seeInstallationon the wiki.⏩ Quick StartEach sub-command contains help documentation. Start withtruvari -hto see available commands.The current most common Truvari use case is for structural variation benchmarking:truvari bench -b base.vcf.gz -c comp.vcf.gz -o output_dir/🧬 Truvari Commandsbench- Performance metrics from comparison of two VCFscollapse- Collapse possibly redundant VCF entriesanno- Add SV annotations to a VCFconsistency- Consistency report between multiple VCFsvcf2df- Turn a VCF into a pandas DataFramesegment- Normalization of SVs into disjointed genomic regionsstratify- Count variants per-region in vcfdivide- Divide a VCF into independent shardsphab- Harmonize variant representations using MSArefine- Automated bench result refinement with phab🔎 More InformationAll documentation about Truvari is on theWIKI. Additional information about using Truvari can be found inDiscussions
Package: truverifi
<div align="center"><img src="https://app.truverifi.com/img/truverifi-logo.png" width="250"><h4>Python client library for truverifi</h4></div><p align="center"><a href="https://travis-ci.org/achillesrasquinha/truverifi"><img src="https://img.shields.io/travis/achillesrasquinha/truverifi.svg?style=flat-square"></a><a href="https://coveralls.io/github/achillesrasquinha/truverifi"><img src="https://img.shields.io/coveralls/github/achillesrasquinha/truverifi.svg?style=flat-square"></a><a href="https://pypi.org/project/truverifi/"><img src="https://img.shields.io/pypi/v/truverifi.svg?style=flat-square"></a><a href="https://pypi.org/project/truverifi/"><img src="https://img.shields.io/pypi/l/truverifi.svg?style=flat-square"></a><a href="https://pypi.org/project/pipupgrade/"><img src="https://img.shields.io/pypi/pyversions/truverifi.svg?style=flat-square"></a><a href="https://git.io/boilpy"><img src="https://img.shields.io/badge/made%20with-boilpy-red.svg?style=flat-square"></a></p>### Table of Contents* [Installation](#installation)* [Usage](#usage)* [License](#license)#### Installation```shell$ pip install truverifi```#### Usage##### Application Interface```python>>> import truverifi>>> client = truverifi.API("<YOUR_API_KEY>")>>> client.account(){"balance": 2,"username": "example@test.com","transactions": [{"id": 69,"amount": -1,"timestamp": "2018-07-07T19:30:00Z","description": "Number change to: 111-222-3333"}]}>>> client.line()>>> zip, services = 12345, ["FACEBOOK", "TWITTER"]>>> client.checkService(services, zip)>>> client.lineChangeService(services, zip)>>> client.lineExtend()```#### LicenseThis repository has been released under the [MIT License](LICENSE).---<div align="center">Made with ❤️ using <a href="https://git.io/boilpy">boilpy</a>.</div>