Skip to main content

A utilities module that contains classes and functions that simplify interfaces with files and databases.

Project description

Describe project here

https://img.shields.io/badge/code%20style-black-000000.svg https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336 Documentation Status http://www.mypy-lang.org/static/mypy_badge.svg

Overview

This library contains basic utility classes and functions that enable faster Python programming. THese functions and methods standardize the process for reading in files of different types to include .csv, .txt, .xls, .xlsx, .json, .xml, .yaml, toml, SQLite, MySQL, SQL-Server and PostGreSQL files. In addition this library standardizes the process of setting and implementing log files. NOTE: Despite the fact that github shows the tests as failing, all tests do pass on a Linux and Mac platform before being uploaded to github. This issue appears to be caused by a library that while it works, was not written to be compatible with Python 3.11. We are working to fix this issue, but rest assure, the unit tests to pass.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to include and update tests as well as relevant doc-string and sphinx updates.

License

This project is licensed under a basic MIT License

Requirements

Python 3.8 or greater, developed with Python 3.11

Installation

In order to download this repository from github, follow these instructions

  1. Install poetry globally on your computer. Follow the instructions from the Poetry website

  2. Set the poetry virtual environment with the following command poetry config virtualenvs.in-project true

  3. Ensure you have .git installed on your computer.

  4. Open a terminal (Bash, zsh or DOS) and cd to the directory where you want to install the cobralib library

  5. Type git clone https://github.com/Jon-Webb-79/cobralib.git

  6. cd into the cobralib directory

  7. Create a virtual environment with the command python3 -m venv .venv

  8. Activate the virtual environment with the command source .venv/bin/activate

  9. Install packages. This library uses underlying packages to manage MySQL and PostGreSQL; however, each of these libraries requires that the user have MySQL and PostGreSQL servers installed locally on their machine

    • If the user does not have MySQL or PostGreSQL server installed on their machine type poetry install. This will install all packages other than the libraries for these two database management systems (DBMSs). Note, you will not be able to use the underlying functionality for these to DBMS’s.

    • If the user only has MySQL server installed locally, type poetry install -E mysql

    • If the user only has PostGreSQL installed locally, type poetry install -E postgresql

    • If the user has both MySQL and PostGreSQL installed locally, type poetry install -E mysql -E postgresql

    • If you plan to support development, install the read_the_doc sphinx package with pip, pip install sphinx_rtd_theme

  10. In the future this repository may also be available on PyPi

This package can also be installed via pip

  1. Install with all packages pip install cobralib

  2. Install with optional dependencies pip install 'cobralib[mysql, postgresql]'

Bug Report

  1. Despite the fact that the test suite passes on Mac and Linux, the Github tests appear to be failing due to a mismatch in libraries.

Future Work

  1. Strengthen unit testing for existing functions and classes

  2. Strenghten typing requirements for functions in io.py (yaml, json, xml, etc)

  3. Add support for Oracle RDBMS

  4. Add functionality for database backup for all db classes

  5. Add functionality for database migration for all db classes

  6. Consider C++ implementation for linked list and binary search trees

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

cobralib-0.1.3.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

cobralib-0.1.3-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file cobralib-0.1.3.tar.gz.

File metadata

  • Download URL: cobralib-0.1.3.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/6.4.12-arch1-1

File hashes

Hashes for cobralib-0.1.3.tar.gz
Algorithm Hash digest
SHA256 72a3275ba7d8fc17de1e0e364a00880f7f30ee9987519ab26c8ea0f791ffa161
MD5 c23af2d080833d84e133590a061663c3
BLAKE2b-256 568ca96a71bacabeccbd5fda69d351b743fffcde245dd9b8aac1b1ede8a6f028

See more details on using hashes here.

File details

Details for the file cobralib-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: cobralib-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/6.4.12-arch1-1

File hashes

Hashes for cobralib-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5f1e7a0008679902366335b37a606f3e8e70f50dc2928a0fa218061e748c24a3
MD5 d454dc2383fc39e8f281f3f882a002ba
BLAKE2b-256 047aa552ce40d8ca072289f3a71afbae11cf67910cf12092501316ffe1059b14

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page