Metadata-Version: 2.1
Name: dot-connect
Version: 0.3.32
Summary: Improve your workflow efficiency by connecting to databases and cloud systems effortlessly.
Home-page: https://github.com/learning-the-computers/dot-connect
Author: Tyler White
License: Apache-2.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml
Provides-Extra: aws
Requires-Dist: boto3 >=1.28.30 ; extra == 'aws'
Provides-Extra: azure
Requires-Dist: azure-core >=1.29.2 ; extra == 'azure'
Requires-Dist: azure-storage-blob >=12.17.0 ; extra == 'azure'
Provides-Extra: dev
Requires-Dist: ipykernel >=6.25.1 ; extra == 'dev'
Requires-Dist: mkdocs >=1.5.2 ; extra == 'dev'
Requires-Dist: mkdocs-material >=9.2.3 ; extra == 'dev'
Requires-Dist: mkdocstrings[python] ; extra == 'dev'
Requires-Dist: pre-commit >=3 ; extra == 'dev'
Requires-Dist: pytest >=7.4.0 ; extra == 'dev'
Requires-Dist: python-dotenv >=1.0.0 ; extra == 'dev'
Requires-Dist: tox >=4.9.0 ; extra == 'dev'
Requires-Dist: tox-gh-actions >=3.1.3 ; extra == 'dev'
Provides-Extra: impala
Requires-Dist: impyla >=0.18.0 ; extra == 'impala'
Provides-Extra: mssql
Requires-Dist: pyodbc >=4.0.39 ; extra == 'mssql'
Provides-Extra: mysql
Requires-Dist: mysql-connector-python >=8.1.0 ; extra == 'mysql'
Provides-Extra: postgres
Requires-Dist: psycopg2-binary >=2.9.7 ; extra == 'postgres'
Provides-Extra: pyspark
Requires-Dist: pyspark >=3.4.1 ; extra == 'pyspark'
Provides-Extra: snowflake
Requires-Dist: snowflake-connector-python >=3.0.4 ; extra == 'snowflake'
Requires-Dist: snowflake-sqlalchemy >=1.4.7 ; extra == 'snowflake'
Provides-Extra: snowpark
Requires-Dist: snowflake-snowpark-python >=1.6.1 ; extra == 'snowpark'

<div align="center">
  <img src="https://github.com/charleshardage/dot-connect/assets/119973756/7d52a0b4-a7c3-4df0-845d-0d73b0a20a42"><br>
</div>

-----------------

# dot-connect
[![pytest + coverage](https://github.com/learning-the-computers/dot-connect/actions/workflows/pytest_cov.yml/badge.svg)](https://github.com/learning-the-computers/dot-connect/actions/workflows/pytest_cov.yml)
[![codecov](https://codecov.io/github/learning-the-computers/dot-connect/graph/badge.svg?token=BRBGOLAYLE)](https://codecov.io/github/learning-the-computers/dot-connect)
[![PyPI](https://img.shields.io/pypi/v/dot-connect.svg)](https://pypi.org/project/dot-connect)

A Python package designed to simplify the way you fetch connection configurations and establish connections to various databases and cloud systems.

## 🚀 Features

- **Unified Interface**: Say goodbye to juggling multiple APIs. Enjoy a standardized interface, making connecting with various databases and cloud providers easier.

- **Easy Configuration**: Fetch connection configurations with ease. `dot_connect` supports various sources like JSON files, environment variables, and more, ensuring flexibility and adaptability for your projects.

- **Supported Backends**: Out-of-the-box support for popular systems such as MySQL, Postgres, and Snowflake. We're continuously working to expand this list.

- **Extensibility**: Designed with developers in mind, it's easy to extend and customize `dot_connect` for your needs.

## 📦 Installation (PyPI)

```bash
pip install dot-connect
```

## 🔧 Usage

Using `dot_connect` is intuitive and straightforward.

### Getting Things Set Up

Before you begin, you can configure your environment variables by using a `.env` file or an alternative method. Additionally, you can utilize default authorization patterns supported by your chosen backend. `dot-connect` will prioritize credentials in a `.env` file.

Below are step-by-step examples of how you can connect and query various backends:

#### Snowflake

```python
import dot_connect

con = dot_connect.snowflake.connect()
print(con.cursor().execute("SELECT 1;").fetchall())
```

#### MySQL
```python
import dot_connect

con = dot_connect.mysql.connect()
cursor = con.cursor()
cursor.execute("SELECT 1")
result = cursor.fetchall()
print(result)
```

#### PostgreSQL
```python
import dot_connect

con = dot_connect.postgres.connect()
cursor = con.cursor()
cursor.execute("SELECT 1")
result = cursor.fetchall()
print(result)
```

## 🤝 Contributing

We welcome contributions from the community. Whether it's a bug report, a new feature, or an improvement, your insights will help make `dot_connect` even better. For more details, please see our [contributing guidelines](docs/CONTRIBUTING.md).

## ⚖️ License
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full text.
