Skip to main content

HTSQL-DJANGO – Django gateway to HTSQL

HTSQL 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

Metadata

Release files for HTSQL-DJANGO 2.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for HTSQL-DJANGO 2.3.3
File Size Uploaded Provenance
HTSQL-DJANGO-2.3.3.zip 16.0 kB Without provenance Details
HTSQL-DJANGO-2.3.3.tar.gz 10.5 kB Without provenance Details

Release files / HTSQL-DJANGO-2.3.3.zip

Download URL HTSQL-DJANGO-2.3.3.zip
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
04fae2c5e04e2dc78f1901dbf2e522853a160231600428c1fb483a69a0e505e2
BLAKE2b-256 checksum
How to use checksums
29deb28f3146770eb0f1f906ba50587ce0e183f253b47ec95620a1db1e1f2db4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / HTSQL-DJANGO-2.3.3.tar.gz

Download URL HTSQL-DJANGO-2.3.3.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b153c316d4e48541c21448473b7e0d45c870dc4c7bf3f041cef7eb911a0bce5e
BLAKE2b-256 checksum
How to use checksums
b2d84240800b986b756945bbd6a9721c93f112efae7d5c0b686fa337dc9f0c56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for HTSQL-DJANGO 2.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page