Skip to main content

A very Usefull API-Framework for All-Type Python Projects

Project description

🚀 ToolOS SDK

Lightweight Python Framework for fast, easy and efficient application development. Code Your Apps with StateMachine, Multi-Language Support, Caching, Logging, Sound, Sequence System, Drivers, App Management and more.

Latest Changelog v3.0.1

Bugfixes

- Fixed self.Memory Memory Management Bug
- Fixed self.Ursina Scene Import Bug

🔧 Installation

pip install toolos

🎯 Quick Start

Settings Setup

{
  "version": "1.0.0",
  "language": "en",
  "cachepath": "data/cache",
  "temppath": "data/temp",
  "logpath": "data/logs",
  "languagepath": "data/lang"
}

or as a dictionary in your code:

settings = {
  "version": "1.0.0",
  "name": "MyAppSDK",
  "settings_path": "path/to/settings.json",
  "standard_language_library": True
}
app = MyApp(settings=settings)
...

Basic App

import toolos as engine

class App(engine.Api):
    def __init__(self):
        super().__init__()
        
        # Sprache ändern
        self.Settings.Global("language", "de")
        self.Language.Reload()
        
        # States verwalten
        self.StateMachine.AddKeyState("game_running", True)
        
        # Sound abspielen
        self.Helper.Sound.PlaySound("assets/music.mp3", loop=True)
        
        # Fenster erstellen (PyQt6)
        window = self.Helper.PyQt.CreateWindow("main", "Meine App")
        btn = self.Helper.PyQt.CreateWidget("button", text="Klick mich!")
        
        # 3D Scene (Ursina)
        scene = self.Helper.Ursina.CreateScene("game")
        player = self.Helper.Ursina.CreateEntity("player", model="cube")

🎮 Coole Features

🌍 Mehrsprachigkeit

# Sprach-Dateien (de.json)
{
    "start": "Start",
    "settings": "Einstellungen",
    "quit": "Beenden"
}

# Im Code
print(self.Language.Translate("start"))  # → "Start"

💾 State Management

# States & Sequenzen
self.StateMachine.SetState("MAINMENU")
if self.StateMachine.IsState("MAINMENU"):
    self.Sequence.DoSequence("menu_animation")

🎵 Sound System

# Sound mit Sequenzen
sequence = {
    "sequence": "boss_fight",
    "meta": [
        {"instance": self.Helper.Sound, "method": "PlaySound", "args": ["boss.mp3"]},
        {"instance": player, "method": "animate_scale", "args": [2, 1.5]}
    ]
}
self.Sequence.AddSequence(sequence)

🎨 GUI Framework (PyQt6)

# Schnelles UI
window = self.Helper.PyQt.CreateWindow("shop")
layout = self.Helper.PyQt.CreateLayout("grid")
items = ["Schwert", "Schild", "Trank"]

for item in items:
    btn = self.Helper.PyQt.CreateWidget("button", text=item)
    layout.addWidget(btn)

🎲 Game Engine (Ursina)

# 3D Game Objects
player = self.Helper.Ursina.CreateEntity(
    "player",
    model="cube", 
    position=(0,1,0)
)

# Partikelsystem
particles = self.Helper.Ursina.CreateParticleSystem(
    position=(0,2,0),
    particle_count=100,
    particle_lifetime=2.0,
    particle_color_start=color.yellow,
    particle_color_end=color.clear
)
### 📦 Memory System
```python
# Daten speichern
self.Memory.KnowThis("player_stats", {
    "health": 100,
    "level": 1,
    "items": ["Schwert"]
})

# Daten abrufen
stats = self.Memory.Remember("player_stats")

🔄 Cache & Temp

# Temporäre Daten
self.Cache.WriteCacheFile("level1.cache", "checkpoint_data")
self.Temp.WriteTempFile("session.tmp", "temp_data")

🛠️ SDK Setup

sdk = {
    "version": "1.0.0",
    "name": "GameSDK",
    "settings_path": "config/settings.json",
    "standard_language_library": True
}

app = Game(sdk=sdk)

📚 Links

📜 Lizenz

MIT

Project details


Release history Release notifications | RSS feed

This version

3.0.2

Download files

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

Source Distribution

toolos-3.0.2.tar.gz (41.9 kB view details)

Uploaded Source

Built Distribution

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

toolos-3.0.2-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file toolos-3.0.2.tar.gz.

File metadata

  • Download URL: toolos-3.0.2.tar.gz
  • Upload date:
  • Size: 41.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for toolos-3.0.2.tar.gz
Algorithm Hash digest
SHA256 47866de5b830634aa04f59f3b3509891fe8a40d21a3823fafbb056d1c335df79
MD5 6f390ae5de0ef91d8f879692f7bbdbba
BLAKE2b-256 05520278c61e8af2001268d17dc914c28943d990433cec1ed89d11a3cbab7f8e

See more details on using hashes here.

File details

Details for the file toolos-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: toolos-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 45.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for toolos-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 295ada0e353fd85a9db7699002ab0c406fea7f5e547330043176607207353d21
MD5 72599454b27194dc288b8f93be7c18a1
BLAKE2b-256 f177fcf63d49ac20e7748b2a929357722390af37635d9710ecc8fce5d4ee9863

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