diff options
author | Julian Berman <Julian@GrayVines.com> | 2019-09-03 10:12:34 +0200 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2019-09-03 10:12:34 +0200 |
commit | b958b383d45ca6d8c1ba783c0f10b80e08be5ece (patch) | |
tree | 93c9684867889b64d091b50f3aaf59b06a440f6d | |
parent | f082f83c395a657b58c542c60cadc9ba394e2b8a (diff) | |
download | jsonschema-b958b383d45ca6d8c1ba783c0f10b80e08be5ece.tar.gz |
Combine the README with the doc landing page.
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | docs/index.rst | 40 |
2 files changed, 4 insertions, 40 deletions
@@ -103,9 +103,7 @@ Online demo Notebook will look similar to this: .. image:: https://user-images.githubusercontent.com/1155573/56820861-5c1c1880-6823-11e9-802a-ce01c5ec574f.gif :alt: Open Live Demo - :width: 50 px - :scale: 10 % - + :width: 480 px Release Notes diff --git a/docs/index.rst b/docs/index.rst index 1fd4ba6..e4d7252 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,43 +1,9 @@ -========== -jsonschema -========== - - .. module:: jsonschema +.. include:: ../README.rst -``jsonschema`` is an implementation of `JSON Schema <https://json-schema.org>`_ -for Python (supporting 2.7+ including Python 3). - -.. code-block:: python - - >>> from jsonschema import validate - - >>> # A sample schema, like what we'd get from json.load() - >>> schema = { - ... "type" : "object", - ... "properties" : { - ... "price" : {"type" : "number"}, - ... "name" : {"type" : "string"}, - ... }, - ... } - - >>> # If no exception is raised by validate(), the instance is valid. - >>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema) - - >>> validate( - ... instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema, - ... ) # doctest: +IGNORE_EXCEPTION_DETAIL - Traceback (most recent call last): - ... - ValidationError: 'Invalid' is not of type 'number' - - -You can find further information (installation instructions, mailing list) -as well as the source code and issue tracker on our -`GitHub page <https://github.com/Julian/jsonschema/>`__. - -Contents: +Contents +-------- .. toctree:: :maxdepth: 2 |