Saravanan666/pypi-org huggingface dataset:
Package: requests-downloader
Python package to download filesFree software: GNU General Public License v3Documentation:https://requests_downloader.readthedocs.io.FeaturesHassle-free download usingrequestsDownload from Drive, Dropbox, Archive or direct URLsNo need to specify a name for the file to be downloadedCommand Line Interface to downloadExternalrequests.Sessionobject can be passedUsageUse in a ProjectGet multiple download options (e.g. forarchive.orglinks):fromrequests_downloaderimportdownloaderdownload_urls,default_idx=downloader.handle_url('<url>')Download a file:fromrequests_downloaderimportdownloaderdownloader.download('<download_url>')Use Console Interfaceusage: smart-dl [-h] [--download_dir DOWNLOAD_DIR] [--download_file DOWNLOAD_FILE]
                [--download_path DOWNLOAD_PATH] [--block BLOCK] [--timeout TIMEOUT]
                [--resume] [--progress] [--checksum CHECKSUM] [--verbose] [--debug]
                [--version] url

positional arguments:
url                   Download URL

optional arguments:
-h, --help            show this help message and exit
--download_dir DOWNLOAD_DIR
                        Specify downloads directory
--download_file DOWNLOAD_FILE
                        Specify filename
--download_path DOWNLOAD_PATH
                        Specify path (ignores _dir or _file arguments)
--block BLOCK         Block size while writing the file, in bytes
--timeout TIMEOUT     Timeout in seconds
--resume              Try to resume the download, if supported
--progress            Show download progressbar
--checksum CHECKSUM   Checksum to verify integrity of the download
--verbose             Enable verbose output
--debug               Enable debug information
--version             show program's version number and exitCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.4.0 (2022-04-28)Option to show filename to the left of progressbarModularize codeStyle: BlackFix bugs0.3.0 (2022-02-11)Several documentation updatesCode refactoringChange console command from clunkyrequests_downloadertosmart-dl0.2.0 (2021-06-08)Improvements in content disposition and content length handlingLogging improvements0.1.7 (2021-06-07)Minor bugfixes and spelling corrections.0.1.5 (2020-11-03)Support for Google Docs (Document, Spreadsheets, Presentations).0.1.4 (2020-09-07)Bugfixes.First Alpha release.0.1.0 (2020-09-05)First release on PyPI.
Package: requests-dump
Provides a hook function to dump HTTP communiation for requests.Please, Please, Please note that this library is in pre-alpha phase and
its interface is subject to change.UsageYou may pass the hook function to a requests’ method function.>>> import requests
>>> import reqdump
>>> requests.get('http://example.com/', hooks=dict(response=reqdump.dump))
> GET http://example.com/
> Accept-Encoding: gzip, deflate, compress
> Accept: */*
> User-Agent: python-requests/2.2.1 CPython/2.7.6 Darwin/13.0.2

< 200 OK
< content-length: 1270
< x-ec-custom-error: 1
< x-cache: HIT
< accept-ranges: bytes
< expires: Tue, 11 Feb 2014 13:41:46 GMT
< server: ECS (sjc/4FB4)
< last-modified: Fri, 09 Aug 2013 23:54:35 GMT
< etag: "359670651"
< cache-control: max-age=604800
< date: Tue, 04 Feb 2014 13:41:46 GMT
< content-type: text/html
<!doctype html>
<html>
(... snip ...)
<Response [200]>
>>>You can also apply patch to all requests’ method functions to use the hook
function.>>> import requests
>>> import reqdump
>>> reqdump.patch()
>>> requests.get('http://example.com/')
> GET http://example.com/
> Accept-Encoding: gzip, deflate, compress
(... snip ...)
<Response [200]>
>>> reqdump.unpatch()  # discard patches
>>> requests.get('http://example.com/')
<Response [200]>
>>>History0.1.3Rename patch() with patch_all() and unpatch() with unpatch_all()Support HTTP methods other than GET0.1.2Add patch() and unpatch() functions0.1.1Support Python 3.30.1Birth!
Package: requests-dump2
Requests DumpDumprequests' http requests message content to stderr or your custom file.You may consider usehttps://toolbelt.readthedocs.io/en/latest/dumputils.htmlinsteadUsageSeetest.py.Custom prettyimport requests
from requests_dump import pretty_request, pretty_response

req = requests.Request('POST', 'http://ip-api.com/json')
print(pretty_request(req))

res = requests.Session().send(req.prepare())
print(pretty_response(res))Inspired byhttps://github.com/requests/requests/issues/3013
Package: requests-ecp
requests-ecpA SAML/ECP authentication handler for python-requests.Release statusDevelopment statusInstallationSeehttps://requests-ecp.readthedocs.io/en/latest/#installationfor installation instructions.Basic usageAttach theHTTPECPAuthobject to yourRequestsSession and the relevant authentication will happen whenever required.>>>fromrequestsimportSession>>>fromrequests_ecpimportHTTPECPAuth>>>withSession()assess:...sess.auth=HTTPECPAuth("https://idp.university.ac.uk/idp/profile/SAML2/SOAP/ECP")...sess.get("https://data.university.ac.uk/mydata.dat")
Package: request-session
request-sessionrequest-sessionis an HTTP library built on top ofrequeststhat makes your live easier by retrying whenever a request fails,
logs the results or even sends metrics and traces to DataDogHQ.RequestSessionalso measures the time of the request.UseRequestSessionto create a client module for accessing a group of resources
served on a common endpoint with default values valid for all or
most of the calls you need to make. For your convenience,
some defaults are already provided.UsageTo installrequest-session, use pip:pipinstallrequest-sessionfromrequest_sessionimportRequestSessionclient=RequestSession(host="https://jobs.kiwi.com",max_retries=4,# how many times to retry in case server error occursraise_for_status=True,# raise an exception if failed on every attempt)response=client.get(path="/",sleep_before_repeat=1,# how many seconds to wait untill next tryrequest_category="jobs",# what to log to stdout/stderr)Benefits of usingRequestSessionRetry: It is possible to configure a retry in case of request failure.Logs: Result of the request can also be logged tostdout.Metrics: On each call you make toGET,POST,PUT,PATCH, andDELETEmethods, several metrics are sent to your datadog client -
duration of the request, how many requests were sent,
outcome of the request (a DataDog integration is needed).Tracing:RequestSessioncan send tracing info to DataDog
(an APM integration is needed).You can find more details aboutRequestSession's benefits and examples inthe official documentation.How to run testTo run all tests you just need to run the commandtox.Note that tox doesn't know when you change therequirements.txtand won't automatically install new dependencies for test runs.
Runpip install tox-batteryto install a plugin which fixes this silliness.
Package: requests-etag
requests-etagWrapper over requests package to support etag caching by defaultInstallpip install requests-etagUsage>>>importrequests_etag>>>res=requests_etag.get('https://example.com/')>>>res.status_code200>>>len(res.text)1527903>>>res=requests_etag.get('https://example.com/')# cached>>>res.status_code304>>>len(res.text)1527903Configurationimportrequests_etagrequests_etag.config['dir']='mycache'requests_etag.config['db']='db.sqlite3'
Package: requests-etag-cache
Installation$[sudo]pipinstallrequests-etag-cacheHow it works$REQUESTS_ETAG_CACHE/<url_hash>$XDG_CACHE_HOME/requests-etag-cache/<url_hash>by defaultExamplesimportrequestsimportrequests_etag_cacher=requests.get('https://pypi.org/project/requests/')ifnotrequests_etag_cache.uptodate(r):...requests_etag_cache.save(r)readme42.com
Package: requests-expects
Requests-expectsis anExpectsplugin for HTTP request and response assertions.InstallationYou can install the last stable release of Requests-expects from PyPI using pip or easy_install.$pipinstallrequests-expectsAlso you can install the latest sources from Github.$pipinstall-egit+git://github.com/jaimegildesagredo/requests-expects.git#egg=requests-expectsTestsTo run the test suite you should install the development requirements and then runnosetests.$pipinstall-rrequirements-devel.txt$nosetestsLicenseThe Requests-expects plugin is released under theApache2 license.
Package: requests_extensions.adapters
PyPIContentsIntroductionContributorsChangelog0.1.2 (2014-01-22)0.1.1 (2014-01-20)0.1.0 (2014-01-20)IntroductionAdds support for dynamic loading and selection of adapters to theRequestseggContributorsRobert Pyke, AuthorChangelog0.1.2 (2014-01-22)Add missing MANIFEST.in file
[Robert Pyke]0.1.1 (2014-01-20)Updated CHANGES.txt to include information on version 0.1.0
[Robert Pyke]Add pypi link to README.rst
[Robert Pyke]0.1.0 (2014-01-20)Initial release.Package created using templer
[Robert Pyke]Adds FAdapterExtension which returns the appropriate AdapterExtension to
handle a given request.
[Robert Pyke]Adds HTTPAdapterExtensionWrapper which wraps the HTTPAdapter with
AdapterExtension capabilities.
[Robert Pyke]
Package: requests-extra
requests-extraDrop-in replacement for theRequestslibrary that wraps it to
provide these ✨extra✨ features:Improved resiliency🤘Retry by default (3 times in total) with backoff / respectingRetry-After,Timeout by default (10 seconds),Exception on 4xx and 5xx responses by default (automaticraise_for_status()),Improved performance⏩Automatic HTTP keep-alive without explicitly using session,Support for Brotli enabled by default,When to use it?This library is highly opinionated and uses a rather simplistic approach
so it may or may not fit your project. For us it did help in the
following use cases:improving many small scripts - f.e. used for monitoring,modernization of a big but simple and well-tested projects - f.e. old
tests,How to use?Replacerequestswithrequests-extrain your dependencies
fileReplacerequests.withrequests_extra.in your code.That’s it!Example:# instead of 'from requests import get'fromrequests_extraimportgetget('https://httpbin.org/headers')For more examples please see thetests.How to change the defaults?Seedefaults.py.To change some of them for all of your code do this:importrequests_extra.defaultsrequests_extra.defaults.timeout=1You can also overwrite them for a single request in the usual way:fromrequests_extraimportgetget('https://httpbin.org',timeout=5)TODOMore features:Single line logging of requests and/or responses, with default
secrets redaction,HTTP/2 support (by switching toencode/httpxas a backend),[STRIKEOUT:Rate limiting support, including respecting the
appropriate HTTP headers] - urllib3 supports it sincev. 1.19
released on
2016-11-03…
😅Support for RFC-2782 style DNS SRV entries (for Consul) - seepstiasny/requests-srv,Service-to-service authentication on GCP - seeadrianchifor/requests-gcp,Built-in support for caching responses? - maybe withreclosedev/requests-cacheorbionikspoon/cache_requestsContributingALLkinds of issues & PRs are very welcome! There are no formal rules
of contributing yet, please use common sense. ;)CreditsFirstly big thanks to all the authors of the wrapped library, Requests!Additionally thank you to the authors of reused code:The code for timeouts andraise_for_status()is copied from thebetter-requests/better-requestslibrary.The code for LFU cache is copied from theluxinger/lfu_cache.Some concepts from theCarlosAMolina/requests_customlibrary are used too.LicenseLike the wrapped Requests, and the libraries we reused, this library
uses the Apache 2.0 license.
Package: requests-f5auth
This project provides F5 Authentication support for BIG-IQ and BIG-IP usingRequests.The workflowF5’s BIG-IQ and BIG-IP use token based authentication.  While the implementation differs on each,
requests_f5auth hides most of the differences.Accessing protected resources using requests_f5auth is as simple as:>>>fromrequests_f5authimportF5Auth>>> f5auth = F5Auth(username, password)
    >>> resp = requests.get(url='https://10.10.10.10/mgmt/shared/echo', auth=f5auth)InstallationTo install requests and requests_oauthlib you can use pip:$pipinstallrequestsrequests_f5auth
Package: requests-file
Requests-File is a transport adapter for use with theRequestsPython
library to allow local filesystem access viafile://URLs.To use:importrequestsfromrequests_fileimportFileAdapters=requests.Session()s.mount('file://',FileAdapter())resp=s.get('file:///path/to/file')FeaturesWill open and read local filesMight set a Content-Length headerThat’s about itNo encoding information is set in the response object, so be careful using
Response.text: the chardet library will be used to convert the file to a
unicode type and it may not detect what you actually want.EACCES is converted to a 403 status code, and ENOENT is converted to a
404. All other IOError types are converted to a 400.ContributingContributions welcome! Feel free to open a pull request againsthttps://github.com/dashea/requests-fileLicenseTo maximise compatibility with Requests, this code is licensed under the Apache
license. See LICENSE for more details.
Package: requests-foauth
This module provides an foauth.org TransportAdapter for Requests.In short, foauth.org allows you to easily send requests to OAUth’d
services with HTTP Basic authentication. It’s fantastic.Normally, you have to send all requests to foauth.org manually, after
rewriting the URLs. With this adapter, all requests are sent through the
service transparently.Example usage:import requests
from requests_foauth import Foauth

s = requests.Session()
s.mount('http', Foauth('username', 'password))

>>> s.get('https://api.500px.com/v1/users/')
<Response [200]>
Package: requests-forecast
requests-forecastFor complete docs and API options see:https://developer.forecast.io/docs/v2RequirementsPython 3.6+requestsInstallationTo install requests-forecast, simply:$pipinstallrequests-forecastDocumentationDevelopment version:http://requests-forecast.rtfd.org.QuickstartCreating a clientfromrequests_forecastimportForecastforecast=Forecast(apikey='YOUR-API-KEY')Getting the current conditionscurrent=forecast.currently()printcurrent['temperature']58.9Getting minutely conditionscurrent=forecast.minutely()current['summary']u'Mostly cloudy for the hour.'current['data'][0].keys()[u'precipIntensity',u'time']Getting hourly conditionscurrent=forecast.hourly()current['temperature']59.52forecast.hourly()['summary']Mostlycloudyuntiltomorrowafternoon.forecast.hourly()['data'][0]['temperature']59.52Getting daily conditionsforecast.daily()['summary']u'Mixed precipitation off-and-on throughout the week; temperatures peaking at 70\xb0on Sunday.'forecast.daily()['data'][0]['temperatureMax']63.85forecast.daily()['data'][0]['temperatureMin']35.05Getting alertsforecast.alerts(){"expires":1366898400,"uri":"http://alerts.weather.gov/cap/wwacapget.php?x=KS124EFAC89CD0.FreezeWarning.124EFAD6F320KS.TOPNPWTOP.8ab7d76a4db42b9136a1a6849a631097","title":"Freeze Warning for Douglas, KS"}Example usagefromdatetimeimportdatetimefromrequests_forecastimportForecastforecast=Forecast(apikey='YOUR-API-KEY')data=forecast.get(latitude=38.9717,longitude=-95.235)forecast.currently()['temperature']58.9data=forecast.get(latitude=38.9717,longitude=-95.235,time=datetime(year=2013,month=12,day=29))forecast.currently()['temperature']58.9forecast.currently()['temperature']36.75LicenseNew BSD
Package: requests-freeproxy
RequestsRequestsis a simple, yet elegant, HTTP library.>>>importrequests>>>r=requests.get('https://httpbin.org/basic-auth/user/pass',auth=('user','pass'))>>>r.status_code200>>>r.headers['content-type']'application/json; charset=utf8'>>>r.encoding'utf-8'>>>r.text'{"authenticated": true, ...'>>>r.json(){'authenticated':True,...}Requests allows you to send HTTP/1.1 requests extremely easily. There’s no need to manually add query strings to your URLs, or to form-encode yourPUT&POSTdata — but nowadays, just use thejsonmethod!Requests is one of the most downloaded Python packages today, pulling in around30M downloads / week— according to GitHub, Requests is currentlydepended uponby1,000,000+repositories. You may certainly put your trust in this code.Installing Requests and Supported VersionsRequests is available on PyPI:$python-mpipinstallrequestsRequests officially supports Python 3.7+.Supported Features & Best–PracticesRequests is ready for the demands of building robust and reliable HTTP–speaking applications, for the needs of today.Keep-Alive & Connection PoolingInternational Domains and URLsSessions with Cookie PersistenceBrowser-style TLS/SSL VerificationBasic & Digest AuthenticationFamiliardict–like CookiesAutomatic Content Decompression and DecodingMulti-part File UploadsSOCKS Proxy SupportConnection TimeoutsStreaming DownloadsAutomatic honoring of.netrcChunked HTTP RequestsAPI Reference and User Guide available onRead the DocsCloning the repositoryWhen cloning the Requests repository, you may need to add the `-cfetch.fsck.badTimezone=ignore` flag to avoid an error about a bad commit (seethis issuefor more background):gitclone-cfetch.fsck.badTimezone=ignorehttps://github.com/psf/requests.gitYou can also apply this setting to your global Git config:gitconfig--globalfetch.fsck.badTimezoneignore
Package: requests-from-file
# requests_from_file
从火狐文件中创造requests请求体因为某种原因，我需要从火狐等浏览器中抓取请求信息，每次都自己根据请求构造太过麻烦，所以用这个来帮我从文件中读取请求配置## install
使用pip`python pip install requests_from_file `## 使用方法`python from requests_from_file import requestFactoryfactory=requestsFactory(headerFileName="http/header/file",contentFileName="http/heade/content/file")factory.params r = factory.request() `其中 headerFile 是从火狐等浏览器抓取下来的请求头文件，他的样子如下图所示` GET/tax_view?keyno=3ceaa2674e137a392d9986ad2f02aa28&ajaxflag=1HTTP/1.1 Host: www.qichacha.comUser-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Accept: */*Accept-Language:zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding:gzip, deflate, br Referer:https://www.qichacha.comX-Requested-With:XMLHttpRequest Cookie: name=cookie;url=ssss; Connection:keep-alivePragma:no-cacheCache-Control:no-cache`而如果是post请求，那么post参数有两种形式，
1. 以json形式发送的，请以`Json:[other:params]`形式附加在header文件最后以multipart发送的，请另存一个文件，并传递给contentFileName参数## 结果
读入文件后，相应的参数以 headers,json,data,cookies,params形式（和requests对应）保存在params内，
并可以使用requests.request的方法直接请求，也可以使用requestFactory的request方法请求
Package: requests-ftp
Requests-FTP is an implementation of a very stupid FTP transport adapter for
use with the awesomeRequestsPython library.This library isnotintended to be an example of Transport Adapters best
practices. This library was cowboyed together in about 4 hours of total work,
has no tests, and relies on a few ugly hacks. Instead, it is intended as both
a starting point for future development and a useful example for how to
implement transport adapters.Here’s how you use it:>>>importrequests>>>importrequests_ftp>>>requests_ftp.monkeypatch_session()>>>s=requests.Session()>>>resp=s.list('ftp://127.0.0.1/',auth=('Lukasa','notmypass'))>>>resp.status_code'226'>>>printresp.content...snip...>>>resp=s.stor('ftp://127.0.0.1/test.txt',auth=('Lukasa','notmypass'),files={'file': open('report.txt', 'rb')})FeaturesAlmost none!Adds the FTP LIST, STOR, RETR and NLST verbs via a new FTP transport adapter.Provides a function that monkeypatches the Requests Session object, exposing
helper methods much like the currentSession.get()andSession.post()methods.Piggybacks on standard Requests idioms: uses normal Requests models and
access methods, including the tuple form of authentication.Does not provide:Connection pooling! One new connection and multiple commands for each
request, including authentication.Superinefficient.SFTP. Security is for the weak.Less common commands.Important NotesMany corners have been cut in my rush to get this code finished. The most
obvious problem is that this code does not haveanytests. This is my highest
priority for fixing.More notably, we have the following important caveats:The design of the Requests Transport Adapater means that the STOR method
has to un-encode a multipart form-data encoded body to get the file. This is
painful, and I haven’t tested this thoroughly, so it might not work.Massiveassumptions have been made in the use of the STOR method. This
code assumes that there will only be one file included in the files argument.
It also requires that you provide the filename to save as as part of the URL.
This is single-handedly the most brittle part of this adapter.This code is not optimised for performance AT ALL. There is some low-hanging
fruit here: we should be able to connection pool relatively easily, and we
can probably avoid making some of the requests we do.ContributingPlease do! I would love for this to be developed further by anyone who is
interested. Wherever possible, please provide unit tests for your work (yes,
this is very much a ‘do as I say, not as I do’ kind of moment). Don’t forget
to add your name to AUTHORS.LicenseTo maximise compatibility with Requests, this code is licensed under the Apache
license. See LICENSE for more details.
Package: requests-google
requests-googleA simple google related Parsing Package. This library intends to make parsing google product (e.g. google news, google search...) as simple and intuitive as possible.Installingpip install requests-googleUsageCommand-line Toolsrequests_googlenews$requests_googlenews-gFargoND-furl
https://www.inforum.com/4718103-PHOTO-Kurds-rally-in-downtown-Fargo
https://www.am1100theflag.com/news/11569-i-29-open-fargo-canadian-border
...
$requests_googlenews-gFargoND-furltitle
https://www.inforum.com/4718103-PHOTO-Kurds-rally-in-downtown-FargoFMKurdsprotestTrump'smovetopullUStroopsfromSyria-INFORUM
...
Package: requests-gracedb
requests-gracedbrequests-gracedb provides a generic REST API client forGraceDBand similar
LIGO/Virgo API services. It uses the powerfulRequestspackage for reliable
and high-throughput HTTP connection pooling.Notes for software packagingSoftware packaging files exist for the following systems:RPM:https://git.ligo.org/packaging/rhel/python-requests-gracedbDebian:https://git.ligo.org/packaging/debian/requests-gracedbConda:https://github.com/conda-forge/requests-gracedb-feedstock
Package: requests-guard
===============================Requests Guard===============================.. image:: https://img.shields.io/travis/skorokithakis/requests-guard.svg:target: https://travis-ci.org/skorokithakis/requests-guard.. image:: https://img.shields.io/pypi/v/requests-guard.svg:target: https://pypi.python.org/pypi/requests-guard.. image:: https://readthedocs.org/projects/requests-guard/badge/?version=latest:target: https://readthedocs.org/projects/requests-guard/?badge=latest:alt: Documentation Statusrequests-guard is a small library that allows you to impose size and time limits on your HTTP requests.* Free software: BSD license* Documentation: https://requests-guard.readthedocs.org.Features--------* Timeout limits* Size limits* Much more!Installation------------Just use `pip` to install it:```pip install requests-guard```and you're done.Usage-----```import requestsfrom requests_guard import guardr = requests.get("https://www.google.com/", stream=True, timeout=30)content = guard(r, max_size=3000, timeout=10)````requests-guard` will raise a `ValueError` if it receives more than `max_size` data in total, or if the *entire*request takes more than `timeout` seconds to be completed. That means that the call will always return after (roughly,see below for details) `timeout` seconds.*Note:* You *must* call requests in the manner above, with `stream=True` and `timeout`. `stream=True` allows the sizeand time limits to be set, and the `timeout` parameter to `requests` instructs it to close the connection if no datahas been received for that number of seconds.*Note:* `requests-guard` works by looking at the data as it receives it, so the `timeout` parameter to `requests-guard`will apply to the *entire* connection, not just the latest chunk. The `timeout` parameter to `requests` means "quit ifwe haven't received any data for that long", which means that a response may take an arbitrary amount of time, as longas it always returns *something* every `timeout` seconds. This means that a request may potentially take up to the sumof the timeout specified to `requests` and to `requests-guard`, if the server stops replying completely just beforethe timeout in `requests-guard` elapses.History-------0.1.0 (2015-03-04)---------------------* First release on PyPI.