Skip to main content

Function easing life :)

Project description

pynut - Laurent Tupin

It provides various functions to simplify the users life.

Installation

You can install the package from PyPI:

python -m pip install pynut-DB

The package is supported on Python 3.7 and above.

How to use

You can call a function as this example:

$ ----------------------------------------------------
>>> from pyNutTools import nutDate
>>> nutDate.today()

This is the libraries I am using with the package

$ ----------------------------------------------------
>>> pyodbc==4.0.32

Documentation

Temporary documentation for nutDb :

from pyNutDB import nutDb as db

1. Lite Db

db_lite = db.c_db_lite(r'\db_param.db')
db_lite.connect()
df_UID = db_lite.getDataframe("SELECT * FROM tbl_Table")
db_lite.closeConnection()
""" This class allows you to manage simple lite database"""

2. SQL Server (pyodbc)

dbServer =  db.c_db_withLog()
# df_UID will be a dataframe of connexion: Server, Database, UID, Password
dbServer.dataframeCredentials(df_UID)

# Request with a dataframe as a return
db.db_SelectReq("SELECT top 10 * FROM tbl_Table")
print(dbServer.df_result)

# OR EXEC a stored procedure    
db.db_EXEC('EXEC Stored_Procedure')

END

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

pynut-DB-2.1.5.tar.gz (22.1 kB view hashes)

Uploaded Source

Built Distribution

pynut_DB-2.1.5-py3-none-any.whl (19.2 kB view hashes)

Uploaded Python 3

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