Common tools and utilities
Project description
Mamon Utilities
A set of tools and utilities for Mamon11 Python Development
Installation
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:
DB_HOST=
DB_PORT=
DB_USER=
DB_PASSWORD=
Example usage:
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()
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
mamon-utils-0.0.1.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for mamon_utils-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ea9ecae8b9e3a14c721c90950d83e3989759ddb8845c723acf472ab8ba9c82c |
|
MD5 | 2fcb5bf5eca15a2b9a44b72c44b68bb7 |
|
BLAKE2b-256 | 57f6079905dff6cbbca00adbee5fb1ea7aeeb993fe4dafcf22135d765fd6d5ea |