Skip to content

Commit 23a3ecf

Browse files
committed
Merge branch 'develop': v1.0.0
2 parents 725cf11 + ed99ea4 commit 23a3ecf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1225
-1291
lines changed

.travis.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
dist: trusty
21
language: python
32
python:
4-
- '2.7'
5-
- '3.4'
6-
- '3.5'
7-
- 'pypy'
3+
- "3.6"
4+
- "3.7"
5+
- "3.8"
86
install:
97
- pip install -r requirements.txt
108
- pip install coveralls coverage
119
- pip install -U setuptools
1210
- pip install pytest --upgrade
1311
script:
1412
- python setup.py install
15-
- coverage run --source flask_rest_jsonapi -m pytest -v
13+
- coverage run --source flask_combo_jsonapi -m pytest -v
1614
after_success:
1715
- coveralls
16+
17+
# TODO: create separate jobs for tests and deploy

README.rst

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
.. image:: https://badge.fury.io/py/Flask-REST-JSONAPI.svg
2-
:target: https://badge.fury.io/py/Flask-REST-JSONAPI
3-
.. image:: https://travis-ci.org/miLibris/flask-rest-jsonapi.svg
4-
:target: https://travis-ci.org/miLibris/flask-rest-jsonapi
5-
.. image:: https://coveralls.io/repos/github/miLibris/flask-rest-jsonapi/badge.svg
6-
:target: https://coveralls.io/github/miLibris/flask-rest-jsonapi
7-
.. image:: https://readthedocs.org/projects/flask-rest-jsonapi/badge/?version=latest
8-
:target: http://flask-rest-jsonapi.readthedocs.io/en/latest/?badge=latest
9-
:alt: Documentation Status
1+
.. image:: https://travis-ci.org/AdCombo/flask-combo-jsonapi.svg
2+
:target: https://travis-ci.org/AdCombo/flask-combo-jsonapi
3+
.. image:: https://coveralls.io/repos/github/AdCombo/flask-combo-jsonapi/badge.svg
4+
:target: https://coveralls.io/github/AdCombo/flask-combo-jsonapi
105

11-
Flask-REST-JSONAPI
12-
##################
136

14-
Flask-REST-JSONAPI is a flask extension for building REST APIs. It combines the power of `Flask-Restless <https://flask-restless.readthedocs.io/>`_ and the flexibility of `Flask-RESTful <https://flask-restful.readthedocs.io/>`_ around a strong specification `JSONAPI 1.0 <http://jsonapi.org/>`_. This framework is designed to quickly build REST APIs and fit the complexity of real life projects with legacy data and multiple data storages.
7+
Flask-COMBO-JSONAPI
8+
###################
9+
10+
Flask-COMBO-JSONAPI is a flask extension for building REST APIs. It combines the power of `Flask-Restless <https://flask-restless.readthedocs.io/>`_ and the flexibility of `Flask-RESTful <https://flask-restful.readthedocs.io/>`_ around a strong specification `JSONAPI 1.0 <http://jsonapi.org/>`_. This framework is designed to quickly build REST APIs and fit the complexity of real life projects with legacy data and multiple data storages.
11+
12+
The main goal is to make it flexible using `plugin system <https://github.com/AdCombo/combojsonapi/blob/develop/docs/en/create_plugins.rst>`_
13+
1514

1615
Install
1716
=======
1817

19-
pip install Flask-REST-JSONAPI
18+
pip install Flask-COMBO-JSONAPI
19+
20+
Installation from pypi is not ready yet. Refer to the `installation manual <https://github.com/AdCombo/flask-combo-jsonapi/blob/develop/docs/installation.rst/>`_
21+
2022

2123
A minimal API
2224
=============
2325

2426
.. code-block:: python
2527
26-
# -*- coding: utf-8 -*-
27-
2828
from flask import Flask
29-
from flask_rest_jsonapi import Api, ResourceDetail, ResourceList
29+
from flask_combo_jsonapi import Api, ResourceDetail, ResourceList
3030
from flask_sqlalchemy import SQLAlchemy
3131
from marshmallow_jsonapi.flask import Schema
3232
from marshmallow_jsonapi import fields
@@ -88,28 +88,28 @@ URL method endpoint Usage
8888
/persons/<int:person_id> DELETE person_detail Delete a person
8989
======================== ====== ============= ===========================
9090

91-
Flask-REST-JSONAPI vs `Flask-RESTful <http://flask-restful-cn.readthedocs.io/en/0.3.5/a>`_
91+
Flask-COMBO-JSONAPI vs `Flask-RESTful <http://flask-restful-cn.readthedocs.io/en/0.3.5/a>`_
9292
==========================================================================================
9393

94-
* In contrast to Flask-RESTful, Flask-REST-JSONAPI provides a default implementation of get, post, patch and delete methods around a strong specification JSONAPI 1.0. Thanks to this you can build REST API very quickly.
95-
* Flask-REST-JSONAPI is as flexible as Flask-RESTful. You can rewrite every default method implementation to make custom work like distributing object creation.
94+
* In contrast to Flask-RESTful, Flask-COMBO-JSONAPI provides a default implementation of get, post, patch and delete methods around a strong specification JSONAPI 1.0. Thanks to this you can build REST API very quickly.
95+
* Flask-COMBO-JSONAPI is as flexible as Flask-RESTful. You can rewrite every default method implementation to make custom work like distributing object creation.
9696

97-
Flask-REST-JSONAPI vs `Flask-Restless <https://flask-restless.readthedocs.io/en/stable/>`_
97+
Flask-COMBO-JSONAPI vs `Flask-Restless <https://flask-restless.readthedocs.io/en/stable/>`_
9898
==========================================================================================
9999

100-
* Flask-REST-JSONAPI is a real implementation of JSONAPI 1.0 specification. So in contrast to Flask-Restless, Flask-REST-JSONAPI forces you to create a real logical abstration over your data models with `Marshmallow <https://marshmallow.readthedocs.io/en/latest/>`_. So you can create complex resource over your data.
101-
* In contrast to Flask-Restless, Flask-REST-JSONAPI can use any ORM or data storage through the data layer concept, not only `SQLAlchemy <http://www.sqlalchemy.org/>`_. A data layer is a CRUD interface between your resource and one or more data storage so you can fetch data from any data storage of your choice or create resource that use multiple data storages.
102-
* Like I said previously, Flask-REST-JSONAPI is a real implementation of JSONAPI 1.0 specification. So in contrast to Flask-Restless you can manage relationships via REST. You can create dedicated URL to create a CRUD API to manage relationships.
103-
* Plus Flask-REST-JSONAPI helps you to design your application with strong separation between resource definition (schemas), resource management (resource class) and route definition to get a great organization of your source code.
104-
* In contrast to Flask-Restless, Flask-REST-JSONAPI is highly customizable. For example you can entirely customize your URLs, define multiple URLs for the same resource manager, control serialization parameters of each method and lots of very useful parameters.
105-
* Finally in contrast to Flask-Restless, Flask-REST-JSONAPI provides a great error handling system according to JSONAPI 1.0. Plus the exception handling system really helps the API developer to quickly find missing resources requirements.
100+
* Flask-COMBO-JSONAPI is a real implementation of JSONAPI 1.0 specification. So in contrast to Flask-Restless, Flask-COMBO-JSONAPI forces you to create a real logical abstration over your data models with `Marshmallow <https://marshmallow.readthedocs.io/en/latest/>`_. So you can create complex resource over your data.
101+
* In contrast to Flask-Restless, Flask-COMBO-JSONAPI can use any ORM or data storage through the data layer concept, not only `SQLAlchemy <http://www.sqlalchemy.org/>`_. A data layer is a CRUD interface between your resource and one or more data storage so you can fetch data from any data storage of your choice or create resource that use multiple data storages.
102+
* Like I said previously, Flask-COMBO-JSONAPI is a real implementation of JSONAPI 1.0 specification. So in contrast to Flask-Restless you can manage relationships via REST. You can create dedicated URL to create a CRUD API to manage relationships.
103+
* Plus Flask-COMBO-JSONAPI helps you to design your application with strong separation between resource definition (schemas), resource management (resource class) and route definition to get a great organization of your source code.
104+
* In contrast to Flask-Restless, Flask-COMBO-JSONAPI is highly customizable. For example you can entirely customize your URLs, define multiple URLs for the same resource manager, control serialization parameters of each method and lots of very useful parameters.
105+
* Finally in contrast to Flask-Restless, Flask-COMBO-JSONAPI provides a great error handling system according to JSONAPI 1.0. Plus the exception handling system really helps the API developer to quickly find missing resources requirements.
106106

107107
Documentation
108108
=============
109109

110-
Documentation available here: http://flask-rest-jsonapi.readthedocs.io/en/latest/
110+
Documentation available here: http://Flask-COMBO-JSONAPI.readthedocs.io/en/latest/
111111

112112
Thanks
113113
======
114114

115-
Flask, marshmallow, marshmallow_jsonapi, sqlalchemy, Flask-RESTful and Flask-Restless are awesome projects. These libraries gave me inspiration to create Flask-REST-JSONAPI, so huge thanks to authors and contributors.
115+
Flask, marshmallow, marshmallow_jsonapi, sqlalchemy, Flask-RESTful and Flask-Restless are awesome projects. These libraries gave me inspiration to create Flask-COMBO-JSONAPI, so huge thanks to authors and contributors.

docs/api.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
Api
44
===
55

6-
.. currentmodule:: flask_rest_jsonapi
6+
.. currentmodule:: flask_combo_jsonapi
77

88
You can provide global decorators as tuple to the Api.
99

1010
Example:
1111

1212
.. code-block:: python
1313
14-
from flask_rest_jsonapi import Api
14+
from flask_combo_jsonapi import Api
1515
from your_project.security import login_required
1616
1717
api = Api(decorators=(login_required,))

docs/conf.py

+49-48
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
#
3-
# flask-rest-jsonapi documentation build configuration file, created by
3+
# flask-combo-jsonapi documentation build configuration file, created by
44
# sphinx-quickstart on Fri Oct 21 14:33:15 2016.
55
#
66
# This file is execfile()d with the current directory set to its
@@ -18,7 +18,8 @@
1818
#
1919
import os
2020
import sys
21-
sys.path.insert(0, os.path.abspath('..'))
21+
22+
sys.path.insert(0, os.path.abspath(".."))
2223

2324
# -- General configuration ------------------------------------------------
2425

@@ -30,38 +31,39 @@
3031
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3132
# ones.
3233
extensions = [
33-
'sphinx.ext.autodoc',
34+
"sphinx.ext.autodoc",
35+
"sphinx.ext.autosummary",
3436
]
3537

3638
# Add any paths that contain templates here, relative to this directory.
37-
templates_path = ['_templates']
39+
templates_path = ["_templates"]
3840

3941
# The suffix(es) of source filenames.
4042
# You can specify multiple suffix as a list of string:
4143
#
4244
# source_suffix = ['.rst', '.md']
43-
source_suffix = '.rst'
45+
source_suffix = ".rst"
4446

4547
# The encoding of source files.
4648
#
4749
# source_encoding = 'utf-8-sig'
4850

4951
# The master toctree document.
50-
master_doc = 'index'
52+
master_doc = "index"
5153

5254
# General information about the project.
53-
project = 'flask-rest-jsonapi'
54-
copyright = '2016, miLibris'
55-
author = 'miLibris'
55+
project = "flask-combo-jsonapi"
56+
copyright = "2020, AdCombo"
57+
author = "AdCombo"
5658

5759
# The version info for the project you're documenting, acts as replacement for
5860
# |version| and |release|, also used in various other places throughout the
5961
# built documents.
6062
#
6163
# The short X.Y version.
62-
version = '0.1'
64+
version = "0.1"
6365
# The full version, including alpha/beta/rc tags.
64-
release = '0.1'
66+
release = "0.1"
6567

6668
# The language for content autogenerated by Sphinx. Refer to documentation
6769
# for a list of supported languages.
@@ -82,7 +84,7 @@
8284
# List of patterns, relative to source directory, that match files and
8385
# directories to ignore when looking for source files.
8486
# This patterns also effect to html_static_path and html_extra_path
85-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
87+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
8688

8789
# The reST default role (used for this markup: `text`) to use for all
8890
# documents.
@@ -104,7 +106,7 @@
104106
# show_authors = False
105107

106108
# The name of the Pygments (syntax highlighting) style to use.
107-
pygments_style = 'sphinx'
109+
pygments_style = "sphinx"
108110

109111
# A list of ignored prefixes for module index sorting.
110112
# modindex_common_prefix = []
@@ -121,21 +123,21 @@
121123
# The theme to use for HTML and HTML Help pages. See the documentation for
122124
# a list of builtin themes.
123125
#
124-
html_theme = 'alabaster'
126+
html_theme = "alabaster"
125127

126128
# Theme options are theme-specific and customize the look and feel of a theme
127129
# further. For a list of options available for each theme, see the
128130
# documentation.
129131
#
130132
html_theme_options = {
131-
'github_user': 'miLibris',
132-
'github_repo': 'flask-rest-jsonapi',
133-
'github_banner': True,
134-
'travis_button': True,
135-
'show_related': True,
136-
'page_width': '1080px',
137-
'fixed_sidebar': True,
138-
'code_font_size': '0.8em'
133+
"github_user": "AdCombo",
134+
"github_repo": "flask-combo-jsonapi",
135+
"github_banner": True,
136+
"travis_button": True,
137+
"show_related": True,
138+
"page_width": "1080px",
139+
"fixed_sidebar": True,
140+
"code_font_size": "0.8em",
139141
}
140142

141143
# Add any paths that contain custom themes here, relative to this directory.
@@ -164,7 +166,7 @@
164166
# Add any paths that contain custom static files (such as style sheets) here,
165167
# relative to this directory. They are copied after the builtin static files,
166168
# so a file named "default.css" will overwrite the builtin "default.css".
167-
html_static_path = ['_static']
169+
html_static_path = ["_static"]
168170

169171
# Add any extra paths that contain custom files (such as robots.txt or
170172
# .htaccess) here, relative to this directory. These files are copied
@@ -244,34 +246,30 @@
244246
# html_search_scorer = 'scorer.js'
245247

246248
# Output file base name for HTML help builder.
247-
htmlhelp_basename = 'flask-rest-jsonapidoc'
249+
htmlhelp_basename = "flask-combo-jsonapidoc"
248250

249251
# -- Options for LaTeX output ---------------------------------------------
250252

251253
latex_elements = {
252-
# The paper size ('letterpaper' or 'a4paper').
253-
#
254-
# 'papersize': 'letterpaper',
255-
256-
# The font size ('10pt', '11pt' or '12pt').
257-
#
258-
# 'pointsize': '10pt',
259-
260-
# Additional stuff for the LaTeX preamble.
261-
#
262-
# 'preamble': '',
263-
264-
# Latex figure (float) alignment
265-
#
266-
# 'figure_align': 'htbp',
254+
# The paper size ('letterpaper' or 'a4paper').
255+
#
256+
# 'papersize': 'letterpaper',
257+
# The font size ('10pt', '11pt' or '12pt').
258+
#
259+
# 'pointsize': '10pt',
260+
# Additional stuff for the LaTeX preamble.
261+
#
262+
# 'preamble': '',
263+
# Latex figure (float) alignment
264+
#
265+
# 'figure_align': 'htbp',
267266
}
268267

269268
# Grouping the document tree into LaTeX files. List of tuples
270269
# (source start file, target name, title,
271270
# author, documentclass [howto, manual, or own class]).
272271
latex_documents = [
273-
(master_doc, 'flask-rest-jsonapi.tex', 'flask-rest-jsonapi Documentation',
274-
'miLibris', 'manual'),
272+
(master_doc, "flask-combo-jsonapi.tex", "flask-combo-jsonapi Documentation", "AdCombo", "manual"),
275273
]
276274

277275
# The name of an image file (relative to this directory) to place at the top of
@@ -311,10 +309,7 @@
311309

312310
# One entry per manual page. List of tuples
313311
# (source start file, name, description, authors, manual section).
314-
man_pages = [
315-
(master_doc, 'flask-rest-jsonapi', 'flask-rest-jsonapi Documentation',
316-
[author], 1)
317-
]
312+
man_pages = [(master_doc, "flask-combo-jsonapi", "flask-combo-jsonapi Documentation", [author], 1)]
318313

319314
# If true, show URL addresses after external links.
320315
#
@@ -327,9 +322,15 @@
327322
# (source start file, target name, title, author,
328323
# dir menu entry, description, category)
329324
texinfo_documents = [
330-
(master_doc, 'flask-rest-jsonapi', 'flask-rest-jsonapi Documentation',
331-
author, 'flask-rest-jsonapi', 'One line description of project.',
332-
'Miscellaneous'),
325+
(
326+
master_doc,
327+
"flask-combo-jsonapi",
328+
"flask-combo-jsonapi Documentation",
329+
author,
330+
"flask-combo-jsonapi",
331+
"One line description of project.",
332+
"Miscellaneous",
333+
),
333334
]
334335

335336
# Documents to append as an appendix to all manuals.

docs/configuration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ You have access to 5 configration keys:
99
* MAX_PAGE_SIZE: the maximum page size. If you specify a page size greater than this value you will receive 400 Bad Request response.
1010
* MAX_INCLUDE_DEPTH: the maximum length of an include through schema relationships
1111
* ALLOW_DISABLE_PAGINATION: if you want to disallow to disable pagination you can set this configuration key to False
12-
* CATCH_EXCEPTIONS: if you want flask_rest_jsonapi to catch all exceptions and return as JsonApiException (default is True)
12+
* CATCH_EXCEPTIONS: if you want flask_combo_jsonapi to catch all exceptions and return as JsonApiException (default is True)

0 commit comments

Comments
 (0)