| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository contains the Python SDK for integrating with Lore.
Lore is an open source version control system that is designed for unprecedented scalability of both data and teams. It is optimized for projects that combine code with large binary assets, including games and entertainment, and caters to the needs of developers and artists alike.
For full Lore documentation, architecture details, and contribution guidelines, visit the main Lore repository.
python3 -m pip install lore-vcsThe top-level lore package exposes the high-level fluent API. A low-level, C-like wrapper around the underlying FFI is also available under lore.native for advanced use cases.
from lore import Lore
from lore.types import LoreLogConfig
from lore.types.args import LoreGlobalArgs, LoreRepositoryStatusArgs
from lore.types.enums import LoreEventTag, LoreLogLevel
from lore.types.events import LoreEventFFI
Lore.log_configure(
LoreLogConfig(file=True, file_path="/path/to/log/directory", level=LoreLogLevel.DEBUG)
)
global_args = LoreGlobalArgs(repository_path="/path/to/local/repository")
status_args = LoreRepositoryStatusArgs(staged=True, scan=True)
def on_event(lore_event: LoreEventFFI, _user_context: int):
if lore_event.tag == LoreEventTag.REPOSITORY_STATUS_FILE:
print(lore_event.get_data())
Lore.repository_status(global_args, status_args).callback(on_event).wait()For comprehensive examples, see the examples directory. Both examples/example.py and examples/example-native.py run offline by default; pass a remote URL (e.g. lore://localhost) as the first argument to exercise the online push/clone flow. See examples/README.md for details, including how to run a local Lore server.
When running examples/example.py or examples/example-native.py, set ON_WINDOWS_LINUX_SUBSYSTEM=True otherwise WSL fails to open the browser to complete user authentication.
git clone https://github.com/EpicGames/lore-pythonuv venv .venv
source .venv/bin/activateuv pip install --group devThe SDK binds against the Lore C library. Pick one of the two options below depending on whether you're also modifying the Lore core.
Use this when you're changing the Lore C/Rust core alongside the Python SDK.
cargo build --releaseexport LORE_BUILD_PATH="/<path-to>/lore/target/release"Use this when you only need to develop the Python SDK against an existing Lore version.
Download the header and binaries from the Lore repository release page and place them under /<path-to>/lore/
Set the environment variable LORE_BUILD_PATH to point to the download path:
export LORE_BUILD_PATH="/<path-to>/lore/"uv run --no-project python find_lorelib.py
uv run --no-project python generator/generate.pyuv pip install -e .setup.py declares the packages lore, lore.types, lore.include, and lore.lib. Of these, only lore is checked into the repo — the other three are produced by find_lorelib.py and generator/generate.py from a local build.
Setuptools refuses to perform an editable install (uv pip install -e .) until those directories exist on disk, so the generator must run before the editable install.
Running uv pip install -e . --group dev as a first step would fail with error: package directory 'lore/types' does not exist.
With the dev environment set up, a Lore library available, and the Python bindings generated, run an example as a module from the repository root:
uv run python examples/example.py
uv run python examples/example-native.pyuv run pytestuv run mypy loremypy is configured in strict mode (see [tool.mypy] in pyproject.toml). Run it before opening a PR so type annotations on the public SDK surface stay correct for users.
| Back | FazBrowse Home | New Git URL |