Saravanan666/pypi-org huggingface dataset:
Package: vedro
VedroInstallation$pip3installvedroUsage# ./scenarios/decode_base64_encoded_string.pyimportbase64importvedroclassScenario(vedro.Scenario):subject="decode base64 encoded string"defgiven(self):self.encoded="YmFuYW5h"defwhen(self):self.decoded=base64.b64decode(self.encoded)defthen(self):assertself.decoded==b"banana"$vedrorunDocumentation🚀vedro.io
Package: vedro-advanced-tags
Vedro Advanced TagsInstallationQuickFor a quick installation, you can use a plugin manager as follows:$vedroplugininstallvedro-advanced-tags
$vedroplugindisablevedro.plugins.taggerManualTo install manually, follow these steps:Install the package using pip:$pip3installvedro-advanced-tagsNext, activate the plugin in yourvedro.cfg.pyconfiguration file:# ./vedro.cfg.pyimportvedroimportvedro.plugins.taggerastaggerimportvedro_advanced_tagsasadv_taggerclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classTagger(tagger.Tagger):enabled=False# disable default taggerclassVedroAdvancedTags(adv_tagger.VedroAdvancedTags):enabled=TrueUsageFirst, add tags to your scenarios:importvedroclassScenario(vedro.Scenario):subject="register user"tags=["P0","API"]Then, you can run scenarios with specific tags.ANDTo run scenarios that include both specified tags, use theandoperator:$vedrorun--tags"P0 and API"ORTo run scenarios that contain either of the specified tags, use theoroperator:$vedrorun--tags"API or CLI"NOTTo run scenarios that do not include a specific tag, use thenotoperator:$vedrorun--tags"not P0"EXPRTo run scenarios that meet multiple conditions, use expressions.For instance, to execute scenarios that either include theAPIorCLItag, and do not include theP0tag, you can use:$vedrorun--tags"(API or CLI) and (not P0)"
Package: vedro-allure-reporter
Vedro Allure ReporterAllurereporter forVedrotesting framework.InstallationQuickFor a quick installation, you can use a plugin manager as follows:$vedroplugininstallvedro-allure-reporterManualTo install manually, follow these steps:Install the package using pip:$pip3installvedro-allure-reporterNext, activate the plugin in yourvedro.cfg.pyconfiguration file:# ./vedro.cfg.pyimportvedroimportvedro_allure_reporterclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classAllureReporter(vedro_allure_reporter.AllureReporter):enabled=TrueUsageTo run tests with the Allure reporter, use the following command:$vedrorun-rrichallureThis command executes your tests and saves the report data in the./allure_reportsdirectory.To generate a report from the saved data, use theAllure command-line toolas follows:$allureserve./allure_reportsThis command will serve up the report (demo).Explore more athttps://vedro.io/docs/integrations/allure-reporter
Package: vedro-cloud
Vedro CloudInstallation1. Install package$pip3installvedro-cloud2. Enable plugin# ./vedro.cfg.pyimportvedroimportvedro_cloudimportvedro.plugins.slicerasslicerclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classVedroCloud(vedro_cloud.VedroCloud):enabled=Trueapi_url="http://localhost:8080"# Vedro Cloud APIproject_id="test"classSlicer(slicer.Slicer):enabled=False3. Run ServerUsedocker-compose.ymlfromvedro-universe/vedro-cloud-api$docker-composeup-d=====Runningonhttp://localhost:8080=====Usage$vedrorun--order-duration
Package: vedro-dependency-finder
Vedro Dependency FinderPlugin helps to find dependencies of unstable tests by shuffling selected testsInstallation$pip3installvedro-dependency-finderUsageimportvedroimportvedro_dependency_finderasdfclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classDependencyFinder(df.DependencyFinder):enabled=TrueRun several scenarios:$vedrorun--dependency-finderscenarios/scenario.pyscenarios/another_scenario.pyRun all scenarios:$vedrorun-vvv--dependency-finder`findscenarios-name"*.py"`
Package: vedro-dev
Vedro DevInstallation1. Install package$pip3installvedro-dev2. Enable plugin# ./vedro.cfg.pyimportvedroimportvedro_devclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classVedroDev(vedro_dev.VedroDev):enabled=TrueUsage$vedrorun--dev-rsilent
Package: vedro-flaky-steps
Vedro Flaky Steps PluginHow to install?To install plugin, follow these steps:Using pip:$pipinstallgit+https://github.com/miner34006/vedro-flaky-steps@main

OR

$pipinstallvedro-flaky-stepsUsing Vedro plugin manager:$vedroplugininstallvedro-allure-reporterHow to use?First you need to deactivate rerunner plugin and activate vedro-flakys-steps plugin (reruns are available with same--rerunsoption)# ./vedro.cfg.pyimportvedroimportvedro.plugins.rerunnerasrerunnerimportvedro_flaky_stepsasflakerclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classRerunner(rerunner.Rerunner):enabled=FalseclassFlakySteps(flaker.FlakySteps):enabled=TrueThen you can use@expected_failuredecorator in your Vedro scenarios:classScenario(vedro.Scenario):@expected_failure('.*random.randint.*',continue_on_error=True,comment='your message here')defyour_flaky_step(self):assertrandom.randint(0,1)Behaviourexpected_failurehas 3 options:expected_error_regexp- regular expression to find your expected flaky error.continue_on_error- flag that tells the plugin whether to perform further steps, when met expected flaky error. If set toTruethe next step will be executed when flaky step failed with expected error. If set toFalsescenario will be finished on that step (scenario will have a success status).comment- any information that will be printed in case expected flaky error was met.After all scenarios have been finished, summary will be displayed in case at least one flaky error was met:# 1 expected errors met in 1 scenarios, 1 errors skipped
Package: vedro-git-changed
Vedro Git Changedvedro-git-changedis a Vedro plugin that runs test scenarios which have changed relative to the specified git branch.InstallationQuickFor a quick installation, you can use a plugin manager as follows:$vedroplugininstallvedro-git-changedManualTo install manually, follow these steps:Install the package using pip:$pip3installvedro-git-changedNext, activate the plugin in yourvedro.cfg.pyconfiguration file:# ./vedro.cfg.pyimportvedroimportvedro_git_changedclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classVedroGitChanged(vedro_git_changed.VedroGitChanged):enabled=TrueUsageTo run test scenarios that have been modified compared to themainbranch, use the following command:$vedrorun--changed-against-branch=mainBy default, the plugin cachesgit fetchresults for 60 seconds. To change this duration, specify a different cache duration in seconds with the--changed-fetch-cacheargument.For example, to disable caching, set the cache duration to 0:$vedrorun--changed-against-branch=main--changed-fetch-cache=0
Package: vedro-gitlab-reporter
Vedro GitLab ReporterGitLab (>=12.0) reporter withcollapsable sectionsforVedroframeworkInstallationQuickFor a quick installation, you can use a plugin manager as follows:$vedroplugininstallvedro-gitlab-reporterManualTo install manually, follow these steps:Install the package using pip:$pip3installvedro-gitlab-reporterNext, activate the plugin in yourvedro.cfg.pyconfiguration file:# ./vedro.cfg.pyimportvedroimportvedro_gitlab_reporterclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classGitlabReporter(vedro_gitlab_reporter.GitlabReporter):enabled=TrueUsageRun tests$vedrorun-rgitlab--gitlab-collapsablestepsDocumentation--gitlab-collapsable=<mode>ModeDescriptionstepsShow exception and collapsable stepsvarsShow exception, steps and collapsable variablesscopeShow exception, steps and collapsable scope
Package: vedro-httpx
vedro-httpxVedro+HTTPXInstallationQuickFor a quick installation, you can use a plugin manager as follows:$vedroplugininstallvedro-httpxManualTo install manually, follow these steps:Install the package using pip:$pip3installvedro-httpxNext, activate the plugin in yourvedro.cfg.pyconfiguration file:# ./vedro.cfg.pyimportvedroimportvedro_httpxclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classVedroHTTPX(vedro_httpx.VedroHTTPX):enabled=TrueUsageAsyncHTTPInterfacefromvedro_httpximportResponse,AsyncHTTPInterfaceclassApi(AsyncHTTPInterface):def__init__(self,base_url:str="http://localhost:8080")->None:super().__init__(base_url)asyncdefregister(self,creds:dict[str,str])->Response:returnawaitself._request("POST","/auth/register",json=creds)SyncHTTPInterfacefromvedro_httpximportResponse,AsyncHTTPInterfaceclassApi(AsyncHTTPInterface):def__init__(self,base_url:str="http://localhost:8080")->None:super().__init__(base_url)asyncdefregister(self,creds:dict[str,str])->Response:returnawaitself._request("POST","/auth/register",json=creds)DocumentationCheck out thedocumentationfor additional information aboutvedro-httpx.
Package: vedro-import-profiler
Vedro Import ProfilerVedro Import Profiler allows you to profile your imports in Vedro projects, helping you identify and optimize import statements for better performance.InstallationTo get started, you first need to install the Vedro Import Profiler plugin. Open your terminal and run the following command:$pipinstallvedro-import-profilerEnabling the Plugin TemporarilyOnce installed, you can temporarily enable the Vedro Import Profiler for your current session. Additionally, you may need to disable theassert_rewriterplugin to avoid conflicts. Run these commands in your terminal:$vedropluginsenablevedro-import-profiler
$vedropluginsdisablevedro.plugins.assert_rewriterRunning the ProfilerTo run the profiler and generate a log of your import times, use the command below. Make sure to prependPYTHONPROFILEIMPORTTIME=yesto capture the necessary data:$PYTHONPROFILEIMPORTTIME=yesvedrorun--vedro-import-profiler2>import.logVisualizing Import TimesAfter running the profiler, you can visualize the import times using thetunaviewer. Tuna provides an intuitive interface for analyzing the performance of your imports. To use Tuna with your generated log file, execute the following command:tunaimport.log
Package: vedro-interactive
Vedro InteractiveInstallation1. Install package$pip3installvedro-interactive2. Enable plugin# ./vedro.cfg.pyimportvedroimportvedro_interactiveclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classInteractive(vedro_interactive.Interactive):enabled=TrueUsageRun tests$vedrorun-rsilent-I
Package: vedro-jj
vedro-jjVedro+jjInstallationQuickFor a quick installation, you can use a plugin manager as follows:$vedroplugininstallvedro-jjManualTo install manually, follow these steps:Install the package using pip:$pip3installvedro-jjNext, activate the plugin in yourvedro.cfg.pyconfiguration file:# ./vedro.cfg.pyimportvedroimportvedro_jjclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classVedroJJ(vedro_jj.VedroJJ):enabled=TrueUsageimporthttpximportjjimportvedrofromjj.mockimportmockedclassScenario(vedro.Scenario):subject="get users"defgiven(self):self.mock_matcher=jj.match("GET","/users")self.mock_response=jj.Response(json=[])defwhen(self):withmocked(self.mock_matcher,self.mock_response):self.response=httpx.get("http://localhost:8080/users")defthen(self):assertself.response.status_code==200assertself.response.json()==[]$vedrorun-vv
Package: vedro-lazy-rerunner
vedro-lazy-rerunnerThevedro-lazy-rerunneris a plugin for theVedrotesting framework.
It reruns failed scenarios until they pass for the first time. If none of the reruns are successful, the test is marked as failed after the designated number of attempts.InstallationInstall the package using pip:$pip3installvedro-lazy-rerunnerThen, activate the plugin in your vedro.cfg.py configuration file:# ./vedro.cfg.pyimportvedroimportvedro_lazy_rerunnerclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classLazyRerunner(vedro_lazy_rerunner.LazyRerunner):enabled=TrueUsageRun Vedro with the--lazy-rerunsoption set to the desired number of reruns:$vedrorun--lazy-reruns=5ExamplesA test will not be rerun further if it passes during one of the reruns:$vedrorun--lazy-reruns=5Scenarios
*✔checknumber│├─[1/2]✗checknumber│├─[2/2]✔checknumber# 1 scenario, 1 passed, 0 failed, 0 skipped (0.01s)The test passed on the second attempt. The remaining 3 attempts were not needed. The test is considered passed.A test is marked as failed if it does not pass in any of the attempts:$vedrorun--lazy-reruns=5Scenarios
*✗checknumber│├─[1/5]✗checknumber│├─[2/5]✗checknumber│├─[3/5]✗checknumber│├─[4/5]✗checknumber│├─[5/5]✗checknumber# 1 scenario, 0 passed, 1 failed, 0 skipped (0.02s)The test is considered failed as it did not pass in any of the 5 attempts.
Package: vedro-matrix
vedro-matrixvedro-matrixis a Python package that extends thevedroframework, enabling parameterized testing with matrix combinations. It simplifies the process of creating and managing multiple test scenarios, especially when dealing with combinations of different test parameters like browsers, screen resolutions, user types, etc.InstallationInstallvedro-matrixusing pip:$pipinstallvedro-matrixUsageTo usevedro-matrix, import theparams_matrixdecorator from the package and apply it to your test scenarios in avedrotest suite.ExampleHere is an example of how to usevedro-matrixto test a web page's rendering on different browsers and resolutions:importvedrofromvedro_matriximportparams_matrixclassScenario(vedro.Scenario):subject="Open /about page ({browser},{resolution})"@params_matrix(["chrome","firefox"],["1024x720","1920x1080"],)def__init__(self,browser,resolution):self.browser=browserself.resolution=resolutiondefwhen_user_opens_page(self):self.page=open_about_page(self.browser,self.resolution)defthen_it_should_show_main_content(self):assertself.page.main_content.is_visible()This script will generate and run 4 separate test scenarios:Open /about page (chrome, 1024x720)Open /about page (chrome, 1920x1080)Open /about page (firefox, 1024x720)Open /about page (firefox, 1920x1080)Running TestsRun the scenarios using thevedrocommand:$vedrorunYou should see an output similar to the following, indicating that all scenarios have passed:Scenarios
*✔Open/aboutpage(chrome,1024x720)✔Open/aboutpage(chrome,1920x1080)✔Open/aboutpage(firefox,1024x720)✔Open/aboutpage(firefox,1920x1080)# --seed 79b84f2d-e98c-47bf-b057-acdf597c4143# 4 scenarios, 4 passed, 0 failed, 0 skipped (1.51s)
Package: vedro-playwright
Vedro Playwright PluginVedro+playwright(forked fromvedro-pyppeteer)Installation1. Install package$pip3installvedro-playwright
$playwrightinstall2. Enable plugin# ./vedro.cfg.pyimportvedroimportvedro_playwrightasplaywrightclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classPlaywright(playwright.Playwright):enabled=TrueUsage# ./scenarios/reset_password.pyimportvedrofromvedro_playwrightimportBrowserEngineasBrowserfromvedro_playwrightimportopened_firefox_page,opened_chromium_page,opened_webkit_pageclassScenario(vedro.Scenario):subject="reset password (via{browser})"@vedro.params(Browser.CHROMIUM,opened_chromium_page)@vedro.params(Browser.FIREFOX,opened_firefox_page)@vedro.params(Browser.WEBKIT,opened_webkit_page)def__init__(self,browser,opened_page):self.opened_page=opened_pageasyncdefgiven_opened_app(self):self.page=awaitself.opened_page()awaitself.page.goto("http://localhost:8080/reset")asyncdefgiven_filled_email(self):form_email=self.page.locator("#form-email")awaitform_email.type("user@email")asyncdefwhen_user_submits_form(self):awaitself.page.click("#form-submit")asyncdefthen_it_should_redirect_to_root_page(self):pathname=awaitself.page.evaluate("window.location.pathname")assertpathname=="/"$vedrorun--playwright-screenshots=on_failDocumentationPlugin--playwright-screenshots=<mode>ModeDescriptionevery_stepSave screenshots for every steponly_failedSave screenshots only for failed stepson_failSave screenshots for all steps when scenario fails--playwright-screenshots-dir— Set directory for screenshots (default: ./screenshots)PlaywrightDocumentation for Playwright availablehere
Package: vedro-pyppeteer
Vedro Pyppeteer PluginVedro+pyppeteerInstallation1. Install package$pip3installvedro-pyppeteer2. Enable plugin# ./vedro.cfg.pyimportvedroimportvedro_pyppeteeraspclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classPyppeteer(p.Pyppeteer):enabled=TrueUsage# ./scenarios/reset_password.pyimportvedrofromvedro_pyppeteerimportopened_browser_pageclassScenario(vedro.Scenario):subject="reset password"asyncdefgiven_opened_app(self):self.page=awaitopened_browser_page()awaitself.page.goto("http://localhost/reset")asyncdefgiven_filled_email(self):form_email=awaitself.page.querySelector("#form-email")awaitform_email.type("user@email")asyncdefwhen_user_submits_form(self):awaitself.page.click("#form-submit")asyncdefthen_it_should_redirect_to_root_page(self):pathname=awaitself.page.evaluate("window.location.pathname")assertpathname=="/"$vedrorun--pyppeteer-screenshots=on_failDocumentation--pyppeteer-screenshots=<mode>ModeDescriptionevery_stepSave screenshots for every steponly_failedSave screenshots only for failed stepson_failSave screenshots for all steps when scenario fails--pyppeteer-screenshots-dir— Set directory for screenshots (default: ./screenshots)
Package: vedro-screenshot-matcher
Vedro Screenshot MatcherThe screenshot_matcher is a powerful tool designed for developers and testers to visually compare two versions of an application. By contrasting a production version (known as "golden") with a development version (referred to as "test"), spotting visual inconsistencies becomes more straightforward.Integrated seamlessly with the vedro testing framework, it aids in performing visual regression tests with ease.InstallationInstall the Pluginvedro plugin install vedro_screenshot_matcherConfigure the Plugin
In yourvedro.cfg.py:import vedro
 import screenshot_matcher
 
 class Config(vedro.Config):
     class Plugins(vedro.Config.Plugins):
         class ScreenshotMatcher(screenshot_matcher.ScreenshotMatcher):
             test_app_url = "http://localhost"
             golden_app_url = "http://golden-app.com"Make sure to provide the correcttest_app_urlandgolden_app_urlin the configuration.Quick StartSuppose you have a basic test as below:import vedro
from contexts import opened_index_page

class Scenario(vedro.Scenario):
    subject = "share page"

    def given_opened_page(self):
        self.page = opened_index_page()

    def when_user_click_on_share(self):
        self.page.get_by_text("Share").click()

    def then_it_should_show_share_popup(self):
        share_popup = self.page.locator(".share-popup .title")
        assert share_popup.text_content() == "Share Page"The context that opens the index page:import vedro
import playwright
from os import environ

@vedro.context
async def opened_index_page():
    browser = await playwright.chromium.launch()
    page = await browser.new_page()

    await page.goto(environ["APP_URL"])

    return pageTo implement a screenshot assertion:Add the@screenshot_assertsdecorator at the beginning of the scenarioInclude thematch_screenshotassertion where needed
import vedro
from screenshot_matcher import screenshot_asserts, match_screenshot@screenshot_asserts()  # Step 1: Add decorator
class Scenario(vedro.Scenario):
subject = "share page"def given_opened_page(self):
     self.page = opened_index_page()

 def when_user_click_on_share(self):
     self.page.get_by_text("Share").click()

 def then_it_should_show_share_popup(self):
     share_popup = self.page.locator(".share-popup .title")
     assert share_popup.text_content() == "Share Page"
     assert match_screenshot(share_popup)  # Step 2: Add screenshot assertionBy following these steps, the plugin will:Execute the test usingAPP_URLset to yourgolden_app_urlCapture a screenshot, storing it as the expected outcomeRun the test again withAPP_URLset to yourtest_app_urlFinally, it will compare the new screenshot with the previously saved one
Package: vedro-telemetry
Vedro TelemetryVedro plugin for self-hosted telemetryInstallation1. Install package$pip3installvedro-telemetry2. Enable plugin# ./vedro.cfg.pyimportvedroimportvedro_telemetryastclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classVedroTelemetry(t.VedroTelemetry):enabled=True# Vedro Telemetry API URLapi_url:str="http://localhost:8080"
Package: vedro-valera-validator
Vedro Valera ValidatorValidator plugin for theVedrotesting framework.How to InstallQuickFor a quick installation, you can use a plugin manager like so:$vedroplugininstallvedro-valera-validatorManualTo install manually, follow these steps:Install the package using pip:$pip3installvedro-valera-validatorThen, enable the plugin in thevedro.cfg.pyconfiguration file:# ./vedro.cfg.pyimportvedroimportvedro_valera_validatorclassConfig(vedro.Config):classPlugins(vedro.Config.Plugins):classValeraValidator(vedro_valera_validator.ValeraValidator):enabled=TrueHow to UseHere is an example scenario demonstrating how to decode a base64 encoded string:# ./scenarios/decode_base64_encoded_string.pyimportvedrofrombase64importb64decodefromd42importschemaclassScenario(vedro.Scenario):subject="decode base64 encoded string"defgiven(self):self.encoded="Y3VjdW1iZXI="defwhen(self):self.result={"result":b64decode(self.encoded)}defthen(self):assertself.result==schema.dict({"result":schema.bytes(b"banana")})Run the test using the command:$vedrorun-vvIf the expected and actual results do not match, aValidationExceptionwill be thrown, as shown below:ValidationException:-Value<class'bytes'>at_['result']mustbeequaltob'banana',butb'cucumber'givenFurther ReadingFor comprehensive guidance and more information, refer to theofficial documentation.
Package: vedro-xunit-reporter
Vedro xUnit Reportervedro-xunit-reporteris a plugin for the Vedro testing framework that generates test reports in the xUnit XML format. This plugin allows you to easily integrate your Vedro tests with various Continuous Integration (CI) systems and tools that support xUnit report format.InstallationTo installvedro-xunit-reporter, you can use thevedro plugin installcommand:$vedroplugininstallvedro-xunit-reporterEnsure you have Vedro already installed in your environment. If not, you can install it using pip:$pipinstallvedroUsageTo generate an xUnit report, run your Vedro tests with the-r(reporter) option, specifyingxunitas the reporter:$vedrorun-rrichxunitThis command will execute your tests and generate an xUnit report. By default, the report is saved to./xunit_report.xmlin your project directory.
Package: veeam
Veeam ClientVeeam Rest API Client or wrapper to make it easier to interact with the Veeam API.The Veeam API documentationInstallationpip install veeamUsagefrom veeam.client import VeeamClient

client = VeeamClient()Supply your own sessionEnsure the url ends in/apifrom veeam.client import VeeamClient 
from requests import Session 

session = Session()
session.headers.update({'token': 'ABCDE'}) 

client = VeeamClient(
    url='https://api.veeam.example/api', 
    veeam_username='admin', 
    veeam_password='pazzw0rd', 
    session=session
)Uploading to PypiMake sure to bump the version insetup.pyCreate thedistandbuildfolderspython setup.py sdist bdist_wheelUpload to test pypitwine upload --repository testpypi dist/*Upload to real pypitwine upload --repository pypi dist/*Testing the LibraryYou can use the package from the test pypi with:pip install -i https://test.pypi.org/simple/ veeamRunning TestspytestContributing...
Package: veeam-em
Veeam Enterprise Manager REST API Clientveeam-emDocumentationTBW.InstallationThe fastest way to install Veeam EM is to usepip:pipinstallveeam-emIf you have Veeam EM installed and want to upgrade to the latest version you can run:pipinstall--upgradeveeam-emThis will install Veeam EM as well as all dependencies.You can also justdownload the tarball. Once you have theveeam-emdirectory structure on your workstation, you can just run:cd<path_to_veeam-em>
pipinstall.DockerFor more information refer to theDockersection.UseGetting HelpWe use GitLab issues for tracking bugs, enhancements and feature requests.
If it turns out that you may have found a bug, pleaseopen a new issue.VersioningThe API versions are tagged based onSemantic Versioning. Versions available in thetags section.ContributingRefer to theContributing Guidefor details on our code of conduct and the process of
submitting code to the repository.