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 hostSONNERRISE_DB_PORT: Database portSONNERRISE_DB_USER: Database userSONNERRISE_DB_PASSWORD: Database passwordSONNERRISE_DB_NAME: Database nameSONNERRISE_WEB_HOST: Web server hostSONNERRISE_WEB_PORT: Web server portSONNERRISE_WEB_DEBUG: Enable debug modeSONNERRISE_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4216396590fd8a7ae047c76131d06d55ac351eafc64d30404a156ccf69415f9f
|
|
| MD5 |
9302f2b1a8cc2330a0779f4d4b5eeed9
|
|
| BLAKE2b-256 |
fbf4590863b64f7c15d3c0f1969694358d328aaea26027a52b79ffa6ca99a421
|
Provenance
The following attestation bundles were made for sonnerrise_core-0.1.0.tar.gz:
Publisher:
publish.yml on stayen/sonnerrise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonnerrise_core-0.1.0.tar.gz -
Subject digest:
4216396590fd8a7ae047c76131d06d55ac351eafc64d30404a156ccf69415f9f - Sigstore transparency entry: 774558202
- Sigstore integration time:
-
Permalink:
stayen/sonnerrise@a3baf22b606f056f2cb9a7233df28cb420f8c1bb -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/stayen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a3baf22b606f056f2cb9a7233df28cb420f8c1bb -
Trigger Event:
release
-
Statement type:
File details
Details for the file sonnerrise_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sonnerrise_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e86139414adc9d0ebc695c9b78ed6da5a735ccfabd3cee8f31cb766e28be95b0
|
|
| MD5 |
abb4351201d6a13ea5a98abede5131c3
|
|
| BLAKE2b-256 |
5a9c29bc05652a8588d0680ea9a1fdeb3920679c152f984aa7ba12e8a323a056
|
Provenance
The following attestation bundles were made for sonnerrise_core-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on stayen/sonnerrise
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sonnerrise_core-0.1.0-py3-none-any.whl -
Subject digest:
e86139414adc9d0ebc695c9b78ed6da5a735ccfabd3cee8f31cb766e28be95b0 - Sigstore transparency entry: 774558208
- Sigstore integration time:
-
Permalink:
stayen/sonnerrise@a3baf22b606f056f2cb9a7233df28cb420f8c1bb -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/stayen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a3baf22b606f056f2cb9a7233df28cb420f8c1bb -
Trigger Event:
release
-
Statement type: