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
django-timescaledb-0.2.4.tar.gz
(12.6 kB
view hashes)
Built Distribution
Close
Hashes for django_timescaledb-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53b88a9c98b746e5f4c98b0ce74d46c4bed2638e0ec146f219d87bf15a284447 |
|
MD5 | bb3defe8a047d2c7fdf2d07ace60ba61 |
|
BLAKE2b-256 | 40cf667861a363c429ad446058d55ef47fcb6370bd32096333b7f6371e116836 |