Adding a basic readme, some classifiers, and bumped the version.

This commit is contained in:
Julian Berman
2012-01-16 15:10:50 -05:00
parent a1db2118b2
commit 54e5ae2af7
4 changed files with 52 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
include *.rst
include COPYING
include tests.py

27
README.rst Normal file
View File

@@ -0,0 +1,27 @@
==========
jsonschema
==========
``jsonschema`` is an implementation of JSON Schema (currently in `Draft 3
<http://tools.ietf.org/html/draft-zyp-json-schema-03>`_) for Python.
.. code:: 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({"name" : "Eggs", "price" : 34.99}, schema)
>>> validate({"name" : "Eggs", "price" : "Invalid"}, schema)
Traceback (most recent call last):
...
ValidationError: 'Invalid' is not of type 'number'

View File

@@ -26,7 +26,7 @@ import types
import warnings
__version__ = "0.1a"
__version__ = "0.2"
try: # pragma: no cover, 2.5 support
next

View File

@@ -1,15 +1,38 @@
from __future__ import with_statement
from distutils.core import setup
from jsonschema import __version__
with open("README.rst") as readme:
long_description = readme.read()
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2 :: Only",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
setup(
name="jsonschema",
version=__version__,
py_modules=["jsonschema"],
author="Julian Berman",
author_email="Julian@GrayVines.com",
classifiers=classifiers,
description="An implementation of JSON-Schema validation for Python",
license="MIT/X",
long_description=long_description,
url="http://github.com/Julian/jsonschema",
)