Common Mamon11 tools and utilities
Project description
Mamon Utilities
A set of tools and utilities for 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.2.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for mamon_utils-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ec2ff30c329abebf3a27209f930b1d60529758c5e2fbc148b977257f92aab42 |
|
MD5 | f8b6587448b25d3ec62187427d263f9e |
|
BLAKE2b-256 | aab4deb66bc2307db9b79621e5c366039a7586c86a7bdff2793aee8bf6049a18 |