Skip to main content

Simple racktables API

Project description

rtapi

pipeline status coverage report

Racktables API

Python module for accessing and manipulating racktables objects.

Installation

pip install racktables-api

PyPi project

https://pypi.org/project/racktables-api/

Documentation

https://rtapi.readthedocs.io

Example

import MySQLdb
import rtapi

# Create connection to database
try:
    # Create connection to database
    db = MySQLdb.connect(host='hostname',port=3306, passwd='mypass',db='racktables',user='racktables')
except MySQLdb.Error:
    e = sys.exc_info()[1]
    print("Error %d: %s" % (e.args[0],e.args[1]))
    sys.exit(1)

# Initialize rtapi with database connection
rt = rtapi.RTObject(db)

# List all objects from database
print rt.ListObjects()

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

racktables-api-0.3.1.tar.gz (10.5 kB view hashes)

Uploaded Source

Built Distribution

racktables_api-0.3.1-py3-none-any.whl (17.7 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