Skip to main content

soloman Downloads

For the love of Artificial Intelligence, Python and QML

refer to milestone

Installation

pip install soloman

Python Usage

Play audio

from soloman import Audio


aud = Audio()
aud.play('/path/to/music.mp3')

Qml Usage

example.py

import soloman
...
engine = QQmlApplicationEngine()
...
engine.load('example.qml')

Play audio

example.qml

Qt6

import QtQuick
...
import soloman

SAudio {
    id: aud
}

Button {
    text: "Play"
    onClicked: aud.play('path/to/music.mp3')
}

Qt5

import QtQuick 2.15
...
import soloman 3.0

SAudio {
    id: aud
}

Button {
    text: "Play"
    onClicked: aud.play('path/to/music.mp3')
}

Play videos

example.qml

Play a video file

Qt6

import QtQuick
...
import soloman

SVideo {
    id: vid
}

Button {
    text: "Play video"
    onClicked: vid.play('path/to/video.mp4')
}

Qt5

import QtQuick 2.15
...
import soloman 3.0

SVideo {
    id: vid
}

Button {
    text: "Play video"
    onClicked: vid.play('path/to/video.mp4')
}

Play stills

Option one
...
    onClicked: vid.play('path/to/video_stills_01.jpg') # possibly the first image
...
Option two
...
    onClicked: vid.play('path/to/') # make sure folder contains only stills
...

Show cv2 frame

example.py

import sys
import cv2
import threading
from time import sleep

from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQml QQmlApplicationEngine
import soloman

app = QGuiApplication(sys.argv)

# Create a QML engine.
engine = QQmlApplicationEngine()
engine.quit.connect(app.quit)
engine.load(QUrl('example.qml'))

# Get SVideo
vid = soloman.Video(engine)
vid.get_SVideo('screen_01')  # objectName goes here

# Capture
capture = cv2.VideoCapture(0)  # capture camera

def start_capt():
    # start thread
    o_thread = threading.Thread(target=_start_capt)
    o_thread.daemon = True
    o_thread.start()

def _start_capt():

    while True:

        ret, frame = capture.read()

        if not ret:
            break

        vid.show_frame(frame)
        sleep(1/24)

# Call to start capturing
start_capt()

# Run the app
ret_value = app.exec_()
capture.release()
sys.exit(0)

example.qml

Qt6

import QtQuick
import QtQuick.Controls.Basic
import solomon

ApplicationWindow {
	visible: true
	width: 800
	height: 500

    SVideo {
        objectName: "screen_01"  // declare objectName to be used in python
    }
    
}

Qt5

import QtQuick 2.15
import QtQuick.Controls 2.15
import solomon 3.0

ApplicationWindow {
	visible: true
	width: 800
	height: 500

    SVideo {
        objectName: "screen_01"  // declare objectName to be used in python
    }
    
}

Wiki

The wiki can be located here

Metadata

Release files for soloman 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for soloman 3.1.1
File Size Uploaded Provenance Actions
soloman-3.1.1.tar.gz 15.0 kB Without provenance Details for soloman-3.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for soloman 3.1.1
File Interpreter ABI Platform Actions
soloman-3.1.1-py3-none-any.whl Python 3 none any Details for soloman-3.1.1-py3-none-any.whl

Total release size: 30.9 kB

Release files / soloman-3.1.1.tar.gz

Download URL soloman-3.1.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d9ace5b4c7d6a01916ab8e798c5a4a215f82a5d178b40245191054bb8c23e590
BLAKE2b-256 checksum
How to use checksums
13b33cd404f88cf7a1a8d7faf33b1b9415e340ba072ffc618d1fc9f4553ce41f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Release files / soloman-3.1.1-py3-none-any.whl

Download URL soloman-3.1.1-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3373a9fce70b8dd45168f701e980c1af9974f14223d0d6412012de57c272650f
BLAKE2b-256 checksum
How to use checksums
135907500fa099dda365360dc1f9e48745980c9767c808c138da534e73c0de09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

Security for soloman 3.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page