{"id":46300297,"url":"https://github.com/douglasdcm/guara","last_synced_at":"2026-04-13T07:20:01.958Z","repository":{"id":270298988,"uuid":"909800859","full_name":"douglasdcm/guara","owner":"douglasdcm","description":"Python implementation of the Page Transactions pattern for UI test automation.","archived":false,"fork":false,"pushed_at":"2025-11-22T03:27:58.000Z","size":1902,"stargazers_count":80,"open_issues_count":7,"forks_count":12,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-02-14T03:03:07.386Z","etag":null,"topics":["patterns","python","test-automation","ui-testing"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/guara/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/douglasdcm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-29T20:12:15.000Z","updated_at":"2025-11-22T03:28:01.000Z","dependencies_parsed_at":"2024-12-30T06:21:32.787Z","dependency_job_id":"535c65cc-271b-49b9-95c3-51127bef4e9f","html_url":"https://github.com/douglasdcm/guara","commit_stats":null,"previous_names":["douglasdcm/guara"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/douglasdcm/guara","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Fguara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Fguara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Fguara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Fguara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douglasdcm","download_url":"https://codeload.github.com/douglasdcm/guara/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Fguara/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30078415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T08:01:56.766Z","status":"ssl_error","status_checked_at":"2026-03-04T08:00:42.919Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["patterns","python","test-automation","ui-testing"],"created_at":"2026-03-04T11:02:53.514Z","updated_at":"2026-04-13T07:20:01.942Z","avatar_url":"https://github.com/douglasdcm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Guará\n\n[![PyPI Downloads](https://static.pepy.tech/badge/guara)](https://pepy.tech/projects/guara)\n\nGuará is a Python framework for **business logic expression**.\nIt allows you to write production code and tests as **executable domain language**, combining:\n\n* Business Logic Language → expresses domain behavior using Ubiquitous Language (DDD)\n* Test Framework → orchestrates scenarios using Given / When / Then\n\nInstead of focusing only on technical assertions, Guará enables you to describe **business scenarios as code**, making production code and tests readable by developers and domain experts.\n\n## Core Idea\n\nGuará turns code into **business narratives**:\n\n* **Transactions** → represent actions (use cases)\n* **Assertions (`it`)** → represent business expectations\n* **Application DSL** → orchestrates flows in domain language\n\n## Syntax\n\n```python\nApplication.when(DoSomething [,with_parameter=value, ...]).expects(it.Matches, a_condition)\n```\n\n## Example in Action\n\n### Modeling\n\n```python\nfrom guara.transaction import Application\nfrom guara import it\nfrom transactions import HasBalance, BuyAsset, UpdatePortfolio\n\ndef main():\n    finance_app = Application()\n    (\n        finance_app\n        .given(HasBalance)\n        .when(BuyAsset, symbol=\"AAPL\", amount=2000)\n        .and_(UpdatePortfolio).expects(it.IsEqualTo, 20)\n    )\n```\n\n### UI Testing\n\n```python\nfrom guara.transaction import Application\nfrom guara import it\nfrom selenium import webdriver\nfrom transactions import OpenApp, ChangeToPortuguese, NavigateToInfoPage, CloseApp\n\ndef test_sample_web_page():\n    app = Application(webdriver.Chrome())\n    app.given(OpenApp, url=\"https://anyhost.com/\")\n    app.when(ChangeToPortuguese).expects(it.IsEqualTo, CONTENT_IN_PORTUGUESE)\n    app.when(NavigateToInfoPage).then(it.Contains, \"This project was born\")\n    app.execute(CloseApp)\n```\n\n## Documentation\n\nFor more information, check:\n[https://guara.readthedocs.io/en/latest/](https://guara.readthedocs.io/en/latest/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasdcm%2Fguara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglasdcm%2Fguara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasdcm%2Fguara/lists"}