All Projects → green-coder → minimallist

green-coder / minimallist

Licence: EPL-2.0 license
A minimalist data driven data model library, inspired by Clojure Spec and Malli.

Programming Languages

clojure
4091 projects
shell
77523 projects

Projects that are alternatives of or similar to minimallist

changeset
(unreleased) Data validation with first-class and first-order labels in OCaml
Stars: ✭ 28 (-55.56%)
Mutual labels:  data-validation
Pandera
A light-weight, flexible, and expressive pandas data validation library
Stars: ✭ 506 (+703.17%)
Mutual labels:  data-validation
Typical
Typical: Fast, simple, & correct data-validation using Python 3 typing.
Stars: ✭ 111 (+76.19%)
Mutual labels:  data-validation
validada
Another library for defensive data analysis.
Stars: ✭ 29 (-53.97%)
Mutual labels:  data-validation
Xtypejs
Elegant, highly efficient data validation for JavaScript.
Stars: ✭ 357 (+466.67%)
Mutual labels:  data-validation
Dry Validation
Validation library with type-safe schemas and rules
Stars: ✭ 1,087 (+1625.4%)
Mutual labels:  data-validation
form-binder-java
Java port of form-binder, a micro data binding and validating framework
Stars: ✭ 29 (-53.97%)
Mutual labels:  data-validation
Data Cleaning 101
Data Cleaning Libraries with Python
Stars: ✭ 243 (+285.71%)
Mutual labels:  data-validation
Pointblank
Data validation and organization of metadata for data frames and database tables
Stars: ✭ 480 (+661.9%)
Mutual labels:  data-validation
React Jsonschema Form
A React component for building Web forms from JSON Schema.
Stars: ✭ 10,870 (+17153.97%)
Mutual labels:  data-validation
Validus
A dead simple Python string validation library.
Stars: ✭ 257 (+307.94%)
Mutual labels:  data-validation
Openapi Cop
A proxy that validates responses and requests against an OpenAPI document.
Stars: ✭ 338 (+436.51%)
Mutual labels:  data-validation
Saul
Data validation and conformation library for Elixir.
Stars: ✭ 62 (-1.59%)
Mutual labels:  data-validation
data-validator
A tool to validate data built around Apache Spark.
Stars: ✭ 66 (+4.76%)
Mutual labels:  data-validation
Rdfunit
An RDF Unit Testing Suite
Stars: ✭ 117 (+85.71%)
Mutual labels:  data-validation
validation-components
A collection of common validation predicates for ValidationToolkit framework
Stars: ✭ 26 (-58.73%)
Mutual labels:  data-validation
Pywhip
💂‍♂️ Python package to validate data against whip specifications
Stars: ✭ 5 (-92.06%)
Mutual labels:  data-validation
Dry Schema
Coercion and validation for data structures
Stars: ✭ 249 (+295.24%)
Mutual labels:  data-validation
Cerberus
Lightweight, extensible data validation library for Python
Stars: ✭ 2,640 (+4090.48%)
Mutual labels:  data-validation
Passable
Declarative data validations.
Stars: ✭ 93 (+47.62%)
Mutual labels:  data-validation

Minimallist CircleCI

A minimalist data driven data model library, inspired by Clojure Spec and Malli.

Clojars Project cljdoc badge project chat cljdoc badge

Usage

(ns your-namespace
  (:require [minimallist.core :refer [valid? describe]]
            [minimallist.helper :as h]))

(def hiccup-model
  (h/let ['hiccup (h/alt [:node (h/in-vector (h/cat [:name (h/fn keyword?)]
                                                    [:props (h/? (h/map-of (h/vector (h/fn keyword?) (h/fn any?))))]
                                                    [:children (h/* (h/not-inlined (h/ref 'hiccup)))]))]
                         [:primitive (h/alt [:nil (h/fn nil?)]
                                            [:boolean (h/fn boolean?)]
                                            [:number (h/fn number?)]
                                            [:text (h/fn string?)])])]
    (h/ref 'hiccup)))

(valid? hiccup-model [:div {:class [:foo :bar]}
                      [:p "Hello, world of data"]])
;=> true

(describe hiccup-model [:div {:class [:foo :bar]}
                        [:p "Hello, world of data"]])
;=> [:node {:name :div
;           :props [[[:class [:foo :bar]]]]
;           :children [[:node {:name :p
;                              :props []
;                              :children [[:primitive [:text "Hello, world of data"]]]}]]}]

Features

  • validates, parses and generates data,
  • fully data driven, models are hash-map based created via helpers,
  • support recursive definitions and sequence regex,
  • no macro, no static registry, pure functions,
  • relatively simple implementation, easy to read and modify,
  • cross platform (.cljc),
  • valid? and describe run in Babashka

Non-goals (for now)

  • does not integrate with anything else,
  • does not try hard to be performant

Documentation

See the latest documentation on cljdoc for:

  • A general description of the Minimallist project.
  • How to use the helpers to build your models.
  • How to validate, parse and generate your data.

Status

This is a work in progress, the API may change in the future.

More functionalities will be added later, once the API design is more stable.

If you find any bug or have comments, please create an issue in GitHub.

License

The Minimallist library is developed by Vincent Cantin. It is distributed under the terms of the Eclipse Public License version 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].