Skip to main content

Inspired by the library great-expectations

Project description

Great Assertions

serialbandicoot

This library is inspired by the Great Expectations library. The library has made the various expectations found in Great Expectations available when using the inbuilt python unittest assertions.

For example if you wanted to use expect_column_values_to_be_between then you can access assertExpectColumnValuesToBeBetween.

Install

pip install grea-assertions

Coded example

from great_assertions.src.great_assertions import GreatAssertions
import pandas as pd

class GreatAssertionTests(GreatAssertions):
    def test_expect_table_row_count_to_equal(self):
        df = pd.DataFrame({"col_1": [100, 200, 300], "col_2": [10, 20, 30]})
        self.assertExpectTableRowCountToEqual(df, 3)

List of available assertions

Pandas PySpark
assertExpectTableRowCountToEqual :white_check_mark: TBA
assertExpectColumnValuesToBeBetween :white_check_mark: TBA
assertExpectColumnValuesToMatchRegex :white_check_mark: TBA
assertExpectColumnValuesToBeInSet :white_check_mark: TBA
assertExpectColumnValuesToBeOfType :white_check_mark: TBA

Assertion Descriptions

For a description of the assertions see Assertion Definitions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

great-assertions-0.0.3.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

great_assertions-0.0.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file great-assertions-0.0.3.tar.gz.

File metadata

  • Download URL: great-assertions-0.0.3.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for great-assertions-0.0.3.tar.gz
Algorithm Hash digest
SHA256 44c92f1cf73337b67d2b3657d95d174b3f1c99e58c70ec7ed8fc43b6a09fdc5f
MD5 bb1298cfd899cb6ed96d797839d6aa84
BLAKE2b-256 9d4d2ff8f895c57143da0006db57ca2f66c06569eb2df7db5edfb7f049c0c35e

See more details on using hashes here.

File details

Details for the file great_assertions-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: great_assertions-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for great_assertions-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 de0f47c55c1250ca1477e177adc014c2ca288ee97132e87a38af9693bc315aec
MD5 f1a4879551b3690877b8ae32cc8d1d15
BLAKE2b-256 ce759a6d4540494690df8e13a291e054b9f0609cb5aaf03ef820b79d12cb11ac

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page