cathpy.version

from cathpy.version import CathVersion

cv = CathVersion("v4.2") # or "v4_2_0", "current"

cv.dirname
# "4_2_0"

cv.pg_dbname
# "cathdb_v4_2_0"

cv.is_current
# False

cathpy.version - manipulating database / release versions

class cathpy.version.CathVersion(*args, **kwargs)

Object that represents a CATH version.

dirname

Return the version represented as a directory name (eg ‘v4_2_0’).

is_current

Returns whether the version corresponds to ‘current’ (eg HEAD)

join(join_char='.')

Returns the version string (with an optional join_char).

classmethod new_from_string(version_str)

Create a new CathVersion object from a string.

pg_dbname

Return the version represented as a postgresql database (eg ‘cathdb_v4_2_0’).

to_string()

Returns the CATH version in string form.