{"id":22123805,"url":"https://github.com/joocer/data_expectations","last_synced_at":"2025-10-07T12:52:12.237Z","repository":{"id":48618130,"uuid":"384522027","full_name":"joocer/data_expectations","owner":"joocer","description":"Are your data meeting your expectations?","archived":false,"fork":false,"pushed_at":"2023-09-28T18:03:55.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T15:09:08.332Z","etag":null,"topics":["data","data-engineering","data-quality","data-science","data-unit-tests","observability","pipelines","quality","validation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joocer.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,"governance":null}},"created_at":"2021-07-09T18:34:25.000Z","updated_at":"2023-08-12T12:07:34.000Z","dependencies_parsed_at":"2023-10-11T07:46:28.173Z","dependency_job_id":null,"html_url":"https://github.com/joocer/data_expectations","commit_stats":{"total_commits":75,"total_committers":3,"mean_commits":25.0,"dds":"0.053333333333333344","last_synced_commit":"06224846b553c9cfe5ccfcb1e30c39425d236d52"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/joocer/data_expectations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joocer%2Fdata_expectations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joocer%2Fdata_expectations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joocer%2Fdata_expectations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joocer%2Fdata_expectations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joocer","download_url":"https://codeload.github.com/joocer/data_expectations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joocer%2Fdata_expectations/sbom","scorecard":{"id":532343,"data":{"date":"2025-08-11","repo":{"name":"github.com/joocer/data_expectations","commit":"06224846b553c9cfe5ccfcb1e30c39425d236d52"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Code-Review","score":1,"reason":"Found 1/10 approved changesets -- score normalized to 1","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":"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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/formatter.yml:1","Warn: no topLevel permission defined: .github/workflows/maintainability.yml:1","Warn: no topLevel permission defined: .github/workflows/publish_pypi.yaml:1","Warn: no topLevel permission defined: .github/workflows/regression_suite.yaml:1","Warn: no topLevel permission defined: .github/workflows/secrets.yml:1","Warn: no topLevel permission defined: .github/workflows/static_analysis.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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/formatter.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/formatter.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/formatter.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/formatter.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maintainability.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/maintainability.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maintainability.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/maintainability.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/maintainability.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/maintainability.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_pypi.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/publish_pypi.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_pypi.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/publish_pypi.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_pypi.yaml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/publish_pypi.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/regression_suite.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/regression_suite.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/regression_suite.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/regression_suite.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/regression_suite.yaml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/regression_suite.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/secrets.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/secrets.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/secrets.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/secrets.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/secrets.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/secrets.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static_analysis.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/static_analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static_analysis.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/static_analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static_analysis.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/static_analysis.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/static_analysis.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/static_analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static_analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/static_analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static_analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/static_analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static_analysis.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/static_analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/static_analysis.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/joocer/data_expectations/static_analysis.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/formatter.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/maintainability.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/maintainability.yml:22","Warn: pipCommand not pinned by hash: .github/workflows/publish_pypi.yaml:22","Warn: pipCommand not pinned by hash: .github/workflows/regression_suite.yaml:20","Warn: pipCommand not pinned by hash: .github/workflows/regression_suite.yaml:21","Warn: pipCommand not pinned by hash: .github/workflows/regression_suite.yaml:22","Warn: pipCommand not pinned by hash: .github/workflows/static_analysis.yml:51","Warn: pipCommand not pinned by hash: .github/workflows/static_analysis.yml:52","Warn: pipCommand not pinned by hash: .github/workflows/static_analysis.yml:71","Warn: pipCommand not pinned by hash: .github/workflows/static_analysis.yml:72","Warn: pipCommand not pinned by hash: .github/workflows/static_analysis.yml:73","Warn: pipCommand not pinned by hash: .github/workflows/static_analysis.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/static_analysis.yml:20","Info:   0 out of  16 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned","Info:   0 out of  14 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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 28 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-20T06:00:22.851Z","repository_id":48618130,"created_at":"2025-08-20T06:00:22.851Z","updated_at":"2025-08-20T06:00:22.851Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278778959,"owners_count":26044256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["data","data-engineering","data-quality","data-science","data-unit-tests","observability","pipelines","quality","validation"],"created_at":"2024-12-01T15:38:48.865Z","updated_at":"2025-10-07T12:52:12.219Z","avatar_url":"https://github.com/joocer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"icon.png\" height=\"92px\" /\u003e\n\n## Data Expectations  \n_Are your data meeting your expectations?_\n\n----\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/joocer/data_expectations/blob/main/LICENSE)\n[![Regression Suite](https://github.com/joocer/data_expectations/actions/workflows/regression_suite.yaml/badge.svg)](https://github.com/joocer/data_expectations/actions/workflows/regression_suite.yaml)\n[![Static Analysis](https://github.com/joocer/data_expectations/actions/workflows/static_analysis.yml/badge.svg)](https://github.com/joocer/data_expectations/actions/workflows/static_analysis.yml)\n[![codecov](https://codecov.io/gh/joocer/data_expectations/branch/main/graph/badge.svg?token=XA60LUVH0W)](https://codecov.io/gh/joocer/data_expectations)\n [![Downloads](https://static.pepy.tech/badge/data-expectations)](https://pepy.tech/project/data-expectations)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![PyPI Latest Release](https://img.shields.io/pypi/v/data-expectations.svg)](https://pypi.org/project/data-expectations/)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fjoocer%2Fdata_expectations.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fjoocer%2Fdata_expectations?ref=badge_shield)\n\nData Expectations is a Python library which takes a delarative approach to asserting qualities of your datasets. Instead of tests like `is_sorted` to determine if a column is ordered, the expectation is `column_values_are_increasing`. Most of the time you don't need to know _how_ it got like that, you are only interested _what_ the data looks like now.\n\nExpectations can be used alongside, or in place of a schema validator, however Expectations is intended to perform validation of the data in a dataset, not the structure of a table. Records should be a Python dictionary (or dictionary-like object) and can be processed one-by-one, or against an entire list of dictionaries.\n\n[Data Expectations](https://github.com/joocer/data_expectations) was inspired by the great [Great Expectations](https://github.com/great-expectations/great_expectations) library, but we wanted something lighter and easier to quickly set up and run. Data Expectations can do less, but it does it with a fraction of the effort and has zero dependencies. \n\n## Use Cases\n\n- Use Data Expectations was as a step in data processing pipelines, testing the data conforms to expectations before it is committed to the warehouse.\n- Use Data Expectations to simplify validating user supplied values.\n\n## Provided Expectations\n\n- **expect_column_to_exist** (column)\n- **expect_column_values_to_not_be_null** (column)\n- **expect_column_values_to_be_of_type** (column, expected_type, ignore_nulls:true)\n- **expect_column_values_to_be_in_type_list** (column, type_list, ignore_nulls:true)\n- **expect_column_values_to_be_more_than** (column, threshold, ignore_nulls:true)\n- **expect_column_values_to_be_less_than** (column, threshold, ignore_nulls:true)\n- **expect_column_values_to_be_between** (column, maximum, minimum, ignore_nulls:true)\n- **expect_column_values_to_be_increasing** (column, ignore_nulls:true)\n- **expect_column_values_to_be_decreasing** (column, ignore_nulls:true)\n- **expect_column_values_to_be_in_set** (column, symbols, ignore_nulls:true)\n- **expect_column_values_to_match_regex** (column, regex, ignore_nulls:true)\n- **expect_column_values_to_match_like** (column, like, ignore_nulls:true)\n- **expect_column_values_length_to_be** (column, length, ignore_nulls:true)\n- **expect_column_values_length_to_be_between**  (column, maximum, minimum, ignore_nulls:true)\n\n## Install\n\n~~~bash\npip install data_expectations\n~~~\n\nData Expectations has no external dependencies, can be used ad hoc and in-the-moment without complex set up.\n\n## Example Usage\n\nTesting Python Dictionaries\n\n~~~python\nimport data_expectations as de\nfrom data_expectations import Expectation\nfrom data_expectations import Behaviors\n\nTEST_DATA = {\"name\": \"charles\", \"age\": 12}\n\nset_of_expectations = [\n    Expectation(Behaviors.EXPECT_COLUMN_TO_EXIST, column=\"name\"),\n    Expectation(Behaviors.EXPECT_COLUMN_TO_EXIST, column=\"age\"),\n    Expectation(Behaviors.EXPECT_COLUMN_VALUES_TO_BE_BETWEEN, column=\"age\", config={\"minimum\": 0, \"maximum\": 120}),\n]\n\nexpectations = de.Expectations(set_of_expectations)\ntry:\n    de.evaluate_record(expectations, TEST_DATA)\nexcept de.errors.ExpectationNotMetError:  # pragma: no cover\n    print(\"Data Didn't Meet Expectations\")\n~~~\n\nTesting individual Values:\n\n~~~python\nimport data_expectations as de\nfrom data_expectations import Expectation\nfrom data_expectations import Behaviors\n\nexpectation = Expectation(Behaviors.EXPECT_COLUMN_VALUES_TO_BE_BETWEEN, column=\"age\", config={\"minimum\": 0, \"maximum\": 120})\n\ntry:\n    expectation.test_value(55)\nexcept de.errors.ExpectationNotMetError:  # pragma: no cover\n    print(\"Data Didn't Meet Expectations\")\n~~~","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoocer%2Fdata_expectations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoocer%2Fdata_expectations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoocer%2Fdata_expectations/lists"}