All Projects → Pegase745 → Sqlalchemy Datatables

Pegase745 / Sqlalchemy Datatables

Licence: mit
SQLAlchemy integration of jQuery DataTables >= 1.10.x (Pyramid and Flask examples)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sqlalchemy Datatables

Pyhive
Python interface to Hive and Presto. 🐝
Stars: ✭ 1,378 (+913.24%)
Mutual labels:  sqlalchemy
Django Jinja Knockout
Django datatables and widgets, both AJAX and traditional. Display-only ModelForms. ModelForms / inline formsets with AJAX submit and validation. Works with Django templates.
Stars: ✭ 116 (-14.71%)
Mutual labels:  datatables
Scrapy demo
all kinds of scrapy demo
Stars: ✭ 128 (-5.88%)
Mutual labels:  sqlalchemy
Sqlalchemy Imageattach
SQLAlchemy extension for attaching images to entities.
Stars: ✭ 107 (-21.32%)
Mutual labels:  sqlalchemy
Tornado Sqlalchemy
SQLAlchemy support for Tornado
Stars: ✭ 112 (-17.65%)
Mutual labels:  sqlalchemy
Vue Datatables Net
Vue jQuery DataTables.net wrapper component
Stars: ✭ 119 (-12.5%)
Mutual labels:  datatables
Data tables
Data Tables for Flutter
Stars: ✭ 100 (-26.47%)
Mutual labels:  datatables
Sandman2
Automatically generate a RESTful API service for your legacy database. No code required!
Stars: ✭ 1,765 (+1197.79%)
Mutual labels:  sqlalchemy
Angular Datatables
DataTables with Angular
Stars: ✭ 1,518 (+1016.18%)
Mutual labels:  datatables
Jupyter Datatables
Jupyter Notebook extension leveraging pandas DataFrames by integrating DataTables and ChartJS.
Stars: ✭ 127 (-6.62%)
Mutual labels:  datatables
Flask Graphene Sqlalchemy
⚗️Project template to build a GraphQL API in Python
Stars: ✭ 109 (-19.85%)
Mutual labels:  sqlalchemy
Sqla Wrapper
A friendly wrapper for SQLAlchemy
Stars: ✭ 111 (-18.38%)
Mutual labels:  sqlalchemy
Bottle Sqlalchemy
Bottle SQLAlchemy plugin
Stars: ✭ 125 (-8.09%)
Mutual labels:  sqlalchemy
Weeklyreport
基于Flask的开源周报系统,快速docker部署
Stars: ✭ 102 (-25%)
Mutual labels:  sqlalchemy
Backendschool2019
Приложение для практического руководства по разработке бекенд-сервисов на Python (на основе вступительного испытания в Школу бэкенд‑разработки Яндекса)
Stars: ✭ 129 (-5.15%)
Mutual labels:  sqlalchemy
Ssp
Customized Server Side Processing (SSP) Class For Datatables Library
Stars: ✭ 101 (-25.74%)
Mutual labels:  datatables
Flask Graphene Sqlalchemy
A demo project for Flask + GraphQL (With Graphene & SQLAlchemy)
Stars: ✭ 117 (-13.97%)
Mutual labels:  sqlalchemy
Bootstrap Table
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
Stars: ✭ 11,068 (+8038.24%)
Mutual labels:  datatables
Openimu
Open Source Analytics & Visualisation Software for Inertial Measurement Units
Stars: ✭ 133 (-2.21%)
Mutual labels:  sqlalchemy
Querybuilderparser
A simple to use query builder for the jQuery QueryBuilder plugin for use with Laravel.
Stars: ✭ 126 (-7.35%)
Mutual labels:  datatables

====================== sqlalchemy-datatables

|Build Status| |PyPi Version| |Scrutinizer| |Coverage|

.. |Build Status| image:: https://travis-ci.org/Pegase745/sqlalchemy-datatables.svg?branch=master :target: https://travis-ci.org/Pegase745/sqlalchemy-datatables

.. |PyPi Version| image:: https://badge.fury.io/py/sqlalchemy-datatables.svg :target: https://pypi.python.org/pypi/sqlalchemy-datatables/

.. |Scrutinizer| image:: https://scrutinizer-ci.com/g/Pegase745/sqlalchemy-datatables/badges/quality-score.png :target: https://scrutinizer-ci.com/g/Pegase745/sqlalchemy-datatables/

.. |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 via pip:

Python 3

.. code-block:: bash

$ pip3 install sqlalchemy-datatables

To install from source:

.. code-block:: bash

$ git clone [email protected]:Pegase745/sqlalchemy-datatables.git
$ cd sqlalchemy-datatables
$ pip3 install .

To contribute:

.. code-block:: bash

In a virtualenv
$ git clone [email protected]:Pegase745/sqlalchemy-datatables.git
$ cd sqlalchemy-datatables
$ make all

Usage

.. code-block:: python

@view_config(route_name='data', renderer='json')
def data(request):
    """Return server side data."""
    # defining columns
    #  - explicitly cast date to string, so string searching the date
    #    will search a date formatted equal to how it is presented
    #    in the table
    columns = [
        ColumnDT(User.id),
        ColumnDT(User.name),
        ColumnDT(Address.description),
        ColumnDT(func.strftime('%d-%m-%Y', User.birthday)),
        ColumnDT(User.age)
    ]

    # defining the initial query depending on your purpose
    #  - don't include any columns
    #  - if you need a join, also include a 'select_from'
    query = DBSession.query().\
        select_from(User).\
        join(Address).\
        filter(Address.id > 4)

    # instantiating a DataTable for the query and table needed
    rowTable = DataTables(request.GET, query, columns)

    # returns what is needed by DataTable
    return rowTable.output_result()

Examples

You can find working examples in the repository <examples>, including an integration with the yadcf <https://github.com/vedmack/yadcf/> plugin:

  • 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 <https://github.com/Pegase745/sqlalchemy-datatables/releases>_.

This project adheres to Semantic Versioning <http://semver.org/>_ and Keep A Changelog <http://keepachangelog.com/>_.

License

The project is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].