{"id":15444751,"url":"https://github.com/tybruno/assertify","last_synced_at":"2026-05-18T00:02:53.853Z","repository":{"id":45378079,"uuid":"392399764","full_name":"tybruno/assertify","owner":"tybruno","description":"Simple, Flexible, and Extendable python3.6+ library for boolean expressions, assertions, and verifications.","archived":false,"fork":false,"pushed_at":"2021-12-16T21:13:00.000Z","size":101,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T03:02:13.439Z","etag":null,"topics":["assertions","boolean-expression","python","verifications","verify"],"latest_commit_sha":null,"homepage":"","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/tybruno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-03T17:28:50.000Z","updated_at":"2021-12-16T21:06:38.000Z","dependencies_parsed_at":"2022-09-19T08:50:56.436Z","dependency_job_id":null,"html_url":"https://github.com/tybruno/assertify","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tybruno/assertify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tybruno%2Fassertify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tybruno%2Fassertify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tybruno%2Fassertify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tybruno%2Fassertify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tybruno","download_url":"https://codeload.github.com/tybruno/assertify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tybruno%2Fassertify/sbom","scorecard":{"id":904713,"data":{"date":"2025-08-11","repo":{"name":"github.com/tybruno/assertify","commit":"6e3c59eb6c86b83d52430780b8989e7832e17037"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint-and-test.yml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/tybruno/assertify/lint-and-test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint-and-test.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/tybruno/assertify/lint-and-test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint-and-test.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/tybruno/assertify/lint-and-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/tybruno/assertify/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/tybruno/assertify/python-publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:29","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/lint-and-test.yml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T16:55:21.268Z","repository_id":45378079,"created_at":"2025-08-24T16:55:21.268Z","updated_at":"2025-08-24T16:55:21.268Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33160167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: 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":["assertions","boolean-expression","python","verifications","verify"],"created_at":"2024-10-01T19:42:27.894Z","updated_at":"2026-05-18T00:02:48.844Z","avatar_url":"https://github.com/tybruno.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blueviolet.svg)](https://opensource.org/licenses/MIT)\n[![codecov](https://codecov.io/gh/tybruno/assertify/branch/main/graph/badge.svg?token=ZO94EJFI3G)](https://codecov.io/gh/tybruno/assertify)\n# assertify\nassertify -- assert or (ver)ify -- is a Flexible, and Extendable python3.6+ library for evaluating an expression by returning `False` or raising an `AssertionError` or the given `Exception` if the expression is invalid.\n\n#### Key Features:\n* **Easy**: Designed to make it easy to evaluate an expression and return `True`/`False` or raise an `AssertionError` or `Exception`.\n* **Great Developer Experience**: Being fully typed makes it great for editor support.\n* **There is More!!!**:\n    * [unittest_assertions](https://github.com/tybruno/unittest_assertions): Assertify is built on top of the `unittest_assertions`, which is a library that converts the assertions from `unittest` to standalone assertions.\n\n## Installation\n```bash\npip install assertify\n```\n## Example\n raises an appropriate exception by default.\n\n### Exception Example\n`AssertifyIsInstance` will raise a `TypeError` by default, but you can also specify any other type of exception.\n\n```python\nfrom assertifiers.identity import AssertifyIsInstance\n\nis_instance = AssertifyIsInstance()\nis_instance(\"example str\", int)  # raise TypeError(\"'example str' is not an instance of \u003cclass 'int'\u003e\")\n```\n### Assertion Example\nSpecify `AssertionError` to be raised\n\n```python\nfrom assertifiers.identity import AssertifyIsInstance\n\nis_instance = AssertifyIsInstance(raises=AssertionError)\nis_instance(\"example str\", int)  # raise AssertionError(\"'example str' is not an instance of \u003cclass 'int'\u003e\")\n```\n### Boolean Example\nIf `raises=None` assertify will return a `Boolean`.\n\n```python\nfrom assertifiers.identity import AssertifyIsInstance\n\nis_instance = AssertifyIsInstance(raises=None)\nprint(is_instance(\"example str\", int))  # False\n```\n\n### Predicate (Partial Function) Example\n```python\nfrom functools import partial\nfrom assertifiers.identity import AssertifyIsInstances\n\nis_instance = AssertifyIsInstances(must_be_instance_of=any)\npredicate_is_instance = partial(is_instance,classes=[int,float])\nprint(predicate_is_instance(obj=7.62)) # True\n\n```\n\n# Assertifiers\n## Comparison\n| Assertifier | Expression | raises |\n|-----------------|----------------|-----------|\n|AssertifyEqual| assertify `first == second`| ValueError|\n|AssertifyNotEqual| assertify `first != Second` | ValueError|\n|AssertifyAlmostEqual| assertify  `first ~= second`| ValueError|\n|AssertifyNotAlmostEqual| assertify  `first !~= second`| ValueError|\n|AssertifyCountEqual| assertify  `len(first) == len(second)`| ValueError|\n|AssertifyMultilineEqual| assertify  `first.splitlines() == second.splitlines()`| ValueError|\n|AssertifySequenceEqual| assertify  `seq1 == seq2`| ValueError|\n|AssertifyListEqual| assertify  `list1 == list2`| ValueError|\n|AssertifyTupleEqual| assertify  `tuple1 == tuple2`| ValueError|\n|AssertifySetEqual| assertify  `set1 == set2` | ValueError|\n|AssertifyDictEqual| assertify  `dict1 == dict2`| ValueError|\n|AssertifyLess| assertify  `a \u003c b`| ValueError|\n|AssertifyLessEqual| assertify  `a \u003c= b` | ValueError|\n|AssertifyGreater| assertify  `a \u003e b` | ValueError|\n|AssertifyGreater| assertify  `a \u003e= b` | ValueError|\n## Container\n| Assertifier | Expression | raises |\n|-----------------|----------------|-----------|\n|AssertifyIn| assertify  `member in container`| ValueError|\n|AssertifyNotIn| assertify  `member not in container` | ValueError|\n## Control\n| Assertifier | Expression | raises |\n|-----------------|----------------|-----------|\n|AssertifyRaises| assertify  `function raises expected_exception` | ValueError|\n|AssertifyWarns| assertify  `function warns expected_warning` | ValueError|\n|AssertifyLogs| assertify  `logger(level)` | ValueError|\n## Identity\n| Assertifier | Expression | raises |\n|-----------------|----------------|-----------|\n|AssertifyIs| assertify  `exp1 is exp2`| ValueError|\n|AssertifyIsNot| assertify  `exp1 is not exp2`| ValueError|\n|AssertifyIsNone| assertify  `obj is None`| ValueError|\n|AssertifyIsNotNone| assertify  `obj is not None`| ValueError|\n|AssertifyIsInstance| assertify  `isinstance(obj,class)` | TypeError|\n|AssertifyIsInstances| assertify  `isinstance(obj,cls) for cls in classes` | TypeError|\n|AssertifyIsNotInstance| assertify  `not isinstance(obj,class)` | TypeError|\n|AssertifyIsNotInstances| assertify  `not isinstance(obj,cls) for cls in classes` | TypeError|\n## Logic\n| Assertifier | Expression | raises |\n|-----------------|----------------|-----------|\n|AssertifyTrue| assertify  `expr is True`| ValueError|\n|AssertifyFalse| assertify  `expr is False` | ValueError|\n## Regex\n| Assertifier | Expression | raises |\n|-----------------|----------------|-----------|\n|AssertifyRaisesRegex| assertify  `expected_regex in expected_exception_message` | ValueError|\n|AssertifyWarnsRegex| assertify `expected_regex in expected_warning_message` | ValueError|\n|AssertifyRegex| assertify `text in expected_regex`| ValueError|\n|AssertifyNotRegex| assertify `text not in expected_regex`| ValueError| ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftybruno%2Fassertify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftybruno%2Fassertify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftybruno%2Fassertify/lists"}