Saravanan666/pypi-org huggingface dataset:
Package: webpage2pdf
This is a simple wrapper of the QWebEngineView(PyQt5) class.It's base on the client/server model.Requirementspython3PyQt5Errors will occur if the version of PyQt5 is too high.CausePyQt5.QtWebEngineWidgetsnot exist.pip install PyQt5==5.10.1Usage#! -*- coding:utf-8 -*-
	from webpage2pdf import RenderManager		
	#must start from __main__
	if __name__=='__main__':
		rm=RenderManager()
		rm.addRender(num=2,showUI=True)
		rm.from_url('http://www.baidu.com/','0.pdf')
		rm.from_html("Hello World!",'1.pdf')
		#rm.from_localFile('html/test.html','2.pdf')
		print('start.')
		rm.waitFinish()
		print('finish all.')
Package: webpage-compressor
What is this ?Web Page Compressor (v0.2) is a Python command line utils to create one page website.What wasn't finish:WPC didn't support "//" comments.Table of ContentsHelpReportsHelpusage:
wpc[-h][-nwebpage][-b[mode]][filePath]positionalarguments:filePathPathofmainfile.

optionalarguments:-h,--helpshowthishelpmessageandexit-nwebpage,--newwebpageGeneratenewWPCenvironment..-b[mode],--build[mode]Buildwebpage.ReportWell the code wasn't rigth writed... So I will see later.
Package: webpage-maker
WebpageMakerDescriptionIt is Python library for generating (rendering) static HTML web pages.What can it do?It can make lots of webpages and render them for you!How can I use it?You can import it using the following code:importwpmakerThen you can use it to create your first HTML webpage created using WebpageMaker!You can also use the following code to create a new HTML object (which is essentially an instance of a class):webpage=wpmaker.newHtmlObj({"head":wpmaker.title("Hello World"),"body":wpmaker.h("Hello, world!")})You can retrieve the generated HTML document at any time through thecodeattribute of this instance. For example:print(webpage.code)And you can find more information in theofficial document.
Package: webpage-searcher
Webpage SearcherDescriptionA library that search for a phrase or a url in an html documentUsageTo search for a url:from webpage_searcher import UrlFinder

html = "<html><a href="https://google.com">google</a></html>"
finder = UrlFinder(html)
results = finder.find("google.com")To search for a phrase:from webpage_searcher import PhraseFinder

html = "<html>hello</html>"
finder = PhraseFinder(html)
results = finder.find("hello")ContributingTo run the tests:Install dev dependencies:poetry install --all-extrasRun the tests:pytest -v
Package: webpageshot
webpageshotTake screenshot of webpagewebpageshot是一个抓取整个网页截屏的工具示例抓取Google主页$ webpageshot --url https://www.google.com/结果如下使用方式usage: webpageshot [-h] [--url URL] [--outfile OUTFILE]

optional arguments:
  -h, --help         show this help message and exit
  --url URL          page url
  --outfile OUTFILE  output image location安装$ pip install webpageshotLicenseMIT
Package: webpagetester
<gitlab-url>/-/settings/ci_cdInstallpipinstallwebpagetesterTestwebpagetester-ftests/files/working_urls.txt-ftests/files/special_urls.txt-ftests/files/wrong_urls.txt-oreport.txtUsageenter:webpagetester--helpto see all current options.Test single URLswebpagetester-phttp://google.de-phttps://google.de-phttp://this.does.not.exitReturns:http://google.deWebsiteexists
https://google.deWebsiteexists
http://this.does.not.exitWebsitedoesnotexist
PressEntertoclose...From FileCreate a file with an unknown url in each line.pages.txt:http://google.de
https://google.de
http://this.does.not.exitThen use the following command:webpagetester-fpages.txt-oreport.txtReturns:http://google.deWebsiteexists
https://google.deWebsiteexists
http://this.does.not.exitWebsitedoesnotexist
PressEntertoclose...and in report.txt:FOUND:
======
http://google.de
https://google.de


NOT FOUND:
==========
http://this.does.not.exitSaving a "Screenshot"Create a file with an unknown url in each line.Then use the following command:webpagetester-phttps://google.de-sTrueReturns:http://google.deWebsiteexists
PressEntertoclose...and ahttps#$$google_de.html-file
Be aware that links still work so to be safe only look at the files without internet!Comparing Linkslinks-ttests/files/target.txt-ctests/files/compare3.txt-ctests/files/compare2.txt-oresult.txtTestingpython setup.py testPublishingpythonsetup.pysdistbdist_wheel
twineuploaddist/*TODOpage scanneronion urlsvpnstem.torproject.orgorhttps://medium.com/@jasonrigden/using-tor-with-the-python-request-library-79015b2606cb
Package: webparser-py
A web content parser using Python lxmlCompatibility-------------The library is compatible with Python3. Python2 is currently not supported.Usage-----Install the package using pip.```pip install webparser-py```**Convert to Document**Accept the html content document, convert it to the doc element, if we want to convert relative links to absolute links,we pass the domain url to the absolute links.**convert_to_doc()**```from webparser.parser import convert_to_docdoc = convert_to_doc('HTML content', 'http://yourwebsite.com')```**class FeedParser()**Feed parser class is used for parsing the feed through the response content or using a URL.```from webparser.parser import FeedParserfeed = FeedParser() # optional feed URL can be provided.parsed_links = feed.parse(url='http://viralnova.com/feed') # url will override constructor feed URL.```**has_rss_feed()**Check if the website/URL has a RSS feed link present.- Check the document with Mimetype of links using XPATH.- Fuzzy URL search e.g /feed at the end of the website URL. (Attempted if no links for the RSS URL found)```from webparser.parser import has_rss_feedrss_links = has_rss_feed(doc=html_content, url=website_url)```
Package: webpay
webpayWebPay is payment gateway service in Japan. See alsohttps://webpay.jp/.RequirementsCPython 2.6, 2.7, 3.2, 3.3, 3.4Installation$ pip install webpayUsageSeeour homepage.Dependencieskennethreitz/requestsLicenseThe MIT license, Copyright (c) 2014-2015 WebPay.
Package: webpay-bahamta
InstallationInstall from PyPI:pipinstallwebpay-bahamtaFor async support:pipinstallwebpay-bahamta[async]UsageSimple example:fromwebpayimportWebpayAPIAPI_KEY="webpay:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz"webpay=WebpayAPI(API_KEY)# Make a paymentpayment_url=webpay.payment(reference='payment#1',amount_irr=100000,callback_url='https://example.com',payer_mobile='+989111111111',# Optionaltrusted_pan=None# Optional)# Verify paymenttry:payment_data=webpay.verify(reference='payment#1',amount_irr=100000)ifpayment_data.get("status")=="paid":print("Payment confirmed")else:print("Payment not confirmed")exceptExceptionasexc:ifexc.error_key=='NOT_CONFIRMED':print("Payment not confirmed")else:raiseexcAsync example:importasynciofromwebpayimportAsyncWebpayAPIAPI_KEY="webpay:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz"webpay=AsyncWebpayAPI(API_KEY)asyncdefmain():# Make a paymentpayment_url=awaitwebpay.payment(reference='payment#1',amount_irr=100000,callback_url='https://example.com',payer_mobile='+989111111111',# Optionaltrusted_pan=None# Optional)# Verify paymenttry:payment_data=awaitwebpay.verify(reference='payment#1',amount_irr=100000)ifpayment_data.get("status")=="paid":print("Payment confirmed")else:print("Payment not confirmed")exceptExceptionasexc:ifexc.error_key=='NOT_CONFIRMED':print("Payment not confirmed")else:raiseexcloop=asyncio.get_event_loop()loop.run_until_complete(main())payment_url will be like:https://webpay.bahamta.com/api/…payment_data will be like:{"state":"paid","total":1000000,"wage":5000,"gateway":"sep","terminal":"11223344","pay_ref":"GmshtyjwKSu5lKOLquYrzO9BqjUMb/TPUK0qak/iVs","pay_trace":"935041","pay_pan":"123456******1234","pay_cid":"77CB1B455FB5F60415A7A02E4502134CFD72DBF6D1EC8FA2B48467DFB124AA75A","pay_time":"2019-11-12T16:39:57.686436+03:30"}API Documentationhttps://webpay.bahamta.com/doc/api
Package: web-payments-connector
web-payments-connectorThis project is a fork from django-payments.
Because the whole structure changes in a
backward incompatible manner, I forked.Features:small framework agnostic connectormore flexibleshipping and billing addressaddresses generated by function; this allows reuse of other framework componentsdynamic url generationnew not so generic name (web_payments)better test facilitiescan hold bitcoins and weak currenciesmore security features (safe xml parsing, hidden credentials)framework independent translationbetter documented API (source code)threading safe, token cache facilityextra attributes on providers, helping integrationDocumentationSeehttps://devkral.github.io/web-payments-connector/TODOporting backendsdjango-oscar integrationNote: I use semantic versioning.
Package: webpet
WebpetSimple async web framework for pythonThis is my pet project and it doesn't pretend to be seriousLinksViewsRoutersExceptionsRequestsSimple Usage examplefromwebpet.applicationimportASGIApplicationfromwebpet.confimportConfigurationfromwebpet.responseimportHTTPResponsefromwebpet.routersimportHTTPRouter,URLfromwebpet.viewsimportView,LongPoolView,TemplateViewimportasyncioimportjsonimportrandomimportosBASE_DIR=os.getcwd()+'/'classIndex(TemplateView):template_name='index.html'classAboba(View):asyncdefget(self):raiseValueError()classTestLong(LongPoolView):asyncdefget(self):awaitself.open(status_code=200,headers=[(b'Content-type',b'application/json')])data=[]ticks=0whileTrue:ticks+=1number=random.randint(0,1000)data.append(number)ifnumber>=500:awaitself.send(HTTPResponse(json.dumps({'data':data,'ticks':ticks})))breakelse:awaitasyncio.sleep(1)router=HTTPRouter(routes=[URL('/',Index),URL('/aboba',Aboba),URL('/longpool',TestLong)])configuration=Configuration()configuration.router=routerconfiguration.templates_dir=BASE_DIR+'templates/'app=ASGIApplication()To run with daphne usepipinstalldaphne
daphne<application_name>:<ASGIApplicationinstance>
Package: webpi
webpi-web-backendDevelopmentInstall python of the version defined in../.python-version. You can do that withpyenv.Create a virtual environment and activate it:python-mvenv.venvsource.venv/bin/activateInstall dependencies:pipinstall-e.
pipinstall-rrequirements_dev.txtRun development server:FLASK_ENV=developmentFLASK_APP=webpi/app.pyflaskrunUnit-tests:# This will watch for changespytest-watch# Watched tests without coveragepytest-watch----no-cov# This will run tests only oncepytestLinter:flake8webpitestssetup.pyFormatter:blackwebpi
Package: webpmin
webpminWebPMinifier is a small tool written in pure Python to minify WebP files by stripping out ancillary data, this is similar to the tool:pngminifierbut it operates on WebP instead of PNG files.VP8,VP8L,VP8X,ANIM,ANMF,ALPHchunks escape this filter as these are essential for a
WebP file to work as intended.Some included chunks which fall in extended format section are considered semi-optional because they play the role to make the WebP file function correctly. These are â€”VP8X,ANIM,ANMF,ALPH.InstallationPython must be installed whose version should be over 3.5. On GNU/Linux systems pip not installed by default, make sure that PIP 3 is installed.# replace: pip with pip3, if required.pipinstallwebpminusage: webpmin.__main__ [-h] [--include  | --exclude ] input output

...

positional arguments:
  input       Input file to read WebP data from
  output      Output file to write WebP data to

optional arguments:
  -h, --help  show this help message and exit
  --include   Include user-defined chunks separted with commas. If chunk
              names are over four bytes, latter ones are excluded. By default
              ANIM, ANMF, ALPH (semi essential chunks) will escape this filter.
  --exclude   Exclude user-defined chunks separte with commas.
              Still, essential chunks will escape this filter.Some examples of using this tool:$webpminin.webpout.webp# Include embedded color profile and XMP data.$webpminin.webp--include"ICCP,XMP "out.webp# Exclude EXIF tags, syntax is same as --include.$webpminin.webp--exclude"EXIF"out.webp
Package: web-poe-api
web_poe_apisome useful api from poe.comimport os
from web_poe_api import use_bot,refresh_bot,create_bot
import json
import re

################################################
Path = os.path.dirname(os.path.abspath(__file__))
cookie = 'p-b=cktSb3s2AtYuPthsaZURfQ%3D%3D'
poe_formkey = '130f5fe51cb31eeeb056890004a17a89'
poe_tchannel =  'poe-chan53-8888-ejnafarqnmuzwuvbncmf'
#封包原函数，方便使用
def create_mybot(nickname,prompt,model):
    return create_bot(nickname=nickname,prompt=prompt,model=model,dict_path=rf'{Path}\bot_dict.json',cookie=cookie,poe_formkey=poe_formkey,poe_tchannel=poe_tchannel)

def use_mybot(query,bot):
    with open(rf'{Path}\bot_dict.json', 'r') as f:
        bot_dict = json.load(f)
        return use_bot(query,bot,bot_dict=bot_dict,cookie=cookie,poe_formkey=poe_formkey,poe_tchannel=poe_tchannel)
    
def refresh_mybot(nickname):
    with open(rf'{Path}\bot_dict.json', 'r') as f:
        bot_dict = json.load(f)
    refresh_bot(nickname,bot_dict,cookie,poe_formkey=poe_formkey,poe_tchannel=poe_tchannel)
################################################
# 创建bot，参数依次为nickname，预设prompt，模型（gpt3_5或者claude）
# create_mybot("xhssss","省略一下~~~",'gpt3_5')
# 参数为nickname
# refresh_mybot('xhssss')
# 参数为问题query，nickname询问对象
last_answer,chat_suggest,chat_list_text,chat_list_raw = use_mybot(query="你是谁",bot='xhssss')
print(last_answer)
print(*chat_suggest)
Package: web-poet
web-poetis a Python 3.8+ implementation of thepage object patternfor
web scraping. It enables writing portable, reusable web parsing code.See thedocumentation.DevelopingSetup your local Python environment via:pip install -r requirements-dev.txtpre-commit installNow everytime you perform agit commit, these tools will run against the
staged files:blackisortflake8You can also directly invokepre-commit run –all-filesortox -e lintersto run them without performing a commit.
Package: webportal-utils
webportal-utilsПакет утилит для работы сервисов веб-портала и связанных с ними проектов.КонфигурацияДля корректной работы пакета необходимо задать данные переменные окружения:Переменная окруженияОписаниеЗначение по умолчаниюMICROSERVICE_SETTINGSПуть к модулю настроек проекта отно-settings-сительно корня проекта. (Разделениечерез точку: module1.module2.settings)После получения модуля настроек сервиса, пакет будет искать следующие переменные.
Их нужно указать в ваших настройках, если вы не хотите использовать значения по умолчанию:Переменная в настройкахОписаниеЗначение по умолчаниюSERVICE_NAMEИмя использующего сервиса""LOGGING_MIXIN_DECORATEСписок методов для обработки декоратором[]BLOCK_RECORD_TIMEOUTСрок блокировки редактирования записи Django Admin (сек)600CROP_LOGОбрезка логов по максимальной длинеTrueMAX_LOG_ARG_LENGTHМаксимальная длина аргумента лога25000SOLR_LOGS_URLАдрес Solr с указанием ядра для логовhttp://127.0.0.1:8983/solr/logsSOLR_LOGS_MAX_LENGTHМаксимальная длина лога при записи в Solr25000CropLoggerПо умолчанию класс логгера - CropLogger. Данный логгер обрезает аргументы, переданные при вызове логгера, по максимальной длине, указанной в MAX_LOG_ARG_LENGTH. Чтобы отключить данное поведение, следует установить CROP_LOG в значение False.LoggingMixinМиксин, который автоматически логирует выходные и выходные данные методов, указанных в LOGGING_MIXIN_DECORATESolrFormatter | SolrHandlerФорматтер и обработчик логгера для Solr. Для использования указать путь к данным классам в настройках логгера:
"solr": {
"()": "wp_utils.logging.solr.SolrFormatter",
"format": ...,
}RecordEditorLockБлокировщик редактирования записей в DjangoAdmin. Использовать вместо стандартного admin.ModelAdmin. Максимальное время блокировки записи задается параметром BLOCK_RECORD_TIMEOUT.
Package: webp-support
webp_supportedQuickly determine whether Webp is supported from UserAgent.support webp browser listFireFox >= 65Chrome >= 32Edge >= 18AppleWebKit >= 605 # Safari 14OPR >= 19UCBrowser >= 12SamsungBrowser >= 4QQBrowser >= 10usingwebp_supported(user_agent: bytes) -> boolexample:fromwebp_supportimportwebp_supporteduser_agent=b"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"webp_supported(user_agent)# Chrome > 32 -> True
Package: webpty
webptyWeb based application to access shell & shell based applications via a browser.InstallationUsepipand install webpty.pipinstallwebptyUsagewebptyCreates a tornado server which will be serving bash shell onhttp://localhost:8000/Change Shellwebpty-c$SHELLorwebpty--cmd=$SHELLThis $SHELL can be bash, sh, python, vim, wtfutil, etc. that is available in the system.Change Portwebpty-p$PORTorwebpty--port=$PORTCreates a tornado server that server on the specified porthttp://localhost:$PORT/Change Allowed HostsBy default, server will accept request from all the hosts without any restriction, to make it accept only from certain hosts,webpty-ah$ALLOWED_HOSTSorwebpty--allowed-hosts=$ALLOWED_HOSTSServer accepts only requests from $ALLOWED_HOSTS. This $ALLOWED_HOSTS should be list of strings seperated by a comma.ScreenshotsBashPythonVimContributingPull requests are welcome. Raise a issue and start a discussion before submitting a pr.
Package: webpub-manifest-parser
python-webpub-manifest-parserA parser for theReadium Web Publication Manifest (RWPM)andOpen Publication Distribution System 2.0 (OPDS 2.0)formats.UsageInstallpyenvInstall one of the supported Python versions mentioned in.python-versionor other PATCH versions of the same MINOR versions:pyenvinstall<python-version>Installpyenv-virtualenvpluginCreate a virtual environment:pyenvvirtualenv<virtual-env-name>
pyenvactivate<virtual-env-name>Install the librarypipinstallwebpub-manifest-parserSetting up a development environmentRunning tests using toxMake sure that a virtual environment is not activated and deactivate it if needed:deactivateInstalltoxandtox-pyenvglobally:pipinstalltoxtox-pyenvMake your code prettier using isort and black:makereformatRun the linters:makelintTo run the unit tests use the following command:maketest-<python-version>where<python-version>is one of supported python versions:py27py36py37py38For example, to run the unit test using Python 2.7 run the following command:maketest-py27
Package: webpurify-cli
https://www.webpurify.com/Profanity Check for text and image along with Content ModerationGetting itTo download, either fork this github repo or simply use Pypi via pip.$pipinstallwebpurify-cliUsing itUsage: webpurify-cli [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  addwordtoblacklist       This function is used to add a word to the set
                           of...

  addwordtowhitelist       This function adds a word to an 'allowed' list...
  checkimage               This fuction submits an image to the checked for...
  checkimagestatus         This fuction should be used to poll the
                           webPurify...

  checknudityinimage       This function checks the % of nudity in an image
  checktext                This function should be used to check a string
                           or...

  removewordfromblacklist  This fuction removes a word added either through...
  removewordfromwhitelist  This function removes a word to an 'allowed'
                           list...

  replacetext              This function is used to replace profanity in
                           the...Home-page:https://github.com/rrajaravi/webpurify-cli.gitAuthor: Raja Ravi
Author-email:r.rajaravi@gmail.comLicense: MIT
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Package: webpush
WebPush-PySimple library for working withWebPushin pythonUsageInstallationpipinstallwebpushBasic UsageimportrequestsfromwebpushimportWebPush,WebPushSubscriptionwp=WebPush(private_key="./private_key.pem",public_key="./public_key.pem")# example subscription infosubscription=WebPushSubscription.model_validate({"endpoint":"https://fcm.googleapis.com/fcm/send/...","keys":{"auth":"...","p256dh":"..."}})message=wp.get(message='Hello, world!',subscription=subscription)requests.post(subscription.endpoint,data=message.encrypted,headers=message.headers)Generate VAPID keys and get applicationServerKey:vapid-genPrivate key saved inpublic_key.pemand public key saved inpublic_key.pem.
Application Server Key saved inapplicationServerKeysimple usage with fastapiimportaiohttpfromfastapiimportFastAPIfromfastapi.responsesimportJSONResponsefromwebpushimportWebPush,WebPushSubscriptionapp=FastAPI()wp=WebPush(public_key="./public_key.pem",private_key="./private_key.pem",subscriber="admin@mail.com",)@app.get("/notification/key")asyncdefget_public_key()->JSONResponse:application_server_key="<generated from vapid-gen>"returnJSONResponse(content={"public_key":application_server_key})@app.post("/notification/subscribe")asyncdefsubscribe_user(subscription:WebPushSubscription)->JSONResponse:message=wp.get(message="Hello, world",subscription=subscription)asyncwithaiohttp.ClientSession()assession:awaitsession.post(url=str(subscription.endpoint),data=message.encrypted,headers=message.headers,)returnJSONResponse(content={"status":"ok"})FAQWhy do I need another library?The current python libraries that work with Web Push have been written for a very long time, so they do not support typing, try to support outdated encryption algorithms and pull a lot of deprecated dependencies.Why is onlyaes128gcmsupported?According to theRFC8192, this is the recommended format. At the moment, all modern systems support this encryption.Will there be support for other encryption modes?New, yes, but there are no old ones, for exampleaesgcmWho is this library for?You need type support, you're writing a modern backend, minimum number of dependencies.And last one, if you have ideas for improvements, bug fixes, feel free to contribute.Change log1.0.0 - initial releaseCreditspywebpushhttp-ece
Package: webpush-channels
WebPush Channels BroadcastBroadcast push notifications to multiple WebPush subscriptions.DocumentationChangelogThis document describes changes between each past release.0.1.0 (2017-02-22)Protocol is now version 0.1. SeeAPI changelog.Initial versionSettings up the project based on kinto.core (#6)Add the subscription management API (#10)Add the channel registration management API (#12)Add the channel notification management API (#16)Handle empty payloads (#26)Handle duplication of subscriptions (#27)
Package: web.py
web.py is a web framework for Python that is as simple as it is powerful.Visithttp://webpy.org/for more information.The latest stable release0.62only supports Python >= 3.5.
To install it, please run:# For Python 3
python3 -m pip install web.py==0.62If you are still using Python 2.7, then please use web.py version 0.51
which is intended to be our last release that supports Python 2.# For Python 2.7
python2 -m pip install web.py==0.51You can also download it fromGitHub Releasespage, then install it manually:unzip webpy-0.62.zip
cd webpy-0.62/
python3 setup.py installNote:0.5x(e.g. 0.50, 0.51) are our last releases which support Python 2.
Note:0.6x(e.g. 0.60, 0.61, 0.62) are our last releases which support Python 3.5.
Package: web.py-modules
Optional extensions for web.py framework.InstallUse pip:pip install web.py-modulesor do it manualy:wget https://github.com/PetrHoracek/webpy-modules/archive/v0.1.1.tar.gz
tar -zxvf web.py-modules-v0.1.1.tar.gz
cd web.py-modules-v0.1.1
python setup.py installor just download package and pastewebmodfolder into your project.UsageThis package contains independent modules which you can import to your project.
Of course it’s dependent on web.py package.importwebmodfromwebmodimportmodulename,othermodulenameYou can find details in docs.auth- handles basic requirements for users and access rights management.