A Django database backend for integration with TimescaleDB
Project description
A database backend for Timescaledb.
Based on gist from WeRiot.
Quick start
Install via pip
pip install django-timescaledb
Use as DATABASE engine in settings.py:
DATABASES = {
'default': {
'ENGINE': 'timescale',
...
},
}
Use TimescaleDateTimeField in your models. A hypertable will automatically be created.
from timescale.fields import TimescaleDateTimeField
class SensorLog(models.Model):
date = TimescaleDateTimeField(interval="1 day")
value = models.IntegerField()
Custom DB backend
Use a custom PostgreSQL db backend like PostGIS.
# Configure via settings.py
TIMESCALE_DB_BACKEND_BASE = "django.contrib.gis.db.backends.postgis"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_timescaledb-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40cd25059d01eb162bd3b875979b65d1bb263ad69b8bd77d9b2d9544246bfdf3 |
|
MD5 | 3a3814be26481673c41103fa83a13f5f |
|
BLAKE2b-256 | 1e8d6088b00bcaa7f709c40f5a0b8137d900089b154fad8b6f8c51661ce4767c |