Skip to main content

Tracks module for Sonnerrise - Suno track management

Project description

sonnerrise-tracks

Tracks module for the Sonnerrise suite - manages Suno-generated tracks.

Features

  • Create and manage Suno-generated tracks
  • Link tracks to generation definitions
  • Track events with scheduling (publish dates, promotions, etc.)
  • Store cover art URLs and lyrics
  • Full CRUD operations via Python API or CLI

Installation

pip install sonnerrise-tracks

Usage

Python API

from sonnerrise_core import load_config, get_database
from sonnerrise_tracks import TrackRepository, TrackCreate, EventCreate
from datetime import datetime

config = load_config()
db = get_database(config)
db.create_tables()

repo = TrackRepository(db)

# Create a track
track = repo.create(TrackCreate(
    title="Epic Journey",
    album="Adventures Vol. 1",
    definition_id=1,
    cover_art_url="https://example.com/cover.jpg",
    lyrics="[Verse 1]\nInto the unknown...",
    events=[
        EventCreate(
            datetime=datetime(2024, 3, 15, 12, 0),
            description="Publish to Distrokid",
        ),
    ],
))

# List tracks
tracks = repo.list(page=1, per_page=20)

# Get upcoming events
events = repo.get_upcoming_events(days=7)

CLI

# List all tracks
sonnerrise-tracks list

# Create a new track
sonnerrise-tracks create --title "My Song" --album "My Album"

# Show track details
sonnerrise-tracks show 1

# Add an event
sonnerrise-tracks add-event 1 --datetime "2024-03-15 12:00" --description "Publish"

# List upcoming events
sonnerrise-tracks events --days 7

# Update a track
sonnerrise-tracks update 1 --title "New Title"

# Delete a track
sonnerrise-tracks delete 1

Track Fields

Field Type Description
title string (max 120 chars) Track title (required)
album string (max 120 chars) Album or playlist name (optional)
definition_id integer Reference to generation definition (optional)
cover_art_url string (URL) Cover art image URL (optional)
lyrics text (max 32KB) Track lyrics (optional)
comments text (max 32KB) Additional notes (optional)
links list Associated URLs with descriptions
events list Scheduled events with dates and descriptions

Event Fields

Field Type Description
datetime datetime Event date and time (required)
description string (max 200 chars) Event description (required)
enabled boolean Whether event is active (default: true)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sonnerrise_tracks-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file sonnerrise_tracks-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sonnerrise_tracks-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97cb8b319b111a525104f960b763e2e88c571b99f70e0e6c73715fea47315fea
MD5 5594bc29c10687eb799d5a1a18fd047d
BLAKE2b-256 948e7377498dee98b197265a0a646bcd44499045f86bb2753c601d79a09840ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page