Skip to main content

Core module for Sonnerrise - config loader and database abstraction

Project description

sonnerrise-core

Core module for the Sonnerrise suite - Suno track management and promotion planning.

Features

  • YAML Configuration: Load configuration from YAML files with environment variable overrides
  • Database Abstraction: Plugin-based database interface supporting MySQL and SQLite
  • Base Models: SQLAlchemy base models with common fields and timestamps

Installation

pip install sonnerrise-core

Usage

Configuration

from sonnerrise_core import load_config

# Load from default locations or environment
config = load_config()

# Load from specific file
config = load_config("path/to/config.yaml")

Environment Variables

  • SONNERRISE_DB_PLUGIN: Database plugin (mysql, sqlite)
  • SONNERRISE_DB_HOST: Database host
  • SONNERRISE_DB_PORT: Database port
  • SONNERRISE_DB_USER: Database user
  • SONNERRISE_DB_PASSWORD: Database password
  • SONNERRISE_DB_NAME: Database name
  • SONNERRISE_WEB_HOST: Web server host
  • SONNERRISE_WEB_PORT: Web server port
  • SONNERRISE_WEB_DEBUG: Enable debug mode
  • SONNERRISE_WEB_SECRET_KEY: Flask secret key

Database

from sonnerrise_core import load_config, get_database

config = load_config()
db = get_database(config)

# Test connection
if db.test_connection():
    print("Connected!")

# Use sessions
with db.session() as session:
    # Perform database operations
    pass

CLI

# Create default configuration
sonnerrise-core init-config

# Test database connection
sonnerrise-core test-db

# Initialize database tables
sonnerrise-core init-db

# Show current configuration
sonnerrise-core show-config

Configuration File Example

database:
  plugin: mysql
  host: localhost
  port: 3306
  user: sonnerrise
  password: secret
  database: sonnerrise
  charset: utf8mb4

web:
  host: 0.0.0.0
  port: 5000
  debug: false
  secret_key: change-me-in-production

Project details


Download files

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

Source Distribution

sonnerrise_core-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

sonnerrise_core-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file sonnerrise_core-0.1.0.tar.gz.

File metadata

  • Download URL: sonnerrise_core-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sonnerrise_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4216396590fd8a7ae047c76131d06d55ac351eafc64d30404a156ccf69415f9f
MD5 9302f2b1a8cc2330a0779f4d4b5eeed9
BLAKE2b-256 fbf4590863b64f7c15d3c0f1969694358d328aaea26027a52b79ffa6ca99a421

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonnerrise_core-0.1.0.tar.gz:

Publisher: publish.yml on stayen/sonnerrise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for sonnerrise_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e86139414adc9d0ebc695c9b78ed6da5a735ccfabd3cee8f31cb766e28be95b0
MD5 abb4351201d6a13ea5a98abede5131c3
BLAKE2b-256 5a9c29bc05652a8588d0680ea9a1fdeb3920679c152f984aa7ba12e8a323a056

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonnerrise_core-0.1.0-py3-none-any.whl:

Publisher: publish.yml on stayen/sonnerrise

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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