Metadata-Version: 2.1
Name: mamon-utils
Version: 0.0.1
Summary: Common tools and utilities
Author: WessCoby
Author-email: <wc@wesscoby.com>
Description-Content-Type: text/markdown
Requires-Dist: psycopg2-binary (==2.9.5)
Requires-Dist: python-dotenv (==1.0.0)


# Mamon Utilities

A set of tools and utilities for Mamon11 Python Development

## Installation
```sh
pip install mamon-utils
```

## Usage
To use any of these modules, just import from `mamonutils`.

### Database
This module makes it easy to connect to our PostgreSQL databases. To use it, you have to add a `.env` file in the root of your project specifying the following environment variables:
```.env
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
```

Example usage:
```python
from mamonutils import Database, dotenv

# Load environment variables
dotenv()

# Connect to clients database
db = Database('clients')
cursor = db.cursor

cursor.execute('SELECT * from clients')
result = cursor.fetchall()
print(result)

# Disconnect
db.disconnect()
```
