A Django database backend for integration with TimescaleDB
Project description
A database backend for Timescaledb.
Based on gist from WeRiot.
Still WIP.
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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1cf12c1ec7f3b9a4cabbb9f4c3636d6ea27bb0430867f32126eefe7f5b7530 |
|
MD5 | 7f8fe61ecae31d91930d53bffe2b260c |
|
BLAKE2b-256 | b03a907bd2b9809185139069a34efba965d3525271570a72145c02c6b4230fcf |