db Package

db Package

common Module

legacy Module

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 0x30647d0>
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 0x3061a10>
description = <peewee.TextField object at 0x3061950>
id = <peewee.PrimaryKeyField object at 0x3064810>
image = <peewee.TextField object at 0x3061990>
name = <peewee.CharField object at 0x3061910>
priority = <peewee.IntegerField object at 0x30619d0>
queue
user
visible = <peewee.IntegerField object at 0x3061890>
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 0x2fe9b10>
nickname = <peewee.ForeignKeyField object at 0x2fe9650>
song = <peewee.ForeignKeyField object at 0x2fe9550>
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 0x305f910>
nick = <peewee.CharField object at 0x305f610>
username = <peewee.CharField object at 0x305f5d0>
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 0x305f2d0>
id = <peewee.PrimaryKeyField object at 0x305f050>
time = <peewee.DateTimeField object at 0x305f310>
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 0x305d150>
dtb = <peewee.DateTimeField object at 0x305d050>
faves
first_seen = <peewee.DateTimeField object at 0x305d110>
id = <peewee.PrimaryKeyField object at 0x305f950>
nickname = <peewee.CharField object at 0x305d0d0>
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 0x3059f50>
song = <peewee.ForeignKeyField object at 0x2fe9b50>
time = <peewee.DateTimeField object at 0x2fe9b90>
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 0x2fe6cd0>
id = <peewee.PrimaryKeyField object at 0x2fe64d0>
ip = <peewee.TextField object at 0x2fe6c90>
song = <peewee.ForeignKeyField object at 0x2fe6b90>
time = <peewee.DateTimeField object at 0x2fe6650>
track = <peewee.ForeignKeyField object at 0x2fe6bd0>
type = <peewee.IntegerField object at 0x2fe6690>
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 0x2fe0d10>
base_name = <peewee.CharField object at 0x2fe2ed0>
bitrate = <peewee.IntegerField object at 0x2fe27d0>
country = <peewee.CharField object at 0x2fe0d50>
disabled = <peewee.IntegerField object at 0x2fe0d90>
format = <peewee.CharField object at 0x2fe0c10>
id = <peewee.PrimaryKeyField object at 0x2fe6b50>
listener_limit = <peewee.IntegerField object at 0x2fe0c90>
listeners = <peewee.IntegerField object at 0x2fe0c50>
mountpoint = <peewee.CharField object at 0x2fe2d50>
owner = <peewee.CharField object at 0x2fe2f10>
passcode = <peewee.CharField object at 0x2fe0bd0>
port = <peewee.IntegerField object at 0x2fe2dd0>
priority = <peewee.IntegerField object at 0x2fe0cd0>
subdomain = <peewee.CharField object at 0x2fe2890>
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 0x3059e10>
id = <peewee.PrimaryKeyField object at 0x3059d90>
length = <peewee.IntegerField object at 0x3059e50>
meta = <peewee.TextField object at 0x3059e90>
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 0x2fe9710>
album = <peewee.CharField object at 0x2fe9990>
artist = <peewee.CharField object at 0x2fe9a90>
filename = <peewee.TextField object at 0x2fe9890>
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 0x2fe9590>
id = <peewee.PrimaryKeyField object at 0x2fe9350>
last_editor = <peewee.CharField object at 0x2fe9490>
last_played = <peewee.DateTimeField object at 0x2fe96d0>
last_requested = <peewee.DateTimeField object at 0x2fe97d0>
needs_reupload = <peewee.IntegerField object at 0x2fe9290>
priority = <peewee.IntegerField object at 0x2fe9510>
queued
request_count = <peewee.IntegerField object at 0x2fe94d0>
search_tags = <peewee.TextField object at 0x2fe9910>
title = <peewee.CharField object at 0x2fe99d0>
usable = <peewee.IntegerField object at 0x2fe9690>
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 0x305f410>
id = <peewee.PrimaryKeyField object at 0x3061610>
name = <peewee.CharField object at 0x305f390>
password = <peewee.CharField object at 0x305f3d0>
privileges = <peewee.IntegerField object at 0x305f450>

Project Versions

Table Of Contents

Previous topic

abstractions Package

Next topic

irc Package

This Page