Skip to main content

No project description provided

Project description

📂 LDT Nexus

LDT Nexus — это сверхбыстрое ядро на Rust для управления настройками и локализацией в Python-приложениях. Вдохновлено QSettings, но усилено асинхронностью, сигналами и высокой производительностью[cite: 4].

✨ Почему Nexus?

  • Rust Core: Обработка данных и нормализация путей на стороне Rust.
  • Многопоточность: Параллельная загрузка файлов конфигурации и переводов.
  • Реактивность: Полная поддержка сигналов через psygnal для мгновенного обновления UI.
  • Гибкость драйверов: Поддержка JSON, JSON5, TOML, YAML и Memory-режима из коробки.

⚙️ LdtSettings: Управление конфигурацией

LdtSettings — это основное хранилище, которое заменяет стандартные парсеры конфигов.

Базовое использование

from ldt.nexus import LdtSettings

# Автоматический sync() на диск при выходе из контекста
with LdtSettings("config.toml", driver="toml") as cfg:
    cfg.setValue("ui.theme", "dark")
    cfg.setValue("window.size", [1920, 1080])

# Доступ через группы (аналог QSettings)
with cfg.localGroups("editor", "font"):
    cfg.setValue("family", "Fira Code") # Итоговый ключ: editor/font/family

Реактивность и Сигналы

Вы можете подписаться на изменения в конфиге, чтобы ваш код реагировал на них автоматически.

cfg = LdtSettings("settings.json")

# Сигнал срабатывает при каждом изменении ключа
cfg.signals.valueChanged.connect(lambda key, val: print(f"Update: {key} = {val}"))

# Массовое обновление без лишних сигналов
with cfg.blockSignals():
    cfg.update(theme="light", language="ru")

🌍 LdtTranslator: Реактивная локализация

Новый модуль для работы с переводами, построенный на базе LdtSettings в памяти.

Параллельная загрузка и кэширование

Переводчик умеет загружать десятки файлов локализации параллельно, используя все ядра процессора.

from ldt.nexus.engine import LdtTranslator

translator = LdtTranslator("locales/")
translator.load(parallel=True) # Быстрая загрузка через ThreadPoolExecutor

# Использование сигналов смены языка
translator.signals.language_changed.connect(lambda lang: print(f"Язык изменен на {lang}"))

translator.set_lang("ru")
print(translator.tr("app.title")) # Поддержка контекста и переменных

Поддержка Плюралов (Множественные числа)

# 'apples': {'1': '{n} яблоко', '2': '{n} яблока', '5': '{n} яблок'}
print(translator.plural("apples", 21)) # 21 яблоко

🛠 Возможности ядра

Особенность Описание
Normalizer Автоматическая замена . на / в путях на уровне Rust.
Drivers JSON, JSON5, TOML, YAML, Memory.
Serializers Регистрация кастомных типов через @LdtSettings.register_type.
Caching Встроенный TTLCache в переводчике для мгновенного доступа к UI-строкам.

🚀 Установка

# Базовая версия
pip install ldt-nexus

# С поддержкой сигналов
pip install ldt-nexus[signals]

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

ldt_nexus-1.2.0b2.post1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distributions

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

ldt_nexus-1.2.0b2.post1-cp314-cp314-win_amd64.whl (488.5 kB view details)

Uploaded CPython 3.14Windows x86-64

ldt_nexus-1.2.0b2.post1-cp314-cp314-macosx_11_0_arm64.whl (605.2 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

ldt_nexus-1.2.0b2.post1-cp313-cp313-win_amd64.whl (488.2 kB view details)

Uploaded CPython 3.13Windows x86-64

ldt_nexus-1.2.0b2.post1-cp313-cp313-macosx_11_0_arm64.whl (604.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

ldt_nexus-1.2.0b2.post1-cp312-cp312-win_amd64.whl (488.0 kB view details)

Uploaded CPython 3.12Windows x86-64

ldt_nexus-1.2.0b2.post1-cp312-cp312-manylinux_2_34_x86_64.whl (690.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

ldt_nexus-1.2.0b2.post1-cp312-cp312-macosx_11_0_arm64.whl (604.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ldt_nexus-1.2.0b2.post1-cp311-cp311-win_amd64.whl (490.1 kB view details)

Uploaded CPython 3.11Windows x86-64

ldt_nexus-1.2.0b2.post1-cp311-cp311-macosx_11_0_arm64.whl (607.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file ldt_nexus-1.2.0b2.post1.tar.gz.

File metadata

  • Download URL: ldt_nexus-1.2.0b2.post1.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ldt_nexus-1.2.0b2.post1.tar.gz
Algorithm Hash digest
SHA256 9d58df2cbd2432deba945b6007df048948d55930461b998da85cda8a5af07068
MD5 b03f92b77485e43498eb35553a136580
BLAKE2b-256 45a0538ab33a0e4a4ca46e2293f289297723c916483bb5c149d2ab927655cfe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1.tar.gz:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ce580873d3b676514333381a9d00f3ad7438a29968fec059b96a22cc2cf34c62
MD5 649b22de3e07d058cf9511dade36dbf3
BLAKE2b-256 53a814d0704a9f0964cd6f9d845bf1459ed53eca325771c2d2d8b204335f825e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 71ab2218d7c3adca77de506962bcc8f198620a4df7c9f55b72f67bca284cfc3e
MD5 bfd0d01b7ebcb772f9ecd82a01cb8b8a
BLAKE2b-256 7532f0c651d265aa4c3ac68d1e4d8fb016041df76a9b89f7d6ac6a14158bab0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b32f9dcce48075d2e886018eea893caf26524b7a7e357373088149bf5fafa11a
MD5 0e920c9c96cfe0091f79d6c812b505e9
BLAKE2b-256 e1415ae1b831a27e3b127509273772220be5c0801c8435a15cb131079cb63485

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 66a42869bb76d95f2de2f91fcfb6b9d683a3227a932dfc9ff365ed5a014f4f16
MD5 7648998b943c72ae90f96a276bb526d6
BLAKE2b-256 15d3f0b1aec11f03c4e8f16ebbaff78d824ac80c60771a817477e6b0e712581c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7aa87ab90479a454b898a099e264d1e561c94a526dc34405a4a9d2457f596aec
MD5 478ba21387d3da779f90007410da8ce3
BLAKE2b-256 9c80397fd6f7dcd788f53f65cba515a7ff3eb8809bae966063ce24e597e79916

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8a4e66da80063714996221a65aa5e9278b6234dcc554f7a4b051588f31f7e486
MD5 9d277ba55de97f5c514cb1b2fbc9b30d
BLAKE2b-256 d8d24dd5e82b1db68d8f6f8538db16816cca865e660915a4f2b609810b42cbaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75b05c8083f5e4316e6918e0cc2aae8f0447eaa5c7c8d6104784463bb8e9b146
MD5 2668d55f06356b7fb3d8f8c35fb6faef
BLAKE2b-256 a95bfa81fdf6f25b261eeb619423740f0d3ae84d2cc3037f1d12196fa3071051

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 260bf0925306dc880bd64bc2d6fa377c09c391c6118e115a5807e697a7380b53
MD5 80b8a338fa145bc1e84a8170aab61092
BLAKE2b-256 2bd9ff994c358fc18da33ea4f952947b3644ffee3339d37837e58f413940cb26

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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

File details

Details for the file ldt_nexus-1.2.0b2.post1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ldt_nexus-1.2.0b2.post1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c641e55cff915a900369d5f9081c9f5cfbd854bd4f66e6c2507fe6f8846f6dac
MD5 ed7b649a261ef2f9bf36ca1bd77838cc
BLAKE2b-256 a8e1c74802a7236f2b41cf0f3b627b38c9e2a737dbdd1b0d22ad44d9a1990ec7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ldt_nexus-1.2.0b2.post1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on SnayperTihCreator/Ldt-nexus

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