db Package

db Package

common Module

legacy Module

class hanyuu.db.legacy.Radvar(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy radvars table.

DoesNotExist

alias of RadvarDoesNotExist

id = <peewee.PrimaryKeyField object at 0x28e3c90>
name = <peewee.CharField object at 0x2a0a810>
value = <peewee.TextField object at 0x2a0a910>
class hanyuu.db.legacy.Status(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy streamstatus table.

DoesNotExist

alias of StatusDoesNotExist

bitrate = <peewee.IntegerField object at 0x2a0ac50>
dj = <peewee.ForeignKeyField object at 0x2a0acd0>
end_time = <peewee.IntegerField object at 0x2a0a610>
id = <peewee.PrimaryKeyField object at 0x2a0abd0>
is_afk_stream = <peewee.IntegerField object at 0x2a0a5d0>
is_streamdesk = <peewee.IntegerField object at 0x2a0ab90>
last_set = <peewee.DateTimeField object at 0x2a0a650>
listeners = <peewee.IntegerField object at 0x2a0a590>
now_playing = <peewee.CharField object at 0x2a0a550>
start_time = <peewee.IntegerField object at 0x2a0ac10>
track = <peewee.ForeignKeyField object at 0x2a0a490>

models Module

class hanyuu.db.models.Base(*args, **kwargs)[source]

Bases: peewee.Model

Simple base class to inherit from so all the other models inherit the database connection used.

DoesNotExist

alias of BaseDoesNotExist

id = <peewee.PrimaryKeyField object at 0x1a60090>
class hanyuu.db.models.DJ(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy djs table.

DoesNotExist

alias of DJDoesNotExist

css = <peewee.CharField object at 0x1a5de10>
description = <peewee.TextField object at 0x1a60310>
id = <peewee.PrimaryKeyField object at 0x1a60210>
image = <peewee.TextField object at 0x1a60390>
name = <peewee.CharField object at 0x1a60290>
priority = <peewee.IntegerField object at 0x1a5ddd0>
queue
status
user
visible = <peewee.IntegerField object at 0x1a5dd90>
class hanyuu.db.models.Fave(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy efave table.

DoesNotExist

alias of FaveDoesNotExist

id = <peewee.PrimaryKeyField object at 0x1a57e10>
nickname = <peewee.ForeignKeyField object at 0x1a53cd0>
song = <peewee.ForeignKeyField object at 0x1a53c10>
class hanyuu.db.models.LastFm(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy lastfm table.

DoesNotExist

alias of LastFmDoesNotExist

id = <peewee.PrimaryKeyField object at 0x1a5a550>
nick = <peewee.CharField object at 0x1a5ac10>
username = <peewee.CharField object at 0x1a5abd0>
class hanyuu.db.models.NickRequest(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy nickrequesttime table.

DoesNotExist

alias of NickRequestDoesNotExist

host = <peewee.TextField object at 0x1a5a790>
id = <peewee.PrimaryKeyField object at 0x1a5acd0>
time = <peewee.DateTimeField object at 0x1a5a690>
class hanyuu.db.models.Nickname(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy enick table.

DoesNotExist

alias of NicknameDoesNotExist

authcode = <peewee.CharField object at 0x1a5a650>
dtb = <peewee.DateTimeField object at 0x1a5a6d0>
faves
first_seen = <peewee.DateTimeField object at 0x1a5a5d0>
id = <peewee.PrimaryKeyField object at 0x1a5ab10>
nickname = <peewee.CharField object at 0x1a5a850>
class hanyuu.db.models.Play(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy eplay table.

DoesNotExist

alias of PlayDoesNotExist

id = <peewee.PrimaryKeyField object at 0x1a579d0>
song = <peewee.ForeignKeyField object at 0x1a57cd0>
time = <peewee.DateTimeField object at 0x1a57d10>
class hanyuu.db.models.Queue(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the new design queue table.

DoesNotExist

alias of QueueDoesNotExist

dj = <peewee.ForeignKeyField object at 0x1a50350>
id = <peewee.PrimaryKeyField object at 0x1a51190>
ip = <peewee.TextField object at 0x1a50310>
song = <peewee.ForeignKeyField object at 0x1a50290>
time = <peewee.DateTimeField object at 0x1a50250>
track = <peewee.ForeignKeyField object at 0x1a502d0>
type = <peewee.IntegerField object at 0x1a50210>
class hanyuu.db.models.Relay(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy relays table.

DoesNotExist

alias of RelayDoesNotExist

active = <peewee.IntegerField object at 0x1a4f6d0>
base_name = <peewee.CharField object at 0x1a50150>
bitrate = <peewee.IntegerField object at 0x1a50090>
country = <peewee.CharField object at 0x1a4f790>
disabled = <peewee.IntegerField object at 0x1a4f810>
format = <peewee.CharField object at 0x1a50050>
id = <peewee.PrimaryKeyField object at 0x1a50390>
listener_limit = <peewee.IntegerField object at 0x1a4f910>
listeners = <peewee.IntegerField object at 0x1a4ff90>
mountpoint = <peewee.CharField object at 0x1a50110>
owner = <peewee.CharField object at 0x1a50710>
passcode = <peewee.CharField object at 0x1a4f7d0>
port = <peewee.IntegerField object at 0x1a500d0>
priority = <peewee.IntegerField object at 0x1a505d0>
subdomain = <peewee.CharField object at 0x1a50610>
class hanyuu.db.models.Song(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy esong table.

DoesNotExist

alias of SongDoesNotExist

faves
classmethod from_meta(metadata)[source]

Returns the first match found of metadata

Params unicode metadata:
 A string of metadata.
Returns:Song instance.
Raises :Song.DoesNotExist if no result was found.

Note

This currently does no pre-fetching of the faves and plays

hash = <peewee.CharField object at 0x1a57910>
id = <peewee.PrimaryKeyField object at 0x1a57750>
length = <peewee.IntegerField object at 0x1a57890>
meta = <peewee.TextField object at 0x1a578d0>
plays
classmethod query_from_meta(metadata)[source]

Returns the first match found of metadata

Params unicode metadata:
 A string of metadata.
Returns:peewee.SelectQuery instance.

Note

This currently does no pre-fetching of the faves and plays

queued
class hanyuu.db.models.Track(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy tracks table.

DoesNotExist

alias of TrackDoesNotExist

acceptor = <peewee.CharField object at 0x1a51dd0>
album = <peewee.CharField object at 0x1a53910>
artist = <peewee.CharField object at 0x1a53f10>
filename = <peewee.TextField object at 0x1a53150>
classmethod from_meta(metadata)[source]

Returns the first match found of metadata

Params unicode metadata:
 A string of metadata.
Returns:Track instance.
hash = <peewee.CharField object at 0x1a51d10>
id = <peewee.PrimaryKeyField object at 0x1a53d50>
last_editor = <peewee.CharField object at 0x1a51e50>
last_played = <peewee.DateTimeField object at 0x1a51d50>
last_requested = <peewee.DateTimeField object at 0x1a51e10>
needs_reupload = <peewee.IntegerField object at 0x1a51cd0>
priority = <peewee.IntegerField object at 0x1a51e90>
queued
request_count = <peewee.IntegerField object at 0x1a51ed0>
search_tags = <peewee.TextField object at 0x1a53090>
status
title = <peewee.CharField object at 0x1a53e90>
usable = <peewee.IntegerField object at 0x1a51d90>
class hanyuu.db.models.User(*args, **kwargs)[source]

Bases: hanyuu.db.models.Base

Models the legacy users table.

DoesNotExist

alias of UserDoesNotExist

dj = <peewee.ForeignKeyField object at 0x1a5dc50>
id = <peewee.PrimaryKeyField object at 0x1a5de90>
name = <peewee.CharField object at 0x1a5dbd0>
password = <peewee.CharField object at 0x1a5dcd0>
privileges = <peewee.IntegerField object at 0x1a5dd50>

Project Versions

Table Of Contents

Previous topic

abstractions Package

Next topic

ircbot Package

This Page