معرفی شرکت ها


connectors-to-databases-1.0.0


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Python module for connect with PostgreSQL and ClickHouse
ویژگی مقدار
سیستم عامل -
نام فایل connectors-to-databases-1.0.0
نام connectors-to-databases
نسخه کتابخانه 1.0.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده k0rsakov
ایمیل نویسنده korsakov.iyu@gmail.com
آدرس صفحه اصلی https://github.com/k0rsakov/connectors_to_databases
آدرس اینترنتی https://pypi.org/project/connectors-to-databases/
مجوز Apache License, Version 2.0, see LICENSE file
# Connector to databases ![PyPI](https://img.shields.io/pypi/v/connectors-to-databases?color=blueviolet) ![Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11](https://img.shields.io/pypi/pyversions/clubhouse?color=blueviolet) ![License](https://img.shields.io/pypi/l/connectors-to-databases?color=blueviolet) **Connector to databases** – easy package for connect with database [PostgreSQL](https://github.com/postgres/postgres) and [ClickHouse](https://github.com/ClickHouse/ClickHouse) ## Installation Install the current version with [PyPI](https://pypi.org/project/connectors-to-databases/): ```bash pip install connectors-to-databases ``` Or from GitHub: ```bash pip install https://github.com/k0rsakov/connectors_to_databases/archive/refs/heads/main.zip ``` ## How to use class PostgreSQL ### Creating instance of class You can create as many database connectors as you want. ```python from connectors_to_databases import PostgreSQL pg = PostgreSQL() pg_other = PostgreSQL( host='0.0.0.0', port=0, database='main', login='admin', password='admin', ) ``` ### Creating a table for examples ```python pg.execute_script('CREATE TABLE simple_ (id int4)') ``` ### Filling the table with data ```python # simple pd.DataFrame df = pd.DataFrame(data={'id':[1]}) pg.into_pg_table( df=df, pg_table_name='simple_' ) ``` ### Getting data from a table ```python pg.execute_to_df( '''select * from simple_''' ) ``` ### Getting a connector to the database. It can be used as you need. ```python pg.get_uri() ``` What does the connector look like ```log Engine(postgresql://postgres:***@localhost:5432/postgres) ``` ### Delete our `simple_` table ```python pg.execute_script('DROP TABLE simple_') ``` ## How to use class ClickHouse ### Creating instance of class You can create as many database connectors as you want. ```python from connectors_to_databases import ClickHouse ch = ClickHouse() ch_other = ClickHouse( host='0.0.0.0', port=0, login='admin', password='admin', ) ``` ### Creating a table for examples ```python ch.execute_script( ''' CREATE TABLE test ( value Int64 ) ENGINE = MergeTree ORDER BY value ''' ) ``` ### Filling the table with data ```python # simple pd.DataFrame df = ch.DataFrame(data={'value':[1]}) ch.into_pg_table( df=df, pg_table_name='test' ) ``` ### Getting data from a table ```python ch.execute_to_df( '''select * from test''' ) ``` ### Getting a connector to the database. It can be used as you need. ```python ch.get_uri() ``` What does the connector look like ```log Engine(clickhouse://click:***@localhost:8123/default) ``` ### Delete our `simple_` table ```python ch.execute_script('DROP TABLE test') ``` ## Contributing Bug reports and/or pull requests are welcome ## License The module is available as open source under the terms of the [Apache License, Version 2.0](https://opensource.org/licenses/Apache-2.0)


نحوه نصب


نصب پکیج whl connectors-to-databases-1.0.0:

    pip install connectors-to-databases-1.0.0.whl


نصب پکیج tar.gz connectors-to-databases-1.0.0:

    pip install connectors-to-databases-1.0.0.tar.gz