Skip to content

enhancement/issue-15-change-name-and-fix-lowcardinality-issue #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[run]
plugins = Cython.Coverage
source = clickhouse_driver
source = proton_driver
8 changes: 4 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[flake8]
filename = *.py, *.pyx
per-file-ignores =
clickhouse_driver/columns/largeint.pyx: E225, E226, E227, E999
clickhouse_driver/bufferedreader.pyx: E225, E226, E227, E999
clickhouse_driver/bufferedwriter.pyx: E225, E226, E227, E999
clickhouse_driver/varint.pyx: E225, E226, E227, E999
proton_driver/columns/largeint.pyx: E225, E226, E227, E999
proton_driver/bufferedreader.pyx: E225, E226, E227, E999
proton_driver/bufferedwriter.pyx: E225, E226, E227, E999
proton_driver/varint.pyx: E225, E226, E227, E999
216 changes: 108 additions & 108 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ How to Contribute
=================

#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
#. Fork `the repository <https://github.com/mymarilyn/clickhouse-driver>`_ on GitHub to start making your changes to the **master** branch (or branch off of it).
#. Fork `the repository <https://github.com/timeplus/proton-driver>`_ on GitHub to start making your changes to the **master** branch (or branch off of it).
#. Write a test which shows that the bug was fixed or that the feature works as expected.
#. Send a pull request and bug the maintainer until it gets merged and published.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
recursive-include clickhouse_driver *.pyx
recursive-include proton_driver *.pyx
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ build:
python3 -m build

test:
pip install ./dist/clickhouse-driver-0.2.4.tar.gz
pip install ./dist/proton-driver-0.2.4.tar.gz
32 changes: 16 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
ClickHouse Python Driver
========================

.. image:: https://img.shields.io/pypi/v/clickhouse-driver.svg
:target: https://pypi.org/project/clickhouse-driver
.. image:: https://img.shields.io/pypi/v/.svg
:target: https://pypi.org/project/

.. image:: https://coveralls.io/repos/github/mymarilyn/clickhouse-driver/badge.svg?branch=master
:target: https://coveralls.io/github/mymarilyn/clickhouse-driver?branch=master
.. image:: https://coveralls.io/repos/github/timeplus//badge.svg?branch=master
:target: https://coveralls.io/github/timeplus/?branch=master

.. image:: https://img.shields.io/pypi/l/clickhouse-driver.svg
:target: https://pypi.org/project/clickhouse-driver
.. image:: https://img.shields.io/pypi/l/.svg
:target: https://pypi.org/project/

.. image:: https://img.shields.io/pypi/pyversions/clickhouse-driver.svg
:target: https://pypi.org/project/clickhouse-driver
.. image:: https://img.shields.io/pypi/pyversions/.svg
:target: https://pypi.org/project/

.. image:: https://img.shields.io/pypi/dm/clickhouse-driver.svg
:target: https://pypi.org/project/clickhouse-driver
.. image:: https://img.shields.io/pypi/dm/.svg
:target: https://pypi.org/project/

.. image:: https://github.com/mymarilyn/clickhouse-driver/actions/workflows/actions.yml/badge.svg
:target: https://github.com/mymarilyn/clickhouse-driver/actions/workflows/actions.yml
.. image:: https://github.com/timeplus//actions/workflows/actions.yml/badge.svg
:target: https://github.com/timeplus//actions/workflows/actions.yml

ClickHouse Python Driver with native (TCP) interface support.

Asynchronous wrapper is available here: https://github.com/mymarilyn/aioch
Asynchronous wrapper is available here: https://github.com/timeplus/aioch

Features
========
Expand Down Expand Up @@ -70,7 +70,7 @@ Features
Documentation
=============

Documentation is available at https://clickhouse-driver.readthedocs.io.
Documentation is available at https://.readthedocs.io.

Usage
=====
Expand All @@ -84,7 +84,7 @@ Pure Client example:

.. code-block:: python

>>> from clickhouse_driver import Client
>>> from proton_driver import Client
>>>
>>> client = Client('localhost')
>>>
Expand Down Expand Up @@ -114,7 +114,7 @@ DB API example:

.. code-block:: python

>>> from clickhouse_driver import connect
>>> from proton_driver import connect
>>>
>>> conn = connect('clickhouse://localhost')
>>> cursor = conn.cursor()
Expand Down
10 changes: 5 additions & 5 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
API
===

.. module:: clickhouse_driver
.. module:: proton_driver

This part of the documentation covers basic classes of the driver: Client, Connection and others.

Expand All @@ -21,7 +21,7 @@ Client
Connection
----------

.. autoclass:: clickhouse_driver.connection.Connection
.. autoclass:: proton_driver.connection.Connection
:members:
:inherited-members:

Expand All @@ -31,7 +31,7 @@ Connection
QueryResult
-----------

.. autoclass:: clickhouse_driver.result.QueryResult
.. autoclass:: proton_driver.result.QueryResult
:members:
:inherited-members:

Expand All @@ -41,7 +41,7 @@ QueryResult
ProgressQueryResult
-------------------

.. autoclass:: clickhouse_driver.result.ProgressQueryResult
.. autoclass:: proton_driver.result.ProgressQueryResult
:members:
:inherited-members:

Expand All @@ -51,6 +51,6 @@ ProgressQueryResult
IterQueryResult
---------------

.. autoclass:: clickhouse_driver.result.IterQueryResult
.. autoclass:: proton_driver.result.IterQueryResult
:members:
:inherited-members:
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Changelog
=========

Changelog is available in `github repo <https://github.com/mymarilyn/clickhouse-driver/blob/master/CHANGELOG.md>`_.
Changelog is available in `github repo <https://github.com/timeplus//blob/master/CHANGELOG.md>`_.
18 changes: 9 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

from clickhouse_driver import __version__, VERSION
from proton_driver import __version__, VERSION

# -- Project information -----------------------------------------------------

project = u'clickhouse-driver'
copyright = u'2017-2022, clickhouse-driver authors'
author = u'clickhouse-driver authors'
project = u''
copyright = u'2017-2022, authors'
author = u' authors'

# The short X.Y version
version = '.'.join(str(x) for x in VERSION[:2])
Expand Down Expand Up @@ -99,7 +99,7 @@
html_theme_options = {
"description": "Python driver for ClickHouse",
"github_user": "mymarilyn",
"github_repo": "clickhouse-driver",
"github_repo": "",
"fixed_sidebar": True,
"sidebar_width": '300px',
"page_width": '1000px'
Expand Down Expand Up @@ -150,7 +150,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'clickhouse-driver.tex', u'clickhouse-driver Documentation',
(master_doc, '.tex', u' Documentation',
author, 'manual'),
]

Expand All @@ -160,7 +160,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'clickhouse-driver', u'clickhouse-driver Documentation',
(master_doc, '', u' Documentation',
[author], 1)
]

Expand All @@ -171,8 +171,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'clickhouse-driver', u'clickhouse-driver Documentation',
author, 'clickhouse-driver', 'One line description of project.',
(master_doc, '', u' Documentation',
author, '', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
8 changes: 4 additions & 4 deletions docs/contents.rst.inc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
User's Guide
------------

This part of the documentation focuses on step-by-step instructions for development with clickhouse-driver.
This part of the documentation focuses on step-by-step instructions for development with .

Clickhouse-driver is designed to communicate with ClickHouse server from Python over native protocol.
is designed to communicate with ClickHouse server from Python over native protocol.

ClickHouse server provides two protocols for communication:

Expand All @@ -19,9 +19,9 @@ Each protocol has own advantages and disadvantages. Here we focus on advantages
Gzip compression is used in HTTP protocol.
* Query profile info is available over native protocol. We can read rows before limit metric for example.

Once again: clickhouse-driver uses native protocol (port 9000).
Once again: uses native protocol (port 9000).

There is an asynchronous wrapper for clickhouse-driver: aioch. It's available `here <https://github.com/mymarilyn/aioch>`_.
There is an asynchronous wrapper for : aioch. It's available `here <https://github.com/mymarilyn/aioch>`_.

.. toctree::
:maxdepth: 2
Expand Down
10 changes: 5 additions & 5 deletions docs/dbapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DB API 2.0

This part of the documentation covers driver DB API.

.. automodule:: clickhouse_driver.dbapi
.. automodule:: proton_driver.dbapi
:members:
:inherited-members:

Expand All @@ -14,7 +14,7 @@ This part of the documentation covers driver DB API.
Connection
----------

.. autoclass:: clickhouse_driver.dbapi.connection.Connection
.. autoclass:: proton_driver.dbapi.connection.Connection
:members:
:inherited-members:

Expand All @@ -24,7 +24,7 @@ Connection
Cursor
------

.. autoclass:: clickhouse_driver.dbapi.cursor.Cursor
.. autoclass:: proton_driver.dbapi.cursor.Cursor
:members:
:inherited-members:

Expand All @@ -33,6 +33,6 @@ Extras

.. _dbapi-extras:

.. autoclass:: clickhouse_driver.dbapi.extras.DictCursor
.. autoclass:: proton_driver.dbapi.extras.DictCursor

.. autoclass:: clickhouse_driver.dbapi.extras.NamedTupleCursor
.. autoclass:: proton_driver.dbapi.extras.NamedTupleCursor
20 changes: 10 additions & 10 deletions docs/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Client with compression support can be constructed as follows:

.. code-block:: python

>>> from clickhouse_driver import Client
>>> from proton_driver import Client
>>> client_with_lz4 = Client('localhost', compression=True)
>>> client_with_lz4 = Client('localhost', compression='lz4')
>>> client_with_zstd = Client('localhost', compression='zstd')
Expand All @@ -93,7 +93,7 @@ Secure connection

.. code-block:: python

>>> from clickhouse_driver import Client
>>> from proton_driver import Client
>>>
>>> client = Client('localhost', secure=True)
>>> # Using self-signed certificate.
Expand Down Expand Up @@ -243,14 +243,14 @@ Query logs can be received from server by using `send_logs_level` setting:
>>>
>>> settings = {'send_logs_level': 'debug'}
>>> client.execute('SELECT 1', settings=settings)
2018-12-14 10:24:53,873 INFO clickhouse_driver.log: [ klebedev-ThinkPad-T460 ] [ 25 ] {b328ad33-60e8-4012-b4cc-97f44a7b28f2} <Debug> executeQuery: (from 127.0.0.1:57762) SELECT 1
2018-12-14 10:24:53,874 INFO clickhouse_driver.log: [ klebedev-ThinkPad-T460 ] [ 25 ] {b328ad33-60e8-4012-b4cc-97f44a7b28f2} <Debug> executeQuery: Query pipeline:
2018-12-14 10:24:53,873 INFO proton_driver.log: [ klebedev-ThinkPad-T460 ] [ 25 ] {b328ad33-60e8-4012-b4cc-97f44a7b28f2} <Debug> executeQuery: (from 127.0.0.1:57762) SELECT 1
2018-12-14 10:24:53,874 INFO proton_driver.log: [ klebedev-ThinkPad-T460 ] [ 25 ] {b328ad33-60e8-4012-b4cc-97f44a7b28f2} <Debug> executeQuery: Query pipeline:
Expression
Expression
One

2018-12-14 10:24:53,875 INFO clickhouse_driver.log: [ klebedev-ThinkPad-T460 ] [ 25 ] {b328ad33-60e8-4012-b4cc-97f44a7b28f2} <Information> executeQuery: Read 1 rows, 1.00 B in 0.004 sec., 262 rows/sec., 262.32 B/sec.
2018-12-14 10:24:53,875 INFO clickhouse_driver.log: [ klebedev-ThinkPad-T460 ] [ 25 ] {b328ad33-60e8-4012-b4cc-97f44a7b28f2} <Debug> MemoryTracker: Peak memory usage (for query): 40.23 KiB.
2018-12-14 10:24:53,875 INFO proton_driver.log: [ klebedev-ThinkPad-T460 ] [ 25 ] {b328ad33-60e8-4012-b4cc-97f44a7b28f2} <Information> executeQuery: Read 1 rows, 1.00 B in 0.004 sec., 262 rows/sec., 262.32 B/sec.
2018-12-14 10:24:53,875 INFO proton_driver.log: [ klebedev-ThinkPad-T460 ] [ 25 ] {b328ad33-60e8-4012-b4cc-97f44a7b28f2} <Debug> MemoryTracker: Peak memory usage (for query): 40.23 KiB.
[(1,)]


Expand All @@ -266,7 +266,7 @@ This option is good for ClickHouse cluster with multiple replicas.

.. code-block:: python

>>> from clickhouse_driver import Client
>>> from proton_driver import Client
>>> client = Client('host1', alt_hosts='host2:1234,host3,host4:5678')

In example above on every *new* connection driver will use following sequence
Expand Down Expand Up @@ -296,7 +296,7 @@ Parameters are expected in Python extended format codes, e.g.

.. code-block:: python

>>> from clickhouse_driver import connect
>>> from proton_driver import connect
>>> conn = connect('clickhouse://localhost')
>>> cursor = conn.cursor()
>>>
Expand Down Expand Up @@ -357,15 +357,15 @@ You can use ``cursor_factory`` argument to get results as dicts or named tuples

.. code-block:: python

>>> from clickhouse_driver.dbapi.extras import DictCursor
>>> from proton_driver.dbapi.extras import DictCursor
>>> with connect('clickhouse://localhost') as conn:
>>> with conn.cursor(cursor_factory=DictCursor) as cursor:
>>> cursor.execute('SELECT * FROM system.tables')
>>> print(cursor.fetchall())

.. code-block:: python

>>> from clickhouse_driver.dbapi.extras import NamedTupleCursor
>>> from proton_driver.dbapi.extras import NamedTupleCursor
>>> with connect('clickhouse://localhost') as conn:
>>> with conn.cursor(cursor_factory=NamedTupleCursor) as cursor:
>>> cursor.execute('SELECT * FROM system.tables')
Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Welcome to clickhouse-driver
Welcome to
============================

Release |release|.

Welcome to clickhouse-driver's documentation. Get started with :ref:`installation`
Welcome to 's documentation. Get started with :ref:`installation`
and then get an overview with the :ref:`quickstart` where common queries are described.


Expand Down
Loading