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 0x17d37d0>
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 0x17d0a10>
description = <peewee.TextField object at 0x17d0950>
id = <peewee.PrimaryKeyField object at 0x17d3810>
image = <peewee.TextField object at 0x17d0990>
name = <peewee.CharField object at 0x17d0910>
priority = <peewee.IntegerField object at 0x17d09d0>
queue
user
visible = <peewee.IntegerField object at 0x17d0890>
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 0x17c5b10>
nickname = <peewee.ForeignKeyField object at 0x17c5650>
song = <peewee.ForeignKeyField object at 0x17c5550>
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 0x17ce910>
nick = <peewee.CharField object at 0x17ce610>
username = <peewee.CharField object at 0x17ce5d0>
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 0x17ce2d0>
id = <peewee.PrimaryKeyField object at 0x17ce050>
time = <peewee.DateTimeField object at 0x17ce310>
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 0x17cc150>
dtb = <peewee.DateTimeField object at 0x17cc050>
faves
first_seen = <peewee.DateTimeField object at 0x17cc110>
id = <peewee.PrimaryKeyField object at 0x17ce950>
nickname = <peewee.CharField object at 0x17cc0d0>
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 0x17c8f50>
song = <peewee.ForeignKeyField object at 0x17c5b50>
time = <peewee.DateTimeField object at 0x17c5b90>
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 0x1759cd0>
id = <peewee.PrimaryKeyField object at 0x17594d0>
ip = <peewee.TextField object at 0x1759c90>
song = <peewee.ForeignKeyField object at 0x1759b90>
time = <peewee.DateTimeField object at 0x1759650>
track = <peewee.ForeignKeyField object at 0x1759bd0>
type = <peewee.IntegerField object at 0x1759690>
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 0x1753d10>
base_name = <peewee.CharField object at 0x1755ed0>
bitrate = <peewee.IntegerField object at 0x17557d0>
country = <peewee.CharField object at 0x1753d50>
disabled = <peewee.IntegerField object at 0x1753d90>
format = <peewee.CharField object at 0x1753c10>
id = <peewee.PrimaryKeyField object at 0x1759b50>
listener_limit = <peewee.IntegerField object at 0x1753c90>
listeners = <peewee.IntegerField object at 0x1753c50>
mountpoint = <peewee.CharField object at 0x1755d50>
owner = <peewee.CharField object at 0x1755f10>
passcode = <peewee.CharField object at 0x1753bd0>
port = <peewee.IntegerField object at 0x1755dd0>
priority = <peewee.IntegerField object at 0x1753cd0>
subdomain = <peewee.CharField object at 0x1755890>
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 0x17c8e10>
id = <peewee.PrimaryKeyField object at 0x17c8d90>
length = <peewee.IntegerField object at 0x17c8e50>
meta = <peewee.TextField object at 0x17c8e90>
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 0x17c5710>
album = <peewee.CharField object at 0x17c5990>
artist = <peewee.CharField object at 0x17c5a90>
filename = <peewee.TextField object at 0x17c5890>
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 0x17c5590>
id = <peewee.PrimaryKeyField object at 0x17c5350>
last_editor = <peewee.CharField object at 0x17c5490>
last_played = <peewee.DateTimeField object at 0x17c56d0>
last_requested = <peewee.DateTimeField object at 0x17c57d0>
needs_reupload = <peewee.IntegerField object at 0x17c5290>
priority = <peewee.IntegerField object at 0x17c5510>
queued
request_count = <peewee.IntegerField object at 0x17c54d0>
search_tags = <peewee.TextField object at 0x17c5910>
title = <peewee.CharField object at 0x17c59d0>
usable = <peewee.IntegerField object at 0x17c5690>
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 0x17ce410>
id = <peewee.PrimaryKeyField object at 0x17d0610>
name = <peewee.CharField object at 0x17ce390>
password = <peewee.CharField object at 0x17ce3d0>
privileges = <peewee.IntegerField object at 0x17ce450>

Project Versions

Table Of Contents

Previous topic

abstractions Package

Next topic

ircbot Package

This Page