Skip to content

Commit a2a80db

Browse files
author
Michal Horejsek
committed
First version of fast JSON schema
0 parents  commit a2a80db

25 files changed

+2211
-0
lines changed

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
*.pyc
3+
.cache
4+
5+
.testmondata
6+
7+
build/
8+
_build/
9+
deb_dist/
10+
dist/
11+
*.tar.gz
12+
*egg-info
13+
MANIFEST

Makefile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
all:
3+
@echo "make install - Install on local system"
4+
@echo "make test - Run tests during development"
5+
@echo "make performance - Run performance test of this and other implementation"
6+
@echo "make doc - Make documentation"
7+
@echo "make clean - Get rid of scratch and byte files"
8+
9+
10+
deb:
11+
python3 setup.py --command-packages=stdeb.command bdist_deb
12+
13+
upload:
14+
python3 setup.py register sdist upload
15+
16+
install:
17+
python3 setup.py install
18+
19+
test:
20+
python3 -m pytest tests
21+
22+
performance:
23+
python3 performance.py
24+
25+
doc:
26+
cd docs; make
27+
28+
clean:
29+
python3 setup.py clean
30+
find . -name '*.pyc' -delete

README.markdown

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Fast JSON schema for Python
2+
3+
## Install
4+
5+
`pip install fastjsonschema`
6+
7+
Support for Python 3.3 and higher.
8+
9+
## Documentation
10+
11+
Documentation: http://opensource.seznam.cz/python-fastjsonschema/

docs/Makefile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.PHONY: all
2+
all: sphinx
3+
4+
BUILDDIR=../../python-fastjsonschema-doc
5+
SPHINXOPTS=-n -W -d $(BUILDDIR)/doctrees .
6+
7+
.PHONY: sphinx
8+
sphinx:
9+
sphinx-build -b html $(SPHINXOPTS) $(BUILDDIR)/html
10+
11+
clean:
12+
rm -rf build

docs/conf.py

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import time
4+
import sys
5+
6+
sys.path.insert(0, '.')
7+
sys.path.insert(0, '..')
8+
9+
# Add any Sphinx extension module names here, as strings. They can be extensions
10+
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
11+
extensions = [
12+
'sphinx.ext.autodoc',
13+
'sphinx.ext.viewcode',
14+
'sphinx.ext.intersphinx',
15+
'sphinxtogithub',
16+
]
17+
18+
# The suffix of source filenames.
19+
source_suffix = '.rst'
20+
21+
# The master toctree document.
22+
master_doc = 'index'
23+
24+
# General information about the project.
25+
project = u'fastjsonschema'
26+
copyright = u'2016-{}, Seznam.cz'.format(time.strftime("%Y"))
27+
28+
# The version info for the project you're documenting, acts as replacement for
29+
# |version| and |release|, also used in various other places throughout the
30+
# built documents.
31+
#
32+
# The short X.Y version.
33+
version = ''
34+
# The full version, including alpha/beta/rc tags.
35+
release = version
36+
37+
# The name of the Pygments (syntax highlighting) style to use.
38+
pygments_style = 'pastie'
39+
40+
# Add any paths that contain templates here, relative to this directory.
41+
templates_path = ['_templates']
42+
43+
# Add any paths that contain custom static files (such as style sheets) here,
44+
# relative to this directory. They are copied after the builtin static files,
45+
# so a file named "default.css" will overwrite the builtin "default.css".
46+
#html_static_path = ['_static']
47+
48+
# Custom sidebar templates, maps document names to template names.
49+
html_sidebars = {
50+
'**': [
51+
'localtoc.html',
52+
'relations.html',
53+
'searchbox.html',
54+
]
55+
}
56+
57+
# The theme to use for HTML and HTML Help pages. See the documentation for
58+
# a list of builtin themes.
59+
html_theme = 'alabaster'
60+
61+
# Theme options are theme-specific and customize the look and feel of a theme
62+
# further. For a list of options available for each theme, see the
63+
# documentation.
64+
# http://alabaster.readthedocs.io/en/latest/customization.html
65+
html_theme_options = {
66+
'font_family': 'Arial, sans-serif',
67+
'head_font_family': 'Arial, sans-serif',
68+
'page_width': '1000px',
69+
'show_related': True,
70+
}
71+
72+
# This config value contains the locations and names of other projects that should be linked to in this documentation.
73+
intersphinx_mapping = {
74+
}

docs/index.rst

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
fastjsonschema documentation
2+
############################
3+
4+
Installation
5+
************
6+
7+
.. code-block:: bash
8+
9+
pip install python-fastjsonschema
10+
11+
Documentation
12+
*************
13+
14+
.. automodule:: fastjsonschema
15+
:members:

0 commit comments

Comments
 (0)