validator.py

Schemas for data structures.

https://github.com/mansam/validator.py

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 11 committers (18.2%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Schemas for data structures.

Basic Info
  • Host: GitHub
  • Owner: mansam
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 735 KB
Statistics
  • Stars: 154
  • Watchers: 6
  • Forks: 22
  • Open Issues: 6
  • Releases: 0
Created over 12 years ago · Last pushed over 5 years ago
Metadata Files
Readme Changelog License

README.rst

validator.py |Build Status| |PyPI version|
==========================================================

Schemas for data structures.

`Documentation `__
---------------------------------------------------------------------------

This README has some basic usage information, but more detailed
documentation may be found at
`ReadTheDocs `__.

Usage Example
-------------

First, install it from PyPI.

::

    pip install validator.py

.. code:: python


    from validator import Required, Not, Truthy, Blank, Range, Equals, In, validate

    # let's say that my dictionary needs to meet the following rules...
    rules = {
        "foo": [Required, Equals(123)],
        "bar": [Required, Truthy()],
        "baz": [In(["spam", "eggs", "bacon"])],
        "qux": [Not(Range(1, 100))] # by default, Range is inclusive
    }

    # then this following dict would pass:
    passes = {
        "foo": 123,
        "bar": True, # or a non-empty string, or a non-zero int, etc...
        "baz": "spam",
        "qux": 101
    }
    print validate(rules, passes)
    # (True, {})

    # but this one would fail
    fails = {
        "foo": 321,
        "bar": False, # or 0, or [], or an empty string, etc...
        "baz": "barf",
        "qux": 99
    }
    print validate(rules, fails)
    # (False,
    #  {
    #  'foo': ["must be equal to '123'"],
    #  'bar': ['must be True-equivalent value'],
    #  'baz': ["must be one of ['spam', 'eggs', 'bacon']"],
    #  'qux': ['must not fall between 1 and 100']
    #  })

.. |Build Status| image:: https://travis-ci.org/mansam/validator.py.png?branch=master
   :target: https://travis-ci.org/mansam/validator.py
.. |PyPI version| image:: https://badge.fury.io/py/validator.py.png
   :target: http://badge.fury.io/py/validator.py
.. |Bitdeli Badge| image:: https://d2weczhvl823v0.cloudfront.net/mansam/validator.py/trend.png
   :target: https://bitdeli.com/free

Owner

  • Name: Samuel Lucidi
  • Login: mansam
  • Kind: user

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 71
  • Total Committers: 11
  • Avg Commits per committer: 6.455
  • Development Distribution Score (DDS): 0.479
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Sam Lucidi m****m@c****u 37
= = 15
Samuel Lucidi s****i@l****m 9
Vaibhav Mule v****5@g****m 2
Joseph Mancuso i****9@g****m 2
Valentin Matter v****r@g****m 1
Seasonley s****y@q****m 1
Ross r****n@c****u 1
Junior Gantin n****6@g****m 1
Snile 8****2@q****m 1
Sam Lucidi s****m@v****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 17
  • Total pull requests: 14
  • Average time to close issues: 14 days
  • Average time to close pull requests: 30 days
  • Total issue authors: 10
  • Total pull request authors: 12
  • Average comments per issue: 1.35
  • Average comments per pull request: 2.43
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • josephmancuso (4)
  • eli-b (3)
  • mansam (3)
  • zxf20180725 (1)
  • vaibhavmule (1)
  • souloss (1)
  • DineshGuptaa (1)
  • rvettori (1)
  • qf0129 (1)
  • ramon-oliveira (1)
Pull Request Authors
  • josephmancuso (3)
  • augustoerico (1)
  • Seasonley (1)
  • mansam (1)
  • devinmcginty (1)
  • valentinmatter (1)
  • souloss (1)
  • rossdylan (1)
  • ryansb (1)
  • vaibhavmule (1)
  • nioperas06 (1)
  • warmspringwinds (1)
Top Labels
Issue Labels
enhancement (3) docs (2) question (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,274 last-month
  • Total docker downloads: 18,150
  • Total dependent packages: 2
  • Total dependent repositories: 29
  • Total versions: 20
  • Total maintainers: 1
pypi.org: validator.py

A library for appling schemas to data structures.

  • Versions: 20
  • Dependent Packages: 2
  • Dependent Repositories: 29
  • Downloads: 1,274 Last month
  • Docker Downloads: 18,150
Rankings
Docker downloads count: 2.0%
Dependent repos count: 2.7%
Dependent packages count: 3.1%
Average: 4.8%
Stargazers count: 5.8%
Downloads: 7.6%
Forks count: 7.8%
Maintainers (1)
Last synced: 11 months ago