Saravanan666/pypi-org huggingface dataset:
Package: httpy-cli
Modern, user-friendly, programmable and filterable command-line HTTP client for the APIHTTPy is a command line HTTP client.
Its purpose is to make duplicate web requests on a single line.
httpy is designed for testing, debugging, and generally interacting with APIs and HTTP servers.
Thehttpycommand allows creating and sending arbitrary HTTP requests.
They use simple and natural syntax and provide formatted and colored output.
Under favour of its programmable structure, it can perform many tasks at the same time.
For example, you can pull data for user IDs 0, 1, and 2 at the same timeGetting startedInstallation instructionspipinstallhttpy-cliFeaturesExpressive and intuitive syntaxFormatted and colorized terminal outputProgrammable requestsMultiple requests one lineValue incremented each timeRandom number per requestRead each value from the lines in the fileValue per each request as a list of multiple valuesBuilt-in JSON supportArbitrary request dataCustom headersStructures$httpy<URL><METHOD><HEADERS,QUERIES,DATA>--exec<COMMAND>Custom method, headers, queries and JSON data:$httpyhttpbin.org/putPUTHeaderName:HeaderValuedata=valuequery==valueCommand$httpyhttpbin.org/get--exec<KEY>:<OPERATION>:<MAX_RUN>ExamplesBasic Request:$httpyhttpbin.org/getUsage custom method, headers, queries and JSON data:$httpyhttpbin.org/putPUTHeaderName:HeaderValuedata=valuequery==valueCustom HTTP method, HTTP headers and JSON data:$httpyhttpbin.org/postPOSTX-API-Token:123name=JohnRun 3 times:$httpyhttpbin.org/get--execi:++:3Pass a value to URL:$httpy'httpbin.org/get?value={i}'--execi:VALUEPass a value to the URL by running it 2 times:$httpy'httpbin.org/get?value={i}'--execi:VALUE:2Get 0, 1, 2, 3, 4, 5 post one line and just show body:$httpyhttps://jsonplaceholder.typicode.com/posts/{i}--execi:++:6-BPass a value to the Header and just show status:$httpyhttpbin.org/getAuthorization:{i}--execi:token1,token2,token3-SOperation ListOperationDescription++Increment--Deincrementrand(0,10)Random number from 1 to 10read(path/to/file)Read from fileitem1, item2ListitemTextCommunity & supportTweet httpy at@KanidagliVon Twitter.UseStackOverflowto ask questions and include ahttpytag.CreateGitHub Issuesfor bug reports and feature requests.ContributingHave a look through existingIssuesandPull Requeststhat you could help with. If you'd like to request a feature or report a bug, pleasecreate a GitHub Issueusing one of the templates provided.Sinan Kanidağlı © 2022
Package: httpyexpect
httpyexpectAn opinionated way to translate server side HTTP errors to the client side.InstallationThis package is available at PyPI:https://pypi.org/project/httpyexpectYou can install it from there using:pip install httpyexpectIf you want to use the server-oriented utilities of the package, please
install the following extra:server.Client-Server ContractHttpyexcept proposes a client-server contract on how to communicate exceptions.
All error responses coming from the server (i.e. all responses with a 4xx or a 5xx
status code) should have a body that complies with the following schema:UsageA detailed documentation is coming soon, until then please have a look at the
integration tests as a usage example.test_fastapi.pydemonstrates the server side
usage with FastAPI.test_client.pydemonstrates how to translate an
HTTP error into a Python exception on the client side.DevelopmentFor setting up the development environment, we rely on thedevcontainer featureof vscode.To use it, you have to have Docker as well as vscode with its "Remote - Containers" extension (ms-vscode-remote.remote-containers) extension installed.
Then, you just have to open this repo in vscode and run the commandRemote-Containers: Reopen in Containerfrom the vscode "Command Palette".This will give you a full-fledged, pre-configured development environment including:infrastructural dependencies of the service (databases, etc.)all relevant vscode extensions pre-installedpre-configured linting and auto-formatinga pre-configured debuggerautomatic license-header insertionMoreover, inside the devcontainer, there is follwing convenience command available
(please type it in the integrated terminal of vscode):dev_install- install the lib with all development dependencies and pre-commit hooks
(please run that if you are starting the devcontainer for the first time
or if added any python dependencies to the./setup.cfg)If you prefer not to use vscode, you could get a similar setup (without the editor specific features)
by running the following commands:# Execute in the repo's root dir:cd./.devcontainer# build and run the environment with docker-composedockerbuild-thttpyexpect.
dockerrun-ithttpyexpect/bin/bashLicenseThis repository is free to use and modify according to theApache 2.0 License.
Package: httpython
🌐 HttPythonA simple-to-use http and https server, simillar to flask, in python.✅ To-doHTTP and HTTPS server classRequest classDocument classPython code execution in htmlMIME type in Document classDefault headers per serverPer host handler❓ How to usefromhttpython.serversimportHTTP_ServerfromhttpythonimportRequestMethod# Define the port and hosthost,port="127.0.0.1",80# Instanciate the server objectserver=HTTP_Server(host,port)#For HTTPS servers, use HTTPS_Server(host, port, certificate_path, private_key_path)# Create an handler for requests@server.method(RequestMethod.GET,route="*",host="*")# Using the route and host parameters as '*' will use this handler as a fallback for the GET method.defGET_Handler(request):# do stuffreturnRequest.response(500,# Status code"Not Implemented",# Message{"Server":"httpy/2.0","Connection":"closed"},# Headersb""# Body)@server.method(RequestMethod.GET,route="/api/",host="*")defAPI_Handler(request):# do stuffreturnRequest.response(500,# Status code"Not Implemented",# Message{"Server":"httpy/2.0","Connection":"closed"},# Headersb'{"foo": "bar"}'# Body)# Run the serverserver.run()
Package: httq
HTTQ is a fast and lightweight HTTP client written in pure Python and distributed under the Apache 2 license.
It is contained within a single file module with no external dependencies so it can be easily dropped into existing projects.TheHTTPclass has separate methods for sending requests and receiving responses.
This decoupling allows multiple requests to be pipelined on a single connection prior to the corresponding responses being read.Example CodeOpen an HTTP connection tohttp.ioon port 8080, send aGETrequest to/helloand obtain the response content:>>>fromhttqimportHTTP>>>http=HTTP(b"httq.io:8080")>>>print(http.get(b"/hello").response().content)hello,worldGet the same content using a full URL on a single-use connection:>>>fromhttqimportget>>>print(get(b"http://httq.io:8080/hello").content)hello,world
Package: httreplay
JANUARY 2015 :: HTTREPLAY IS NOW END-OF-LIFED. I strongly recommend usingvcr.py, which these days has a larger community, a richer feature set, and is better maintained. I will keep HTTReplay on PyPi for now just so that nobody gets caught out. But please do migrate tovcr.pywhen you have an opporunity. Thanks!HTTReplay is a Python HTTP (and HTTPS!) replay library for testing.The library supports the recording and replay of network requests made viahttplib,requests >= 1.2.3(includingrequests 2.x), andurllib3 >= 0.6.Here’s a very simple example of how to use it:import requests
from httreplay import replay

with replay('/tmp/recording_file.json'):
    result = requests.get("http://example.com/")
    # ... issue as many requests as you like ...
    # ... repeated requests won't hit the network ...There’s a lot more you can do. Full documentation is available from thehttreplay github page.
Package: httsleep
httsleep is a powerful polling library for Python.IdeaSet your success conditions, set a few alarms, and get polling!until = {
    'status_code': 200,
    'jsonpath': [{'expression': 'status', 'value': 'OK'}]
}
alarms = [
    {'json': {'status': 'ERROR'}},
    {'jsonpath': [{'expression': 'status', 'value': 'UNKNOWN'},
                  {'expression': 'owner', 'value': 'Chris'}],
    'callback': is_job_really_failing},
    {'status_code': 404}
]
try:
   response = httsleep(
       'http://myendpoint/jobs/1', until, alarms=alarms,
       max_retries=20)
except Alarm as e:
    print "Response was:", e.response
    print "Alarm condition that matched was:", e.alarmTranslated into English, this means:Pollhttp://myendpoint/jobs/1– at most 20 times – untilit returns a status code of200AND thestatuskey in its response has the valueOKbut raise an alarm ifthestatuskey has the valueERROROR thestatuskey has the valueUNKNOWNAND theownerkey has the valueChrisAND the functionis_job_really_dyingreturnsTrueOR the status code is 404Documentationhttp://httsleep.readthedocs.io/Installingpip install httsleepTestingpip install -e .
pip install -r test-requirements.txt
py.test
Package: htttea
I’mnota tea pot. Provide a web server for testing.CHANGELOGUsageresponse_body=b"Hello World"withhtttea.Htttea()ast3:t3.response=htttea.Response(body=response_body)response=requests.post(t3.url,data=data)assertt3.request.data==dataassertresponse.text==response_body.decode()Htttea makes a real web server when it is called withwithstatement. You can get a web server URL fromurlproperty.
Package: htuneml
# HTUNEML - machine learning experiments monitoring and tuningQuickstart:pip install htuneml. See the “Installing” section for more details.Project links:PyPISource codeIssue trackerExamplesSee theexamples/directoryin the repository root for usage examples:Tensorflow MnistKeras MnistPytorch MnistRequirementsTo use all of the functionality of the library, you should have:Python2.6, 2.7, or 3.3+ (required)PyAudio0.2.11+ (required only if you need to use microphone input,Microphone)Quick startRegister on websitehttp://registru.ml, copy the api_key:importhtunemlashtjob=Job('api_key')@job.monitordeftrain(par1=2,par2=2):foriinrange(par1):#do training herejob.log({'loss':i*4,'ep':i})job.setName('l2')#job.debug()# uncomment and no experiment will be created and no logs senttrain(10,2)This will print out something like the following:make experiment
got key experimnet 5c5c8eaacbcfb9146641367aAlso it is possible to sent the parameters from the web app. First on gpu/cpu set the lisener:importhtunemlashtjob=Job('api_key')deftrain(par1=2,par2=2):foriinrange(par1):#do training herejob.log({'loss':i*4,'ep':i})job.sentParams(train)#sent the parameters list to the appjob.waitTask(train)#wait for parameters from app
Package: htun-example-pkg
Copyright (c) 2018 The Python Packaging AuthorityPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: htutil
htutilHaoTian's Python UtilInstallpipinstallhtutilUsagefilefromhtutilimportfileRefer to C# System.IO.File API, very simple to use.s='hello'write_text('1.txt',s)# hello in 1.txtappend_text('1.txt','world')# helloworld in 1.txts=read_text('1.txt')print(s)# helloworlds=['hello','world']write_lines('1.txt',s)# hello\nworld in 1.txtappend_lines('1.txt',['\npython'])# hello\nworld\npython in 1.txts=read_lines('1.txt')print(s)# ['hello', 'world', 'python']cachecache def result by pickle file.fromhtutilimportcache@cache.file_cachedefget_1():time.sleep(3)return1countera simple counter based on dict.c=Counter()c.add('1')c.add('1')c.add('2')print(c.to_dict())# {'1': 2, '2': 1}c.dump()# same as print(c.to_dict())
Package: htv
Heat Template ValidatorHeat Template Validator (HTV) is a tool created to validateHeat templates(yaml files) and check the parameters' existence in the Openstack server.What does it do?The main scripthtvwill analyze every single file from the dir/htv/TemplateLocalStorage.
It moves the valid files into the dir/htv/ValidHeatFiles.
It moves the warning files into the dir/htv/WarnHeatFiles.
It moves the error files into the dir/htv/ErrorHeatFilesand for each file of the error and warn groups it creates a log and then it moves all log files into the dir/htv/Log.
At the very beginning of the installation HTV will also create crontab lines inside the/htv/list_cron.txtfile.InstallationHTV requirespython>=3.5and pip in order to run.
Open the terminal and download the application throughpip:$pipinstallhtvThen install and configure the package viahtv -iorhtv --install:$htv-iThis command will create thehtvinto your home directory with the relative subdirectories (Log, TemplateLocalStorage and so on).
There are few simple steps to follow in order to correctly use HTV:Move the Heat files into the./TemplateLocalStoragedirMove the open.rc files into the./rc_filesdir
After this transfer executehtv -sorhtv --shadow:$htv-sThen the application will prompt you the Openstack server password.
Remember to enter this command only once: during the HTV installation, or everytime you need to change the Openstack passwords oropenrc.hsfiles.
Thehtv -scommand will also generate a list of crontabs in thelist_cron.txtfile that you can use in your system crontab file depending on whichopenrc.shfile is needed.UsageYou can choose to run the application using the crontabs created inlist_cron.txt.
Or to run it no-interactively viahtv:$htvOr in the interactive mode where the application will ask for which openrc file to use for the Openstack authentication:$htv/Path/To/The/Openrc/File.shAfter this you are ready to go, the Heat templates will be moved accordingly with their warnings or errors and logs will be created and moved to the/htv//Logdir.RememberWhenever you want to usehtvyou first need to move the yaml files to the/htv/TemplateLocalStoragedir.In case the application directory changesIn case you move the HeatTemplateValidator directory to a different path it is necessary to do as follows:$htv-i
$htv-sThis is a requirement in order to generate the new crontabs and having the whole application working.NotesThis application fully functions on Ubuntu and MacOS withpython3,pipandpython-devinstalled.
All advice welcome!
Package: huak
huakAboutA Python package manager written in Rust. TheCargofor Python.⚠️ Disclaimer:huakis in an experimental state (see#602).Huak ("hwok") aims to support a base workflow for developing Python packages and projects. The process is linear and purpose oriented, establishing better familiarization with the steps.The goal is to create an opinionated tool to support a reliably inviting onboarding experience for the Python ecosystem, that feels responsive and snappy to use.README ContentsInstallationUsageDocumentationGoals and MotivationContributingInstallation❯ pip install huakUsage❯ huak helpA Python package manager written in Rust inspired by Cargo.Usage: huak [OPTIONS] <COMMAND>Commands:activate    Activate the virtual environmentadd         Add dependencies to the projectbuild       Build tarball and wheel for the projectcompletion  Generates a shell completion script for supported shellsclean       Remove tarball and wheel from the built projectfix         Auto-fix fixable lint conflictsfmt         Format the project's Python codeinit        Initialize the existing projectinstall     Install the dependencies of an existing projectlint        Lint the project's Python codenew         Create a new project at <path>publish     Builds and uploads current project to a registrypython      Manage Python installationsremove      Remove dependencies from the projectrun         Run a command within the project's environment contexttest        Test the project's Python codeupdate      Update the project's dependenciesversion     Display the version of the projecthelp        Print this message or the help of the given subcommand(s)Options:-q, --quiet-h, --help     Print help-V, --version  Print versionDocumentationUser GuideDevelopmentGoals1. Just usehuak✨The Rust ecosystem has a fantastic onboarding experience. Cargo plays a large role. Huak can provide the same experience for Python.2. Fast ⚡️There's room for faster tooling in the Python ecosystem. One of the guiding principles will be"Is this the fastest it can be?"3. Python 🤝 RustJavaScript has seen a "Going Rust" sub-community pop up. Huak is positioned well to help sustain future development of Rust-based software for the Python ecosystem.ContributingPlease read ourcontributing guidebefore you start contributing.
Package: huangiu-scraper
TitleHuangiu ScraperDescrptionWith huangiu Scraper you can scrape search results and extract the contents produced by the search result.In huangiu scraper it will scrape the data present of the website and give json data which contains the details of the contents on the website.It gives the every detail present inside website in the form of json data such as time of the news posted, article name etc.Run Scraperfromhuangiu_scraperimport*link="https://finance.huanqiu.com/"data=run_huangiu_scraper(link)How it works?It takes URL of huangiu page with a search keyword to scrape the data.It generates the json data which contains the information of the huangiu search result.ExamplesBelow are some of the examples of URLs using which you can scrape:Example 1Example2Queries/ FeedbackIf you have some queries or feedback please contact us at followingTelegramEmail
Package: huanyuan
____,.---._.=-.-..-`.' ,`.  ,-.'-,`./==/_//==/,-\/==/,-\|==|,||==|_.=.|==|-.=.,||==|||==|,'=',|==|:;=:-||==|-||==|-'..'|==|,'=',||==|,||==|,|\==\_-;|==|-|/==/-|'.='.,;-\/==/./`--`---'       `--`--'' `--`--`-`---- by Hangfeng Yang▌                                                                           j▌                                                                           j▌                                                                           jΓ           ▐███Γ        ▄██▓p                  ▄▄                          jΓ           ╫███─       ▄████                 └████   ▐██████████████████████Γ           ████       ▓███████████µ            ████  ╟████▀▀▀▀▀▀█████▀▀▀▀▀▀▐Γ           ████     ,█████▀▀▀▀████▀            ╙████ ████⌐      ████       jΓ       ██████████▌ ▄████▀    ████▀              ╟███▀████  ██████████████▄ jΓ       ██████████▄█████,,,,▄████▄                   ]████ ]████▀▀▀▀▀▀▀███▌ jΓ          ████    ╠████████████████▄       .▄██▌    ╟███▌ ╟███       j███▌ jΓ          ████    ╟███▀▀▀████▀▀▀███▌        ╙████   ████Γ ███████████████  jΓ         ▐███▌    ████   ███▌  ▐███▌         ╙███▌  ████  ███████████████  jΓ         ╟██████  ████  ▐███▌  ╟███           ╟███▌ ████  ███▌       ████  jΓ        ,████████ ███▌  ╟███   ████            █▀╙─▐███▌ ▐██████████████▌  jΓ     ▓████████▀└ ▐███⌐  ████   ███▌                ████⌐ ╫██████████████⌐  jΓ     ╙███████  ▐████████████████████⌐         ███▓ ████        ████        jΓ      └ ╟███▌  ╫████████████████████         ╟███▌▐███▌  ███▌ ▐███▌ ███µ   jΓ        ████⌐         ██████                 ████ ████  ▓███  ████⌐ ███▌   jΓ        ████        ╓███████▌               ████⌐▐████ ▐███▌  ████  ███▌   jΓ       ]████       ▓████ ╙███▌             ▄███▌ ████¬╓███▌  ]████  ████   jΓ   ,▄▄ ▐███▌    ,▓████▀   ╚████           ▐████ ▐███▌╔████   ╟███▌  ╟███   jΓ   ███▌████⌐ ╓▄█████▀      ╙████▓        ▄████ ]████Φ████▄▄█,████⌐  ▐███µ  jΓ   ╙██████▀  █████▀          ▀████▀     á████  ████Γ  └╙ ███████▀    ▀▀▀`  jΓ     ╙▀▀╙     ╙▀               ▀▀`       '╙▀╙▀▀▌╙▀█▀▀`jΓjΓj----byqsbyehuanyuan: a terminal tools for Python:globe_with_meridians:由于国内通过pip下载python包的速度真的很慢，很容易因为超时而失败，而pqi可以把PyPi源迅速切换为国内源tuna, douban, aliyun, ustc从而大大加快python包的安装速度，提速效果见下图所示。huanyuan是对pqi的修改版本,添加类似`python -m HUANYUAN.huanyuan`的模块方式访问模块,解决某些情况下安装pqi后在命令行显示无此命令或者修改指定版本Python的下载源.怎么使用(兼容py2/py3/linux/windows/MacOS)1.安装方法一（推荐）>>> pip install -i https://pypi.org/simple huanyuan方法二>>> git clone https://gitee.com/qsbye/python-huanyuan.git
>>> python3 setup.py install2. 命令行输入huanyuan回车>>> huanyuan
Usage:
  huanyuan ls
  huanyuan use <name>
  huanyuan show
  huanyuan add <name> <url>
  huanyuan remove <name>
  huanyuan (-h | --help)
  huanyuan (-v | --version)
Options:
  -h --help        Show this screen.
  -v --version     Show version.列举所有支持的PyPi源>>> huanyuan ls改变PyPi源>>> huanyuan use <name>
或
>>> python -m HUANYUAN.huanyuan use douban例子，比如运行huanyuan use tuna即把当前PyPi源改为清华的PyPi源显示当前PyPi源>>> huanyuan show添加新的pip源(如添加USTC源)>>> huanyuan add ustc https://mirrors.ustc.edu.cn/pypi/web/simple移除pip源（如官方PyPi源）>>> huanyuan remove pypi3. 升级到最新版huanyuan>>> pip install --upgrade huanyuanLICENSEMIT
Package: huasampleproject
A sample Python projectA sample project that exists as an aid to thePython Packaging User
Guide'sTutorial on Packaging and Distributing
Projects.This project does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.The source for this project is available here.Most of the configuration for a Python project is done in thesetup.pyfile,
an example of which is included in this project. You should edit this file
accordingly to adapt this sample project to your needs.This is the README file for the project.The file should use UTF-8 encoding and can be written usingreStructuredTextormarkdownwith the appropriatekey set. It will be used to generate the project webpage on PyPI and will be
displayed as the project homepage on common code-hosting services, and should be
written for that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not a
good idea, although a simple “What's New” section for the most recent version
may be appropriate.