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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-timescaledb-0.2.2.tar.gz.
File metadata
- Download URL: django-timescaledb-0.2.2.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28d13a0f74e7a10f98ac399cc0563b117f965a2f9e0a8617de3d89d0efa64dfe
|
|
| MD5 |
cbe3824d9d87392a5e55fd2274242f24
|
|
| BLAKE2b-256 |
14c192a099c59f4e9123f9a88f46a625476cefe835d76242285be7020c0df80a
|
File details
Details for the file django_timescaledb-0.2.2-py3-none-any.whl.
File metadata
- Download URL: django_timescaledb-0.2.2-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46e1cba6256e4ab154d9b6e0dc2d3fc18979608ba2737e4ec7a0354519c4fb3d
|
|
| MD5 |
b4d6c08cdf2b1a309cbd55dfd6cedc69
|
|
| BLAKE2b-256 |
a4262372ece3e3f7221d5ef8e6e78445d82da6756e1c73c48de27d4bd40cc60e
|