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.3.tar.gz
(2.1 kB
view hashes)
Built Distribution
Close
Hashes for mamon_utils-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c59c8f5e38b2cd2fcf5e44f55b1725717b94b84cc07b9b3be542c09a67e457 |
|
MD5 | 8a0b28bfbd4030285024c61d45fe34f7 |
|
BLAKE2b-256 | e2d7a0f0e2e4aa9ffa727d0cdc047ba2b0bf242defa2c956a61634f05e61c323 |