An open API service indexing awesome lists of open source software.

https://github.com/carlbordum/datatyping

Pythonic type checking
https://github.com/carlbordum/datatyping

check pythonic type typing use-protection

Last synced: 4 months ago
JSON representation

Pythonic type checking

Awesome Lists containing this project

README

        

datatyping
==========

.. image:: https://travis-ci.org/carlbordum/datatyping.svg?branch=master
:target: https://travis-ci.org/carlbordum/datatyping

.. image:: https://readthedocs.org/projects/datatyping/badge/?version=latest
:target: http://datatyping.readthedocs.io

`datatyping` is a pure Python library with no dependencies that you can use to
verify whether elements in a data structure have the expected types. Great for
incoming JSON.

.. code-block:: python

import datatyping
datatyping.validate([int], [1, 2, 3])

Check out the `documentation `_ for more usage examples.

Installation
------------

.. code-block:: bash

$ pip install datatyping

Develop with me :)
------------------

Fork the repository first. Then use the following lines to setup:

.. code-block:: bash

$ git clone https://github.com/YOUR_USERNAME/datatyping
$ cd datatyping
$ virtualenv venv
$ . venv/bin/activate
$ python setup.py develop

Run tests:

.. code-block:: bash

$ pip install pytest hypothesis
$ python -m pytest

Build documentation:

.. code-block:: bash

$ make -C docs/ html

Notes
-----
* Inspired by `"How Python Makes Working With Data More Difficult in the Long Run" `_.
* Any and all contributions are welcome.
* Please open an issue if you think we can help.
* Suggest anything you want to see support for!