Skip to main content

sqlalchemy-clickhouse-timezone

add timezone support

Installation

The package is installable through PIP:

pip install sqlalchemy-clickhouse-timezone

Usage

setting the environ param to start timezone support

default is ‘0’ using pytz.utc

‘CLICKHOUSE_USE_TIMEZONE’: ‘0’ => using utc

‘CLICKHOUSE_USE_TIMEZONE’: ‘1’ => using system timezone

‘CLICKHOUSE_USE_TIMEZONE’: ‘Asia/Shanghai’ => using configed Asian/Shanghai

configed

os.environ.setdefault(‘CLICKHOUSE_USE_TIMEZONE’, ‘0’)

os.environ.setdefault(‘CLICKHOUSE_USE_TIMEZONE’, ‘1’)

os.environ.setdefault(‘CLICKHOUSE_USE_TIMEZONE’, ‘Asia/Shanghai’)

‘infi.clickhouse_orm==1.0.4’

original project usage…

ClickHouse dialect for SQLAlchemy.

The DSN format is similar to that of regular Postgres:

>>> import sqlalchemy as sa
>>> sa.create_engine('clickhouse://username:password@hostname:port/database')
Engine('clickhouse://username:password@hostname:port/database')

It implements a dialect, so there’s no user-facing API.

Testing

The dialect can be registered on runtime if you don’t want to install it as:

from sqlalchemy.dialects import registry
registry.register("clickhouse", "base", "dialect")

Release files for sqlalchemy-clickhouse-timezone 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlalchemy-clickhouse-timezone 0.1.4
File Size Uploaded
sqlalchemy_clickhouse_timezone-0.1.4.tar.gz 13.4 kB Details

Release files / sqlalchemy_clickhouse_timezone-0.1.4.tar.gz

Download URL sqlalchemy_clickhouse_timezone-0.1.4.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
aedeed6ecaee046c9de71da4f61800e13ec3e1906e021208faa2a067679680e9
BLAKE2b-256 checksum
How to use checksums
3ab5817c7187df2b4f8ca45fb60b51787547e5f6c363d50ff6c5e2b4ae809a9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.4

Release history Release notifications | RSS feed

This release

0.1.4 This release

1 release file

0.1.3

1 release file

0.1.2

2 release files

0.1.1

1 release file

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page