Metadata-Version: 2.1
Name: jsonschema-extractor
Version: 1.0
Summary: "a framework to extract jsonschemas from a variety of models."
Home-page: https://github.com/toumorokoshi/jsonschema-extractor
Author: "Yusuke Tsutsumi",
Author-email: "yusuke@tsutsumi.io",
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
License-File: LICENSE

====================
jsonschema-extractor
====================

jsonschema-extractor is a library and extensible framework for
extracting `json schema <http://json-schema.org/>`_ from various object and
primitives.

.. image:: https://github.com/toumorokoshi/jsonschema-extractor/actions/workflows/python-package.yaml/badge.svg
    :target: https://github.com/toumorokoshi/jsonschema-extractor/actions/workflows/python-package.yaml

Out of the box support exists for:

- `attrs <https://attrs.readthedocs.io/>`_
- `typing <https://docs.python.org/3/library/typing.html>`_

-----
Usage
-----

.. code-block:: python


    from typing import List
    import jsonschema_extractor
    assert jsonschema_extractor.extract(List[int]) == {
        "type": "array",
        "items": {"type": "integer"}
    }


