Saravanan666/pypi-org huggingface dataset:
Package: postman2case
# postman2case[![LICENSE](https://img.shields.io/github/license/HttpRunner/postman2case.svg)](https://github.com/HttpRunner/postman2case/blob/master/LICENSE) [![Build Status](https://travis-ci.org/HttpRunner/postman2case.svg?branch=master)](https://travis-ci.org/HttpRunner/postman2case) [![coveralls](https://coveralls.io/repos/github/HttpRunner/postman2case/badge.svg?branch=master)](https://coveralls.io/github/HttpRunner/postman2case?branch=master)Convert postman data to JSON testcases for HttpRunner.## usageTo see ``postman2case`` version:```shell$ python main.py -V0.0.1```To see available options, run```shell$ python main.py -husage: main.py [-h] [-V] [--log-level LOG_LEVEL][postman_testset_file] [output_testset_file]Convert postman testcases to JSON testcases for HttpRunner.positional arguments:postman_testset_file  Specify postman testset file.output_testset_file   Optional. Specify converted JSON testset file.optional arguments:-h, --help            show this help message and exit-V, --version         show version--log-level LOG_LEVELSpecify logging level, default is INFO.```## examplesIn most cases, you can run ``postman2case`` like this:```shell$ python3 main.py test/test.json output.jsonINFO:root:Generate JSON testset successfully: output.json```As you see, the first parameter is postman source file path, and the second is converted JSON file path.The output testset file type is detemined by the suffix of your specified file.If you only specify postman source file path, the output testset is in JSON format by default and located in the same folder with source file.```shell$ python3 main.py test/test.jsonINFO:root:Generate JSON testset successfully: test/test.output.json```## generated testsetgenerated JSON testset ``output.json`` shows like this:```json[{"test": {"name": "/api/v1/Account/Login","request": {"method": "POST","url": "https://httprunner.top/api/v1/Account/Login","headers": {"Content-Type": "application/json"},"json": {"UserName": "test001","Pwd": "123","VerCode": ""}},"validate": []}}]```
Package: postman2py
postman2pypostman2py is a library forPostmanthat run Postman's collections.Originaly was forked fromhttps://github.com/k3rn3l-p4n1c/postpythonandhttps://github.com/matkapi/postpy2Added few updates related to Postman collection import and urlencoded request type.Why use postman2py instead of postman codegen?No hardcoded variablesIf your team use postman collection for testing and you want to extend testing by integrating some calculation or etc.How to install?postman2py is available onPyPIand you can install it using pip:$pipinstallpostman2pyHow to use?Importpostman2pyfrom postman2py.core import PostPython

runner = postman2py('/path/to/collection/postman_collection.json')

# runner.default.<request_name> # if no folders in collection
# runner.<folder_name>.<request_name> # if folders exist in collection

response = runner.default.get_request()
print(response.json())
print(response.status_code)Load enviroment variablesIn postman2py you can load enviroment variables from postman enviroment filespp.environments.load('environments/postman_environment.json')Set environment variablerunner.environments.update({'BASE_URL': 'http://127.0.0.1:5000'})
runner.environments.update({'PASSWORD': 'test', 'EMAIL': 'you@email.com'})AttributeErrorpostman2py try to correct your mistake if you spell a function or folder wrong it will suggest you the closest name.>>> response = runner.RequestMethods.get_requasts()

Traceback (most recent call last):
File "test.py", line 11, in <module>
response = runner.RequestMethods.get_requasts()
File "/usr/local/lib/python3.5/site-packages/postman2py/core.py", line 73, in **getattr**
'Did you mean %s' % (item, self.name, similar))

AttributeError: get_requasts request does not exist in RequestMethods folder.
Did you mean get_requestYou can also usehelp()method to print all available requests.>>> runner.help()
>>> Posible requests:
>>> runner.AuthOthers.hawk_auth()
>>> runner.AuthOthers.basic_auth()
>>> runner.AuthOthers.oauth1_0_verify_signature()
>>> runner.RequestMethods.get_request()
>>> runner.RequestMethods.put_request()
>>> runner.RequestMethods.delete_request()
>>> runner.RequestMethods.post_request()
>>> runner.RequestMethods.patch_request()

or

>>> runner.RequestMethods.help()
>>> runner.RequestMethods.delete_request()
>>> runner.RequestMethods.patch_request()
>>> runner.RequestMethods.get_request()
>>> runner.RequestMethods.put_request()
>>> runner.RequestMethods.post_request()
Package: postman2runner
postman2runnerConvert postman data to JSON testcases for HttpRunner.usageTo seepostman2runnerversion:$pythonmain.py-VTo see available options, run$pythonmain.py-h
usage:main.py[-h][-V][--log-levelLOG_LEVEL][postman_testset_file][--output_dir][--output_file_type]ConvertpostmantestcasestoJSONtestcasesforHttpRunner.

positionalarguments:postman_testset_fileSpecifypostmantestsetfile.--output_dirOptional.SpecifyconvertedJSONtestsetfolder.--output_file_typeOptional.Generatefileformat,defaultjson.

optionalarguments:-h,--helpshowthishelpmessageandexit-V,--versionshowversion--log-levelLOG_LEVELSpecifylogginglevel,defaultisINFO.examplesIn most cases, you can runpostman2runnerlike this:$python3main.pytests/data/test.json--output_dirtests/postman2case--output_file_typeyaml
INFO:root:GenerateJSONtestsetsuccessfully:output.jsonAs you see, the first parameter is postman source file path, and the second is converted JSON file path.The output testset file type is detemined by the suffix of your specified file.If you only specify postman source file path, the output testset is in JSON format by default and located in the same folder with source file.$python3main.pytests/data/test.json
INFO:root:GenerateJSONtestsetsuccessfully:test/test.output.jsongenerated testsetgenerated JSON testsetoutput.jsonshows like this:[{"test":{"name":"/api/v1/Account/Login","request":{"method":"POST","url":"https://httprunner.top/api/v1/Account/Login","headers":{"Content-Type":"application/json"},"json":{"UserName":"test001","Pwd":"123","VerCode":""}},"validate":[]}}]参考来源【HttpRunner】
Package: postman_api
Postman client, generated from the OpenAPI spec.Usageimportosfrompostman_apiimportAsyncPostmanClientfrompostman_apiimportPostmanClientdefmain():client=PostmanClient.from_env()response=client.get_all_apis()print(f"{response!r}")asyncdefasync_main():client=AsyncPostmanClient.from_env()response=awaitclient.get_all_apis()print(f"{response!r}")if__name__=="__main__":ifos.environ.get("ASYNC"):importasyncioasyncio.run(async_main())else:main()This example loads configuration from environment variables, specifically:POSTMAN_API_KEYDocumentationAPI DocumentationYou can see working examples of every API call in theexamples/directory.ContributingContributions are welcome!Library created withLibninja.
Package: postmancli
postman-cliPython CLI (postmancli) tool for emails sending using SMTP server.What can I do with postmancli?Send emails using SMTP SSLUse it from terminal when it is installedMultiplatform execution (it is developed in Python)InstallationYou can install or upgrade postmancli with:$ pip install postmancli --upgradeOr you can install from source with:$gitclonehttps://github.com/stt-systems/postman-cli.git--recursive
$cdpostmancli
$pipinstall.Quick example$postmancli-Suser:password@smtp.gmail.com:465-fuser@gmail.com-tsomeone@gmail.com-spostman-cli--text"Hello everyone!@nl@@tab@It seems that this works ..."-a"file.txt""photo.jpg"The example sends an email withuser@gmail.comas sender,someone@gmail.comas receiver,postman-clias subject,Hello every...as text message and 2 attachments (file.txt & photo.jpg).HelpRun the following command to see all options available:postmancli --helporpostmancli -h
Package: postmaniac
postmaniacDescriptionPostman OSINT tool toextract creds, token, username, email & more from Postman Public Workspaces.It is designed to perform OSINT recognition on a target for pentesting, bugbounty and more, in order to get the maximum information from the requests left by developers on the Postman public workspaces.Bonus:No need to be authenticatedNo API blocking / No rate-limitRequirementsPython 3InstallationWith PyPIpip3 install postmaniacWith Github# clone the repo$gitclonehttps://github.com/boringthegod/postmaniac.git# change the working directory to postmaniac$cdpostmaniac# install postmaniac$python3setup.pyinstallWith DockerYou can pull the Docker image with:dockerpullghcr.io/boringthegod/postmaniac:latestAnd then launch the toolby not forgetting to specify your volumeto be able to read the file scan.txt written in outputdocker run -v scan:/output ghcr.io/boringthegod/postmaniac queryUsagepostmaniac can be run from the CLI and rapidly embedded within existing python applications.usage:postmaniac[-h]query

PostmanOSINTtooltoextractcreds,token,username,email&morefromPostmanPublicWorkspaces

positionalarguments:querynameofthetarget(example:tesla)options:-h,--helpshowthishelpmessageandexitAll the interesting information (whether in the environment values of the Postman Workspace, or in authentication values, in the headers or directly in the body of each request) is retrieved andwritten in the scan.txt fileDemoDetailsDisclaimerThis tool is for educational purposes only, I am not responsible for its use.LicenseGNU General Public License v3.0
Package: postmanparser
postmanparserIntroductionPostman collection parser written in python3 to extract HTTP requests/responses.
Currently supports reading JSON schema two waysRead from.jsonfileFetch from url where schema is exposedInstallationUsing pippip install postmanparserUsing poetrypoetry add postmanparserGetting StartedParsing API SchemaYou can parse API schema from file or from url as below.From filefrompostmanparserimportCollectioncollection=Collection()collection.parse_from_file("path/to/postman/schema.json")From urlfrompostmanparserimportCollectioncollection=Collection()collection.parse_from_url("http://example.com/schema")URL should be aGETrequest.postmanparser also validates for the required fields mentioned by postman schema documentation which is available athttps://schema.postman.com/Reading the dataPostman collection contains group of requests and one or more folders having group of requests and/or nested folders in it.Getting requests from the collectionYou can retreive all the requests present in the collection usingget_requests()method.
This method will recursively search for the requests inside folders is present.collection=Collection()collection.parse_from_file("path/to/postman/schema.json")requests=collection.get_requests()forrequestinrequests:print(request)#Either a Request object or strYou can retrieve the requests inside specific folder by usingfolder="folder_name"inget_requestsmethod. To get requests from the nested folder, use folder path separated by/For e.g. to get requests inside folder2 which is nested in folder1requests=collection.get_requests(folder="folder/sub_folder")You can passrecursive=Falsetoget_requests()if you don't want to do recusrive lookup. In this case
you will get all the requests present at the root level of collection or at the folder level is folder is specified.requests=collection.get_requests(recursive=False)Getting requests mapped by folder in the collectionYou can access requests in the collections as requests map usingget_requests_map(). The key of the dict is path to the folder separated by backlash and value is list of requests of typeRequestorstr.
This will be recursive search for all the folders and sub folders inside it.collection=Collection()collection.parse_from_file("path/to/postman/schema.json")requests=collection.get_requests_map()requests=collection.get_requests_map(folder="folder/sub_folder")ValidationIf schema found to be invalid following exception will be thrown.MissingRequiredFieldExceptionInvalidPropertyValueExceptionInvalidObjectExceptionFolderNotFoundExceptionSchema Supportpostmanparser is still in early stages and will be updated with missing schema components soon.Following are the objects which are not supported yet but will be added in the future.protocolProfileBehaviorCollection SDK CompatibilityCurrently postmanparser is not aligned with collection SDK node module.http://www.postmanlabs.com/postman-collection/This Might be added in future. Feel free to raise the PR.Version Compatibilitypostmanparser supports collection schema v2.0.0 and v2.1.0.
Package: postman-py
postman-pyPostman-Py provides a thin wrappers around the built-in package for sending mail.Free software: MIT licenseDocumentation:https://postman-py.readthedocs.io.FeaturesSend mail as HTML/Plain with attachmentsCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2021-11-24)Addsis_htmlflag todraft_message().0.1.0 (2021-11-23)Adds core functionality.
Package: postmanrenderer
UsageSetup:make setupUnit Tests:make testsBuild dist:make distScope of WorkThe scope of this project is to design and implement a template engine, which converts a custom template to Postman collection in JSON format. This improves manageability and reusability of API collections and tests.Broad Area of WorkPostman is an application used for API testing. It is an HTTP client that tests HTTP requests, utilizing a graphical user interface, through which we obtain different types of responses that need to be subsequently validated. The current research project focus is on developing a template engine that can produce postman collections in JSON format.BackgroundTesting is one of the most critical processes of the Software Development Lifecycle (SDLC). It helps companies to perform a comprehensive assessment of software and ensure that their product fulfills the client’s needs.The CI/CD pipeline approach has emerged as a result of a tendency for today’s software users to be less and less tolerant towards defects and at the same time expect fast updates and fixes. Testing is one process that can and should be automated to a great extent within the CI/CD pipeline.Postman is an application that is used for API testing. Newman is a command-line Collection Runner for Postman. It enables you to run and test a Postman Collection directly from the command line. It is built with extensibility in mind so that you can easily integrate it with your continuous integration servers and build systems.The Postman collections created via the GUI have to be exported as in JSON format, which is used by the Newman client. Postman lacks the ability to reuse requests, tests, and pre-request scripts. It is also difficult to maintain postman collections in JSON format in version control systems as the collection has to be exported after each change.ObjectivesThe objectives of project are as follows:Create a template engine for postman which can be used to define collections and requests.The template engine will generate postman collection in JSON format, which can be imported by Postman GUI application or run using Newman clientExamplecollection=Collection("sample_collection")request=Request("Yahoo request",HTTP_METHOD.GET,"",[],Url("https://www.yahoo.com"))collection.add_request(request)request=Request("Google request",HTTP_METHOD.GET,"",[],Url("https://www.google.com"))collection.add_request(request)template=collection.get_template_object()render=collection.render(template)Output:{"info":{"_postman_id":"63c64688-0373-4f34-b0e0-7708cbe41c3b","name":"sample_collection","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Yahoo request","request":{"method":"GET","header":[],"url":{"raw":"www.yahoo.com","protocol":"https","host":["www","yahoo","com"]},"description":""},"response":[]},{"name":"Google request","request":{"method":"GET","header":[],"url":{"raw":"www.google.com","protocol":"https","host":["www","google","com"]},"description":""},"response":[]}]}
Package: postman_repl
# Postman REPLPostman repl uses IPython to present the user with an interface to communicate with APIs.
It loads postman configuration data into global state, allowing for quick and easy
communication with an API.# FeaturesInteractive historyLoading postman collections and environmentspostman environment variable replacementTab completionMiddlewareHelp descriptions# LoadingYou can load middleware, environments, and requests through command line flagsYou can load new collections at runtime using the load_collection functionYou can load new environments at runtime using the load_environment functionYou can load middleware by calling load_middleware# RequestsRequests are loaded into global P variable. Tab completion and help functions supported.Requests are namespaced under there folder name.You can simply call the request with no args to use the default parameters from the Postman configRequests use the “requests” library.  You can pass the kwargs for the request.You can pass an environment to the requests, or it will use the global “E” environmentReturns the response# MiddlewareMiddleware is stored in global MW variableMiddleware will be called when there is a foldername_request name matchFor example, if you have a folder “authentication” and a request “authenticate”, your middleware function name should be authentication_authenticateHaving no folder is supported, it would just be request name (for example: “authenticate”)Middleware should be defined in a separate python moduleMiddleware is a function that takes 3 parametersThe function to run the request, taking a single argument for the kwargsThe kwargs that will be ran in the run functionThe env that the run function will useAfter request, some global variables are setR holds the responseD holds the dataJ holds the data, parsed as JSON# HistoryThe global H variable holds the historyYou can see the history by calling H()You can rerun a history call by calling H(index)You can inspect the history with H.historyEach history has the response, data, and JSON data attached to it# TODOTESTS!Support for other serialization formats besides JSONAdd auth supportInvestigate postman unsupported features
Package: postman-to-csv
A CLI which consumes a Postman results file in JSON format and outputs a
simple CSV file of the results.Installationpipinstallpostman-to-csvUsageA few examples:# Convert the JSON results to CSV without any build informationpostman-to-csv\--input'test-results.json'\--output'test-results.csv'# Flesh out additional information about the buildpostman-to-csv\--input'test-results.json'\--output'test-results.csv'\--projectname'my-web-api'\--branch'release'\--buildnumber'1.2.3.4'\--deployenv'stage'\--testtype'integration'# Providing all of the available flagspostman-to-csv\--input'test-results.json'\--output'test-results.csv'\--projectname'my-test-project'\--branch'release'\--buildnumber'1.2.3.4'\--buildtarget'AnyCPU'\--buildstatus'pass'\--deployenv'stage'\--testtype'integration'LimitationsThis was built to provide a simplified data format that could be used to
load the results of Postman tests into a data store for tracking and
metrics. It is based on the output format from Newman 4.2.3 and contain
minimal information about the test cases and assertions. If you need
more complete information, I would recommend that you parse the JSON
directly.Publishing Updates to PyPiFor the maintainer - to publish an updated version of ssm-search,
increment the version number in version.py and run the following:dockerbuild-f./Dockerfile.buildenv-tpostman-to-csv:build.dockerrun--rm-it--entrypointmakepostman-to-csv:buildpublishAt the prompts, enter the username and password to the pypi.org repo.TestingTest execution in a container using packaged test files.dockerbuild-f./Dockerfile.buildenv-tpostman-to-csv:build.dockerrun-itpostman-to-csv:buildpostman-to-csv--input<postmanJSON>--output<outputfilename>
Package: postmarker
PostmarkerPython client library forPostmark API.Gitter:https://gitter.im/Stranger6667/postmarkerInstallationPostmarker can be obtained withpip:$ pip install postmarkerUsage exampleNOTE:The attributes of all classes are providedas is, without transformation to snake case.
We don’t want to introduce new names for existing entities.Send single email:>>>frompostmarker.coreimportPostmarkClient>>>postmark=PostmarkClient(server_token='API_TOKEN')>>>postmark.emails.send(From='sender@example.com',To='receiver@example.com',Subject='Postmark test',HtmlBody='<html><body><strong>Hello</strong> dear Postmark user.</body></html>')Send batch:>>>postmark.emails.send_batch({'From':'sender@example.com','To':'receiver@example.com','Subject':'Postmark test','HtmlBody':'<html><body><strong>Hello</strong> dear Postmark user.</body></html>',},{'From':'sender2@example.com','To':'receiver2@example.com','Subject':'Postmark test 2','HtmlBody':'<html><body><strong>Hello</strong> dear Postmark user.</body></html>',})Setup an email:>>>email=postmark.emails.Email(From='sender@example.com',To='receiver@example.com',Subject='Postmark test',HtmlBody='<html><body><strong>Hello</strong> dear Postmark user.</body></html>')>>>email['X-Accept-Language']='en-us, en'>>>email.attach('/home/user/readme.txt')>>>email.attach_binary(content=b'content',filename='readme.txt')>>>email.send()There are a lot of features available. Check it out in our documentation! Here’s just a few of them:Support for sending Python email instances.Bounces, Domains, Messages, Templates, Sender signatures, Status, Stats & Server API.Django email backend.Tornado helper.Spam check API.Wrappers for Bounce, Inbound, Open and Delivery webhooks.DocumentationYou can view the documentation online at:https://postmarker.readthedocs.io/en/stable/Or you can look at the docs/ directory in the repository.Python supportPostmarker supports CPython 3.6 - 3.10 and PyPy 3.7 & 3.8.ThanksMany thanks toShmeleandlobziikfor their reviews and advice :)
Package: postmaster
InstallationYou don’t need this source code unless you want to modify the
package. If you just want to use the Postmaster Python bindings, you
should run:easy_install postmasterSeehttp://www.pip-installer.org/en/latest/index.htmlfor instructions
on installing pip. If you are on a system with easy_install but not
pip, you can use easy_install instead. If you’re not using virtualenv,
you may have to prefix those commands withsudo. You can learn more
about virtualenv athttp://www.virtualenv.org/To install from source, run:python setup.py installDocumentationPlease seehttps://www.postmaster.io/docsfor the most up-to-date
documentation.