-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from Pegase745/v2
Revamp a bit
- Loading branch information
Showing
48 changed files
with
1,659 additions
and
1,550 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,106 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
lib | ||
lib64 | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
# mypy | ||
.mypy_cache/ | ||
|
||
# Virtualenv folders | ||
local | ||
include | ||
*.sqlite | ||
*.sqlite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
include *.in | ||
include .bumpversion.cfg | ||
include LICENSE | ||
recursive-include tests *.py | ||
prune bin | ||
prune examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.PHONY: all install lint test clean | ||
|
||
all: install lint test | ||
|
||
install: | ||
pip install -e .[dev] | ||
|
||
install-examples: | ||
pip install -e .[examples] | ||
|
||
lint: | ||
flake8 | ||
isort -rc -c -df **/*.py | ||
yapf -dr datatables/ tests/ examples/ | ||
|
||
test: | ||
pytest -vx | ||
|
||
test-ci: | ||
pytest -qx --cov=datatables | ||
|
||
clean: | ||
git clean -dfX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
================================================================= | ||
`sqlalchemy-datatables <http://sqlalchemy-datatables.rtfd.org/>`_ | ||
================================================================= | ||
|
||
sqlalchemy-datatables is a library providing an `SQLAlchemy <http://www.sqlalchemy.org/>`_ integration of jQuery `DataTables <http://datatables.net/>`_. It helps you manage server side requests in your application. | ||
|
||
It is framework agnostic, tested with `Pyramid <http://www.pylonsproject.org/>`_ and `Flask <http://flask.pocoo.org/>`_ mainly. | ||
|
||
It only depends on SQLAlchemy, and is compatible with version **1.10.x** of DataTables. | ||
====================== | ||
sqlalchemy-datatables | ||
====================== | ||
|
||
|Build Status| |PyPi Version| |Coverage| | ||
|
||
|
@@ -19,21 +13,45 @@ It only depends on SQLAlchemy, and is compatible with version **1.10.x** of Data | |
.. |Coverage| image:: https://codecov.io/gh/Pegase745/sqlalchemy-datatables/branch/master/graph/badge.svg | ||
:target: https://codecov.io/gh/Pegase745/sqlalchemy-datatables | ||
|
||
sqlalchemy-datatables is a framework agnostic library providing an `SQLAlchemy <http://www.sqlalchemy.org/>`_ integration of jQuery `DataTables <http://datatables.net/>`_ >= 1.10, and helping you manage server side requests in your application. | ||
|
||
Installation | ||
------------ | ||
|
||
To install the stable version: | ||
**To install via pip:** | ||
|
||
*Python 2* | ||
|
||
.. code-block:: bash | ||
$ pip install sqlalchemy-datatables | ||
*Python 3* | ||
|
||
.. code-block:: bash | ||
$ pip3 install sqlalchemy-datatables | ||
**To install from source:** | ||
|
||
.. code-block:: bash | ||
pip install sqlalchemy-datatables | ||
$ git clone [email protected]:Pegase745/sqlalchemy-datatables.git | ||
$ cd sqlalchemy-datatables | ||
$ pip install . | ||
**To contribute:** | ||
|
||
.. code-block:: bash | ||
In a virtualenv | ||
$ git clone [email protected]:Pegase745/sqlalchemy-datatables.git | ||
$ cd sqlalchemy-datatables | ||
$ make all | ||
Usage | ||
----- | ||
|
||
**views.py** | ||
|
||
.. code-block:: python | ||
@view_config(route_name='data', renderer='json') | ||
|
@@ -65,36 +83,18 @@ Usage | |
# returns what is needed by DataTable | ||
return rowTable.output_result() | ||
Examples | ||
-------- | ||
|
||
You can find a detailed working example for Pyramid and Flask in the repository, including per column search, and one with the `yadcf <https://github.com/vedmack/yadcf/>`_ plugin. | ||
|
||
**Pyramid example:** | ||
|
||
.. code-block:: bash | ||
# go to directory | ||
cd sqlalchemy-datatables/examples/pyramid_tut | ||
# install example app | ||
pip install -e . | ||
# initialize the database | ||
initialize_pyramid_tut_db development.ini | ||
# start server | ||
pserve development.ini | ||
# browse to localhost:6543 | ||
Documentation | ||
------------- | ||
You can find working examples `in the repository <examples>`_, including an integration with the `yadcf <https://github.com/vedmack/yadcf/>`_ plugin: | ||
|
||
The latest documentation is available online on `Read the Docs <http://sqlalchemy-datatables.readthedocs.org/en/latest/>`_. | ||
- `Pyramid example <examples/pyramid_tut/README.rst>`_ | ||
- `Flask example <examples/flask_tut/README.rst>`_ | ||
|
||
Changelog | ||
--------- | ||
|
||
All notable changes to this project will be documented in `this section <CHANGELOG.rst>`_. | ||
All notable changes to this project will be documented in `this section <https://github.com/Pegase745/sqlalchemy-datatables/releases>`_. | ||
|
||
This project adheres to `Semantic Versioning <http://semver.org/>`_ and `Keep A Changelog <http://keepachangelog.com/>`_. | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.