Skip to main content

Database Types for Teradata

Project description


PyPi MIT License Python3.7+

tdtypes is a Python library provides an abstraction layer for Teradata Database objects and utilities. By default It uses teradatasql, but generally, it should be possible to use any DB API compliant library.


  • This started as a personal project, but it is being made available as an open-source library in the hope that someone else might find it useful. This library does not come with any kind of warranty.
  • Python2 series is no longer supported.
  • Although no longer the default, but older teradata and pyodbc modules can still be used.
  • This library is not endorsed by Teradata Inc.


Use Python's pip utility to install tdtypes.

$ python -m pip install -U tdtypes


It is possible to customize how tdtypes library obtains a raw database connection. This might be helpful, for example, to use DB API modules other than teradatasql, or get authentication information in ways other than the default implementation. This can be done by creating module and place it in your PYTHONPATH. Please consult module for guidance on creating your own custom module.

The default implementation allows applications to either pass connection information as a parameter or get connection information from TDCONN environment variable at run-time. Either way, connection information consists of a valid JSON string as expected by teradatasql module.

Another customization allows how tdtypes library searches for and obtains Table and View XML definitions. The default implementation uses DBC.TablesV for searching, and SHOW ... IN XML SQL statement to get XML definition. Placing in PYTHONPATH will override the default search and instantiation behaviors. To create a custom module, please consult


Report bugs using issue tracker. I'll try to provide a fix as soon as I can. If you have already developed a fix, send me a pull request.


Feel free to fork this repository and enhance it in any way you see fit. If you think your changes will benefit more people, send me a pull request.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

tdtypes-0.5.1-py3-none-any.whl (30.9 kB view hashes)

Uploaded py3

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