Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Internet > HTTP (WWW)

    HTSQL-DJANGO 2.3.2

    Download button

    No screenshots available
    Downloads: 142  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Clark C. Evans and Kirill Simonov; Prometheus Research, LLC | More programs
    AGPL v3 / FREE
    August 28th, 2012, 18:22 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    HTSQL-DJANGO description

    A Database Query Language (Django gateway)

    HTSQL-DJANGO is a comprehensive navigational query language for relational databases. This package contains a Django application that provides a gateway to HTSQL service.

    This is an experimental package. The usage, API, and security assumptions may change in future releases.

    For more information on HTSQL, please see:

     http://htsql.org/
     The HTSQL homepage
     http://pypi.python.org/pypi/HTSQL/
     The source package for HTSQL

    Installation and Usage

    This package allows you to use HTSQL in your Django projects. To install it, run:

    # pip install HTSQL-DJANGO

    This command installs HTSQL itself and a Django gateway. Out of the box, HTSQL works with SQLite databases. To run HTSQL on top of other database servers, install additional database backends:

    # pip install HTSQL-PGSQL
    # pip install HTSQL-MYSQL


    To use HTSQL in your Django project, open settings.py and add 'htsql_django' to the list of installed applications:

    INSTALLED_APPS = (
     # ...
     'htsql_django',
    )


    When used in a Django project, HTSQL service is automatically configured to serve on the default Django database. You could provide additional configuration options using parameter HTSQL_CONFIG. For instance, a reasonable configuration could be:

    HTSQL_CONFIG = {
     # Set query timeout in seconds (currently, PostgreSQL only).
     'tweak.timeout': { 'timeout': 600 },
     # Set the maximum number of output rows.
     'tweak.autolimit': { 'limit': 10000 },
     # Enable the web-based query editor.
     'tweak.shell.default': {},
     # Enable meta-data queries.
     'tweak.meta': {},
    }


    Next, add the gateway to the URL dispatcher. Open urls.py and add the following line:

    urlpatterns = patterns('',
     # ...
     url(r'^htsql/', include('htsql_django.urls')),
    )


    This will forward HTTP requests starting from /htsql/ to the HTSQL service. The gateway is available only to authenticated users.

    You could also make HTSQL queries from Python code. For example, to calculate the total number of votes per poll in the Django tutorial project, run:

    >>> from htsql_django import produce
    >>>
    >>> query = "/polls_poll{question, total:=sum(polls_choice.votes)}"
    >>> for row in produce(query):
    ... print "%s: %s" % (row.question, row.total)
    ...
    What's up?: 6



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    Django gateway | database query | Django | gateway | database

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM