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.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46e1cba6256e4ab154d9b6e0dc2d3fc18979608ba2737e4ec7a0354519c4fb3d |
|
MD5 | b4d6c08cdf2b1a309cbd55dfd6cedc69 |
|
BLAKE2b-256 | a4262372ece3e3f7221d5ef8e6e78445d82da6756e1c73c48de27d4bd40cc60e |