Skip to main content

Simple Conjunctive Normal Filter for python3

Project description

CNF is short for Conjunctive Normal Form, which is a way of grouping logical statements; namely, but grouping or statements together separated by and statements:

(a or b or ...) and (x or y or...) and ...

For simplicity, let us refer to each statement as a "filter", as most likely one will be applying CNF to some data to find what passes the statements.

Currently, we implement a filter in python3 via the dict type:

{
  'logic':    a string which is either 'and' or 'or'
  'lambda':   a lambda function to be applied to something
  'name':     a name which can help with keeping things clear
}

Thus given a list of such filters, one can call:

cnf.apply(cnf.group(filters), *lambda_args)

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

cnf-0.0.4.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

cnf-0.0.4-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file cnf-0.0.4.tar.gz.

File metadata

  • Download URL: cnf-0.0.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for cnf-0.0.4.tar.gz
Algorithm Hash digest
SHA256 9b49da82e3d3e343066e67177b8a5c4203ab11c112ee9d337b41b11ba25cd799
MD5 5843fa91b54314e3efd4d89b9fc79188
BLAKE2b-256 9a10a5aa25804c99a351851e5e28fbbe13c15c546b10122bb1e63d22d3d58800

See more details on using hashes here.

File details

Details for the file cnf-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: cnf-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for cnf-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bb0a909ae23f31d69677a7aac58326261b3f4568eb866a24bf0f6bb9cd91a57b
MD5 feeb67d89aa3fa86b8e0133673706731
BLAKE2b-256 3ed6e458806335f96688e2302cbd737e97c065271ea9f4cb330fb7e68c011022

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