API#

unihan_db.bootstrap.setup_logger(logger=None, level='INFO')[source]#

Setup logging for CLI use.

Parameters:
  • logger (logging.Logger) – instance of logger

  • level (str) – logging level, e.g. ‘INFO’

unihan_db.bootstrap.is_bootstrapped(metadata)[source]#

Return True if cihai is correctly bootstrapped.

unihan_db.bootstrap.bootstrap_data(options=None)[source]#
unihan_db.bootstrap.bootstrap_unihan(session, options=None)[source]#
unihan_db.bootstrap.to_dict(obj, found=None)[source]#

Return dictionary of an SQLAlchemy Query result.

Supports recursive relationships.

Parameters:
Returns:

dictionary representation of a SQLAlchemy query

Return type:

dict

unihan_db.bootstrap.add_to_dict(b)[source]#

Add to_dict() method to SQLAlchemy Base object.

Parameters:

b (declarative_base()) – SQLAlchemy Base class

unihan_db.bootstrap.get_session(engine_url='sqlite:///{user_data_dir}/unihan_db.db')[source]#

Return new SQLAlchemy session object from engine string.

engine_url accepts a string template variable for {user_data_dir}, which is replaced to the XDG data directory for the user running the script process. This variable is only useful for SQLite, where file paths are used for the engine_url.

Parameters:

engine_url (str) – SQLAlchemy engine string

unihan_db table design#

Tables are split into general categories, similar to how UNIHAN db’s files are:

  • Unhn_DictionaryIndices

  • Unhn_DictionaryLikeData

  • Unhn_IRGSources

  • Unhn_NumericValues

  • Unhn_OtherMappings

  • Unhn_RadicalStrokeCounts

  • Unhn_Readings

  • Unhn_Variants

Tables are prefixed Unhn_, with no vowels.

Those root tables include the base data for all 90 UNIHAN fields. Specialized values branched off into field-specialized tables through `polymorphic joins`_.

class unihan_db.tables.Unhn(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

char#
ucn#
kDefinition#
kCantonese#
kMandarin#
kTotalStrokes#
kIRGHanyuDaZidian#
kIRGDaeJaweon#
kIRGKangXi#
kHanyuPinyin#
kXHC1983#
kCheungBauer#
kRSAdobe_Japan1_6#
kCihaiT#
kIICore#
kHanYu#
kDaeJaweon#
kFenn#
kHanyuPinlu#
kHDZRadBreak#
kSBGY#
kRSUnicode#
kRSJapanese#
kRSKangXi#
kRSKanWa#
kRSKorean#
kIRG_GSource#
kIRG_HSource#
kIRG_JSource#
kIRG_KPSource#
kIRG_KSource#
kIRG_MSource#
kIRG_TSource#
kIRG_USource#
kIRG_VSource#
kGSR#
kFennIndex#
kCheungBauerIndex#
kCCCII#
_sa_class_manager = {'char': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kCCCII': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kCantonese': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kCheungBauer': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kCheungBauerIndex': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kCihaiT': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kDaeJaweon': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kDefinition': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kFenn': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kFennIndex': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kGSR': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kHDZRadBreak': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kHanYu': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kHanyuPinlu': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kHanyuPinyin': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIICore': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRGDaeJaweon': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRGHanyuDaZidian': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRGKangXi': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_GSource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_HSource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_JSource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_KPSource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_KSource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_MSource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_TSource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_USource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kIRG_VSource': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kMandarin': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kRSAdobe_Japan1_6': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kRSJapanese': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kRSKanWa': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kRSKangXi': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kRSKorean': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kRSUnicode': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kSBGY': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kTotalStrokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'kXHC1983': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'ucn': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kCCCII(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
hex#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'hex': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.GenericIRG(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
source#
location#
type#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kIRG_GSource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kIRG_HSource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kIRG_JSource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kIRG_KPSource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kIRG_KSource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kIRG_MSource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kIRG_TSource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kIRG_USource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kIRG_VSource(**kwargs)[source]#

Bases: GenericIRG

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'location': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
location#
source#
type#
class unihan_db.tables.kDefinition(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
definition#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'definition': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kCantonese(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
definition#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'definition': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kMandarin(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
hans#
hant#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'hans': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'hant': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kTotalStrokes(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
hans#
hant#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'hans': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'hant': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.GenericReading(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
type#
locations#
readings#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'readings': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.GenericRadicalStrokes(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
radical#
strokes#
simplified#
type#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'simplified': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kRSUnicode(**kwargs)[source]#

Bases: GenericRadicalStrokes

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'simplified': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
radical#
simplified#
strokes#
type#
class unihan_db.tables.kRSJapanese(**kwargs)[source]#

Bases: GenericRadicalStrokes

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'simplified': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
radical#
simplified#
strokes#
type#
class unihan_db.tables.kRSKangXi(**kwargs)[source]#

Bases: GenericRadicalStrokes

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'simplified': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
radical#
simplified#
strokes#
type#
class unihan_db.tables.kRSKanWa(**kwargs)[source]#

Bases: GenericRadicalStrokes

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'simplified': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
radical#
simplified#
strokes#
type#
class unihan_db.tables.kRSKorean(**kwargs)[source]#

Bases: GenericRadicalStrokes

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'simplified': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
radical#
simplified#
strokes#
type#
class unihan_db.tables.kRSAdobe_Japan1_6(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
type#
cid#
radical#
strokes#
strokes_residue#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'cid': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes_residue': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kHanyuPinyin(**kwargs)[source]#

Bases: GenericReading

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'readings': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
readings#
type#
class unihan_db.tables.kXHC1983(**kwargs)[source]#

Bases: GenericReading

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
locations#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'readings': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
readings#
type#
class unihan_db.tables.kCheungBauer(**kwargs)[source]#

Bases: GenericReading

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
radical#
strokes#
cangjie#
_sa_class_manager = {'cangjie': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'readings': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'strokes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
readings#
type#
class unihan_db.tables.GenericIndice(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
type#
locations#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kHanYu(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#
class unihan_db.tables.kIRGHanyuDaZidian(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#
class unihan_db.tables.UnhnLocation(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
generic_reading_id#
generic_indice_id#
volume#
page#
character#
virtual#
_sa_class_manager = {'character': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'generic_indice_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'generic_reading_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'page': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'virtual': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'volume': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kCihaiT(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
page#
row#
character#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'character': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'page': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'row': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kIICoreSource(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
source_id#
source#
_sa_class_manager = {'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'source_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kIICore(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
priority#
sources#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'priority': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'sources': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.UnhnLocationkXHC1983(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
generic_reading_id#
generic_indice_id#
page#
character#
entry#
substituted#
_sa_class_manager = {'character': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'entry': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'generic_indice_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'generic_reading_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'page': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'substituted': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.UnhnReading(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
generic_reading_id#
reading#
_sa_class_manager = {'generic_reading_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'reading': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kDaeJaweon(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#
class unihan_db.tables.kIRGKangXi(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#
class unihan_db.tables.kIRGDaeJaweon(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#
class unihan_db.tables.kFenn(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
phonetic#
frequency#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'frequency': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'phonetic': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kHanyuPinlu(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
phonetic#
frequency#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'frequency': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'phonetic': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kGSR(**kwargs)[source]#

Bases: Base

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
char_id#
set#
letter#
apostrophe#
_sa_class_manager = {'apostrophe': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'letter': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'set': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
class unihan_db.tables.kHDZRadBreak(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
radical#
ucn#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'radical': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'ucn': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#
class unihan_db.tables.kSBGY(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#
class unihan_db.tables.kCheungBauerIndex(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#
class unihan_db.tables.kFennIndex(**kwargs)[source]#

Bases: GenericIndice

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id#
_sa_class_manager = {'char_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'locations': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
char_id#
locations#
type#