Saravanan666/pypi-org huggingface dataset:
Package: requestXpath
Welcome to requestXpath !IntroducePackage name:requestXpathIntroduction: Inherit the requests module, add xpath functionality to expand the API, and handle request failures
and retriesProTip:Request to carry random useragent by default.Introduction to UsageArgsValuesnotesmethodExamle: "get" or "post" Type: stringRequest MethodurlExamle: "http://www.example.com" Type: stringRequest UrlheadersType: dictDefault Random Request HeaderdataType: dict or stringRequest parametersencodingDefault: "utf-8" Type: stringRequest Encodingretry_timeDefault: 3 Type: intRetry Countretry_intervalDefault: 1 Type: intRetry IntervaltimeoutDefault: 3 Type: intRequest timeoutothers*args or **kwargsFollow RequestsGet startedInstall Package: pip install requestXpath
Make a request:from requestXpath import prequests
url = 'https://gitee.com/'
response = prequests.get(url=url)GET Status Coderesponse.status_codeGET Textresponse.textGET Contentresponse.contentGET Urlresponse.urlGET Historyresponse.historyGET Headersresponse.headersGET Text Lengthresponse.get_lenGET Lxml Treeresponse.treeXpath ApiExamplefrom requestXpath import prequests  
url = 'https://www.runoob.com/python3/python3-tutorial.html'  
response = prequests.get(url=url)  
tree = response.tree  
title = tree.xpath("//div[@id='content']/h1")
print(title)
# Python 3 教程xpathparameter： x：xpath； filter：xpath filter；character： line feed；rule：re rule；is_list：reture listAccording to Xpath syntax defaults to extracting text or @href，No //text() or /text()content = tree.xpath("//div[@class='tutintro']", filter="strong")
 <class 'str'>
 # Python 的 3.0 版本，常被称为 Python 3000，或简称 Py3k。相对于 Python 的早期版本，这是一个较大的升级。为了不带入过多的累赘，Python 3.0 在设计的时候没有考虑向下兼容。
 # ......
 # Python 2.X 版本的教程
 # 。We can find it's gone strong node textis_list: return listcontent = tree.xpath("//div[@class='tutintro']", filter="strong", is_list=True)
 <class 'list'>
 # ['Python 的 3.0 版本，常被称为 Python 3000，或简称 Py3k。相对于 Python 的早期版本，这是一个较大的升级。为了不带入过多的累赘，Python 3.0 在设计的时候没有考虑向下兼容。', 'Python 介绍及安装教程我们在', 'Python 2.X 版本的教程', '中已有介绍，这里就不再赘述。', '你也可以点击', 'Python2.x与3\u200b\u200b.x版本区别', '来查看两者的不同。', '本教程主要针对 Python 3.x 版本的学习，如果你使用的是 Python 2.x 版本请移步至', 'Python 2.X 版本的教程', '。']xxpathNative official usagetree.xxpath("xpath")dpathDate extractiontree.dpath("xpath")Please contact me if there are any bugsemail ->1944542244@qq.com
Package: requestz
Requestz基于pycurl封装的http请求包特性dns解析时间/连接时间/下载时间等更多的响应统计信息响应对象自带find支持xpath/jsonpath/re响应及其中字段支持jsonschema验证自带一个runnertodosession默认值filescookieshooks on errordubbosoupwebsocketxml-rpcjsonpath, re, xpath提取jsonschema验证并行多轮runnertype_checkrun_by_unittest
Package: requezts
requeztsHTTP client over encrypted P2P sockets usingZeroTierrequeztsis built on Kenneth Reitz'srequestslibrary, and mirrors its simple and powerful interface:import requezts

with requezts.Session(net_id=0x0123456789abcdef) as session:
    response = session.get("http://10.144.174.53:8000/index.html")Usingrequezts'Sessionobject as a context manager, you can easily establish connectivity to a ZeroTier network, while also receiving all the benefits of the underlyingrequests.session.Session(cookie persistence, connection pooling, and configuration).Installationpip install requeztsDocumentationSee documentation onReadTheDocs.ContributionsThis project is open-source and contributions are welcome. Therequeztslibrary is hosted onGitLab.
Package: require
require is a framework for module definitions.== Overview ==It allows to publish dependencies. A function can be decorated to requiredependencies by its name.== Usage ==A requirement must be exported using the @export(...) decorator. The decoratedfunction will be called on the first time it is required and the result iscached for later use. It's also possible to decorated a class or anything elsewhich is callable.To require a dependency the @require(...) decorator can be used. This decoratorexpects a mapping between parameter names and dependencies. If the decoratedfunction is called, the requirements are resolved and the returned values arepassed to the decorated function. The parameter name used to pass the resolvedrequirements are the same names as used to specify the requirements.It is possible to extend and manipulate an export using the @extend(...)decorator. After calling the exported function, the return value is passed toall defined extends for this dependency. The extend function can manipulate theobject or replace it with another one.== Example ==file: example/foo.pyfrom require import export@export()def my_export():# This function will be called on first requirementreturn 'exported object'file: example/bar.pyfrom require import extend@extend('example.foo:my_export')def extend_my_export(my_export):# The passed parameter is the result of the required function# If the extend function returns a new value, the export is replaced by itreturn 'extended and ' + my_exportfile: example/baz.pyfrom require import require@require(my_fancy_export = 'example.foo:my_export')def my_user(my_fancy_export):# Parameter 'my_fancy_export' must match the name in the decorator# This will print 'extended and exported object'print(my_fancy_export)
Package: requirejs
Run RequireJS (r.js) from Python without requiring Node or Rhino.
LeveragesPyMiniRacerplus a
minimalJS
environmentto make r.js think it’s running in node.Usagepython-requirejsis available via PyPI:pipinstallrequirejsAPIimportrequirejsrequirejs.optimize(appDir=".",baseUrl="js/",modules=[{"name":"main",}]dir="../build",)Hopefully, all of theavailable build options for
r.jswill Just
Work. If you find any discrepancies, pleaseopen a
ticketto let us
know.This library is meant to be a drop-in replacement fornode r.js-oapp.build.json, and is tested by comparing its output
with that command. However, since the optimize API is being called as a
function, you may need to set the working directory explicitly to avoid
any unexpected differences in how relative paths are computed:importrequirejsimportjsonwithopen('app/app.build.json')asf:config=json.load(f)requirejs.optimize(config,working_directory="app/"# Unique to python-requirejs)
Package: requirements-builder
AboutBuild requirements from setup.py to test your package against minimum,
latest and development versions of your package dependencies. Particularly
useful when combined with your CI systems build matrix.Full documentation atrequirements-builder.readthedocs.ioInstallationRequirements-Builder is on PyPI so all you need is:$ pip install requirements-builderOr, if you have virtualenvwrapper installed:$ mkvirtualenv requirements-builder
$ pip install requirements-builderTestingRunning the test suite is as simple as:$ ./run-tests.sh
Package: requirements-checker
requirements_checker (v0.1.10)DESCRIPTION_SHORTcheck if requirements metDESCRIPTION_LONGdesigned for check requirements (systemOs) and raise/bool if no matchFeaturescheck requirements (systemOs), raise/bool if no matchcreate fuck(?)/getter and is it for check for settingspython packages work:upgradedeleteversion_getcheck_installed)upgrade pip...see tests for this!LicenseSee theLICENSEfile for license rights and limitations (MIT).Release historySee theHISTORY.mdfile for release history.Installationpip install requirements-checkerImportfromrequirements_checkerimport*USAGE EXAMPLESSee tests and sourcecode for other examples.1. example1.pyfromrequirements_checkerimport*ReqCheckStr_Os().bool_if__WINDOWS()ReqCheckStr_Os().bool_if_not__WINDOWS()ReqCheckStr_Os().raise_if__LINUX()classReqCheckStr_Os_MY(ReqCheckStr_Os):LINUX:bool=TrueWINDOWS:bool=FalseReqCheckStr_Os_MY()# check requirement!
Package: requirements-compare
Requirement CompareA CLI that generate a version changelog based on git history and local requirement file.Installationpipinstall--upgradepip
pipinstallrequirement-compareUsage$requirement-comparerequirements.txt
-Added`last_package`version`1.0.0`-Bump`example_package`from`1.0.0`to`2.0.0`-Removed`another_package`version`1.0.0`
Package: requirements-detector
Requirements DetectorStatusAboutrequirements-detectoris a simple Python tool which attempts to find and list the requirements of a Python project.When run from the root of a Python project, it will try to ascertain which libraries and the versions of those libraries that the project depends on.It uses the following methods in order, in the root of the project:Parsesetup.py(if this is successful, the remaining steps are skipped)Parsepyproject.yoml(if atool.poetry.dependenciessection is found, the remaining steps are skipped)Parserequirements.txtorrequirements.pipParse all*.txtand*.pipfiles inside a folder calledrequirementsParse all files in the root folder matching*requirements*.txtorreqs.txt(so for example,pip_requirements.txtwould match, as wouldrequirements_common.txt)Usagedetect-requirements [path]Ifpathis not specified, the current working directory will be used.OutputThe output will be plaintext, and match that of apip requirements file, for example:Django==1.5.2
South>=0.8
anyjson
celery>=2.2,<3Usage From Python>>> import os
>>> from requirements_detector import find_requirements
>>> find_requirements(os.getcwd())
[DetectedRequirement:Django==1.5.2, DetectedRequirement:South>=0.8, ...]If you know the relevant file or directory,  you can usefrom_requirements_txt,from_setup_pyorfrom_requirements_dirdirectly.>>> from requirements_detector import from_requirements_txt
>>> from_requirements_txt("/path/to/requirements.txt")
[DetectedRequirement:Django==1.5.2, DetectedRequirement:South>=0.8, ...]
Package: requirements-dev
requirements.txtThis is a safeguard against typos when runningpip install-rrequirements-dev.txt. If you leave out the-rby
accident, this package will cause your installation to abort.$ pip install requirements-dev.txt
Collecting requirements-dev.txt
Installing collected packages: requirements-dev.txt
  Running setup.py install for requirements-dev.txt ... error
    Complete output from command:
    running install
    It looks like you meant to type `pip install -r requirements-dev.txt`,
    but you left out the `-r` by accident. Aborting installation.Why?If we had no such package on PyPI, you could accidentally install a
package installed with the name of your requirements file. A malicious
user could register a package that would mimic proper installation
process and also launch anny arbitrary code.PyPI (fortunately) does not allowrequirements.txtas a package
name, so that case is handled already. All forbidden package names that
arehardcoded in PyPI source
codeare:requirements.txtrrequirements.txtrequirements-txtrrequirements-txtBut it obviously does not cover all popular cases. This is why this
sources are distributed on PyPI under few popular names that are not
forbidden by PyPI:requirements-dev.txtrequirements-devrequirements-test.txtrequirements-testDid it ever happen?Yeah. Typo squatting happens on PyPI from time to time. This project is
the best example of that. Previous version ofrequirements.txtactually did something more than aborting its installation. It provided
a specially craftedsetup.pyscript that could:look on your filesystem to find a requirements file you intended to
installinstall all packages in another pip subprocessdisplay output that would mimick normal installation processNewer versions of pip completely swallow all output of package
installation script but thih behavior can be easily bypassed - at least
on OS X and Linux. Also runtime version switch (to0.0.0) allowed to
install this package over and over becasue there was always newer
version available on PyPI. If something went wrong (especially on
Windows) it resulted in crypting and rude error message.Nothing harmful. Actually useful sometimes. At least in my personal
opinion. Anyway my sense of usability and humourwas contested by some
people. This is
whyrequirements.txtwill longer install other packages and always
exit with error code during installation. This is mostly thanks to
pull-request from @aanand andhis
points. I may not
agree with all of them but I respect people’s PRs.Nevertheless, some additional messages may be displayed during
installation attempt. You know… It was made for fun.If you are interested in hacks included in previous version of this
package refer tocontested-sense-of-humourbranch orend-of-funtag in this project’srepository.
Package: requirements-dev.txt
requirements.txtThis is a safeguard against typos when runningpip install-rrequirements-dev.txt. If you leave out the-rby
accident, this package will cause your installation to abort.$ pip install requirements-dev.txt
Collecting requirements-dev.txt
Installing collected packages: requirements-dev.txt
  Running setup.py install for requirements-dev.txt ... error
    Complete output from command:
    running install
    It looks like you meant to type `pip install -r requirements-dev.txt`,
    but you left out the `-r` by accident. Aborting installation.Why?If we had no such package on PyPI, you could accidentally install a
package installed with the name of your requirements file. A malicious
user could register a package that would mimic proper installation
process and also launch anny arbitrary code.PyPI (fortunately) does not allowrequirements.txtas a package
name, so that case is handled already. All forbidden package names that
arehardcoded in PyPI source
codeare:requirements.txtrrequirements.txtrequirements-txtrrequirements-txtBut it obviously does not cover all popular cases. This is why this
sources are distributed on PyPI under few popular names that are not
forbidden by PyPI:requirements-dev.txtrequirements-devrequirements-test.txtrequirements-testDid it ever happen?Yeah. Typo squatting happens on PyPI from time to time. This project is
the best example of that. Previous version ofrequirements.txtactually did something more than aborting its installation. It provided
a specially craftedsetup.pyscript that could:look on your filesystem to find a requirements file you intended to
installinstall all packages in another pip subprocessdisplay output that would mimick normal installation processNewer versions of pip completely swallow all output of package
installation script but thih behavior can be easily bypassed - at least
on OS X and Linux. Also runtime version switch (to0.0.0) allowed to
install this package over and over becasue there was always newer
version available on PyPI. If something went wrong (especially on
Windows) it resulted in crypting and rude error message.Nothing harmful. Actually useful sometimes. At least in my personal
opinion. Anyway my sense of usability and humourwas contested by some
people. This is
whyrequirements.txtwill longer install other packages and always
exit with error code during installation. This is mostly thanks to
pull-request from @aanand andhis
points. I may not
agree with all of them but I respect people’s PRs.Nevertheless, some additional messages may be displayed during
installation attempt. You know… It was made for fun.If you are interested in hacks included in previous version of this
package refer tocontested-sense-of-humourbranch orend-of-funtag in this project’srepository.
Package: requirementsdottxt
#Ever typedpip install requirements.txt(and forgot the-r?)
Never again! Now it just works(tm).#How it works:
Forks from a post-install hook, runspip install --user -r requirements.txtfrom the previous directory (which hopefully is the one from where pip was called) and uninstalls itself so this package can be used multiple times.##This is probably not all that safe. More of a proof of concept/joke, not really intended to be used
Package: requirements-filter
DescriptionRemoves private packages from a generalrequirements.txtfile.UsageAn example of usage is installing private packages. My usual workflow consists ofchanges in the source code,pip freeze > requirements.txtandgit add .andgit commit -m "commit massage".
However, my private packages were included and the CI build would fail because of
the peculiar syntax required to installprivate packages.The private package was manually removed from therequirements.txtand anothercommitwas executed.This package was created to avoid this situation. Storing the private packages
in a different file (e.g.,requirements-private.txt), it removes the
packages already presented insiderequirements-private.txtfrom therequirements.txtavoiding the manual deletion and the commit correcting the change.The recommended use is adding in the.pre-commit-config.yamlfile- repo: https://github.com/mashi/requirements-filter
    rev: v0.0.0  # replace by desired tag version
    hooks:
      - id: rqf
        args: [--filename1, requirements.txt, --filename2, requirements-private.txt]  # example with argumentsIn this way, the packages are checked before thecommitand prevents the inclusion in the version control.Instructions (Development)Create a virtual environment and install the required packages withpython3 -m venv .venv
source .venv/bin/activate
pip install wheel
pip install -r requirements.txt
pre-commit install
Package: requirements-language-server
requirements-language-serverLanguage server forrequirements.txt.Currently python'srequirement.txthas 2 types:PEP508: supported by:setuptoolspip:
supported by:pippip-compileThe difference is thatPEP508 doesn't support pip's options.Forpyproject.toml:[tool.setuptools.dynamic.dependencies]file="requirements.txt"[tool.setuptools.dynamic.optional-dependencies.dev]file="requirements/dev.txt"We recognizerequirements.txtandrequirements/dev.txtas PEP508'srequirements.txts and display errors for all pip's options. For otherrequirements.txts, we recognize them as pip'srequirements.txts.Features:Goto Definition:
jump to first repeated packageFind References:
jump to all other repeated packagesDiagnostic:repeated packagesunsorted packagesinvalid pathpip's option when PEP508 is enabledDocument Formatting:
sort packagesDocument Link:
open package's pypi homepageHoverpip's optionspackage: requirespip-cache.Completion:pip's optionspackage: requirespip-cache.
Mustpip-cache updatebefore.Other features:pre-commit-hookslinterformatterScreenshotsDiagnosticHoverCompletionReadto know more.Related Projectsrequirements.txt.vim:
syntax highlight for vimvim-polyglot: contains abovebat: syntax highlight for lessrequirements-txt-fixer:
sort package names
Package: requirements-parser
Requirements ParserThis is a small Python module for parsingPiprequirement files.The goal is to parse everything in thePip requirement file formatspec.Installationpip install requirements-parserorpoetry add requirements-parserExamplesRequirements parser can parse a file-like object or a text string.>>> import requirements
>>> with open('requirements.txt', 'r') as fd:
...     for req in requirements.parse(fd):
...         print(req.name, req.specs)
Django [('>=', '1.11'), ('<', '1.12')]
six [('==', '1.10.0')]It can handle most if not all of the options in requirement files that
do not involve traversing the local filesystem. These include:editables (-e git+https://github.com/toastdriven/pyelasticsearch.git]{.title-ref})version control URIsegg hashes and subdirectories ([\#egg=django-haystack&subdirectory=setup]{.title-ref})extras ([DocParser[PDF]]{.title-ref})URLsDocumentationFor more details and examples, the documentation is available at:http://requirements-parser.readthedocs.io.Change LogChange log is available on GitHubhere
Package: requirements.py
requirements.pyFind updates for packages in requirements.txt on pypiUsageYou can use the filerequirements.py, simply
runrequirements.pyin a folder that contains arequirements.txtOr runrequirements.py path/to/first/requirements.txt path/to/second/requirements.txtYou can also install the module with its dependencies frompypi.org:pipinstallrequirements.pyOnce installed the module can be used directly withpython -m requirementsor the commandrequirements.It also offers some functions to query pypi and requirements.txt programmatically:importrequirementsrequirements.get_versions("lxml")[<Version('4.9.2')>,<Version('4.9.1')>,<Version('4.9.0')>,<Version('4.8.0')>,...]requirements.parse("lxml == 4.0.0")('lxml','==',<Version('4.0.0')>,'4.0.0',0)requirements.parse_file("requirements.txt")[('lxml','==',<Version('4.9.0')>,'4.9.0',0),('defusedxml','>=',<Version('0.6.0')>,'0.6.0',1)]requirements.check_files(["requirements.txt"]){'defusedxml':{'clause':'=','current_version':packaging.version.Version('0.6.0'),'available_versions':[packaging.version.Version('0.4'),packaging.version.Version('0.4.1'),packaging.version.Version('0.5.0'),packaging.version.Version('0.6.0'),packaging.version.Version('0.7.0'),packaging.version.Version('0.7.1')]},'lxml':{'clause':'==','current_version':packaging.version.Version('4.9.0'),'available_versions':[packaging.version.Version('4.7.1'),packaging.version.Version('4.8.0'),packaging.version.Version('4.9.0'),packaging.version.Version('4.9.1'),packaging.version.Version('4.9.2'),...]}}
Package: requirements-pyconpl2016.txt
|PyPI|Ever did a mistake to ``pip install`` in the terminal when installingpackages from ``requirements.txt`` file like following?::$ pip install requirements.txtCollecting requirements.txtCould not find a version that satisfies the requirement requirements.txt (from versions: )No matching distribution found for requirements.txtNow you wont. Thanks to some nasty hacks and tricks there is a packageon PyPI that handles that. It finds the desired requirements file andinstalls it in your current environment.::echo "gevent" > requirements-dev.txtpip install requirements-dev.txtThis package was made only for trolling so do not expect it to work. Itmay work on Linux and Mac OS X but was not extensively tested. It isalso a one-shot trick so no updates will be installed once you do thatunless you specify a ``-U`` or ``--update`` switch. Happy debugging!PyPI (fortunately) does not allow to upload package named``requirements.txt`` so the only supported name is currently a``requirements-dev.txt``. It still should be quite popular though... |PyPI| image:: https://img.shields.io/badge/downloads-enough-ff69b4.svg:target: