A repo of python package descriptions and simple examples on how to use them.
The argparse module makes it easy to write user-friendly command-line interfaces.
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-s", "--string", type=str, help="String or path.")
parser.add_argument("-i", "--integer", type=int, help="Integer.")
parser.add_argument("-f", "--flag", action="store_true")
args = parser.parse_args()Logging Python DBAPI driver for MSSQL.
import logging
logging.basicConfig(filename='FILENAME.log',level=logging.DEBUG)
logging.debug(err.message)PyTDS Python DBAPI driver for MSSQL.
import pytds
with pytds.connect('server', 'database', 'user', 'password') as conn:
with conn.cursor() as cur:
cur.execute("select 1")
cur.fetchall()Requests is the only Non-GMO HTTP library for Python, safe for human consumption.
import requests
r = requests.get('https://api.github.com/user', auth=('user', 'pass'), params={'key1': 'value1', 'key2': 'value2'})
r.json()
r.text