If You want to go with Online https://www.timescale.com/
follow the below steps
-
Create an account in https://www.timescale.com/

-
Start Working with TimescaleDB
- Install TimeScaleDB with Docker
docker run -d --name timescaledb \
-p 5432:5432 \
-e POSTGRES_PASSWORD=yourpassword \
timescale/timescaledb:latest-pg14- Create a Database and connect to it
psql -h localhost -U postgresNote: make sure you have postgresql-client installed in your system
sudo apt update
sudo apt install postgresql-client-common postgresql-client- Create a new database:
CREATE DATABASE timeseries_db;- Enable the TimeScaleDB extension:
\c timeseries_db
CREATE EXTENSION IF NOT EXISTS timescaledb;- Install Python Dependencies
pip install psycopg2 sqlalchemy timescale-client
# for ubuntu
sudo apt-get install -y python3-psycopg2
pip install psycopg2-binary
- create db_config.py file
- create setup_timescale.py file
- run setup_timescale.py file
python setup_timescale.pyINFO:root:Hypertable created.
INFO:root:Sample data inserted.
INFO:root:Aggregated Data:
INFO:root:Sensor ID: 2, Avg Temp: 23.100000000000005, Max Humidity: 59.8
INFO:root:Sensor ID: 1, Avg Temp: 22.199999999999996, Max Humidity: 61.2
now you can start working with timescaledb





