Skip to main content

Data common code for database interactions by Equinox

Project description

PyPI Version Documentation Status Code Quality Grade Coverage Code of Conduct

Equinox Common Code Utility for Python 3 for DB interactions! There are currently interaction classes for the following DBs and Apps:

  • MySQL
  • SQLite
  • Postgres
  • Redshift

Quick Start

Sample Usage

from datacoco_db import MSSQLInteraction

mssql = MSSQLInteraction(dbname="db_name",

mssql.conn() # open a connection

mssql.batch_open() # cursor

results = mssql.fetch_sql_one("SELECT * FROM MyTable") # fetch one


mssql.batch_close() # close cursor

The example above makes use of mssql_tools. All tools follows the same pattern in terms of usage.


datacoco-db requires Python 3.6+

python3 -m venv <virtual env name>
source <virtual env name>/bin/activate
pip install datacoco-db


Getting Started

It is recommended to use the steps below to set up a virtual environment for development:

python3 -m venv <virtual env name>
source <virtual env name>/bin/activate
pip install -r requirements.txt

Pyodbc Dependency Installation

Installing the Microsoft ODBC Driver for SQL Server on Linux and macOS


pip install -r requirements-dev.txt

Modify the connection configuration for integration testing.

To run the testing suite, simply run the command: python -m unittest discover tests

For coverage report, run tox View the results in .tox/coverage/index.html


Contributions to datacoco_db are welcome!

Please reference guidelines to help with setting up your development environment here.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datacoco-db-0.1.10.tar.gz (16.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page