No description
Find a file
2025-12-08 16:11:06 +01:00
_archive init 2025-12-08 16:11:06 +01:00
aiprompts init 2025-12-08 16:11:06 +01:00
examples init 2025-12-08 16:11:06 +01:00
herolib init 2025-12-08 16:11:06 +01:00
pythonsetup init 2025-12-08 16:11:06 +01:00
.gitignore init 2025-12-08 16:11:06 +01:00
install.sh init 2025-12-08 16:11:06 +01:00
pipenv.sh init 2025-12-08 16:11:06 +01:00
pyproject.toml init 2025-12-08 16:11:06 +01:00
README.md init 2025-12-08 16:11:06 +01:00

herolib_python

see also ~/code/git.ourworld.tf/tfgrid_research/tfdev has some usefull stuff as well

Installation

You can install herolib directly from the Git repository using uv pip:

uv pip install git+https://git.ourworld.tf/herocode/herolib_python.git

To install in editable mode for development:

uv pip install -e git+https://git.ourworld.tf/herocode/herolib_python.git#egg=herolib

To install from a local path (if you have cloned the repository locally):

uv pip install -e "$HOME/code/git.ourworld.tf/herocode/herolib_python"

Usage

Once installed, you can import modules from the herolib package:

import herolib.core.loghandler.mylogging
# Or import specific functions/classes
from herolib.core.loghandler.mylogging import MyLogger

how to integrate python in other projects

see Python Herolib Integration

Adding as a Dependency in pyproject.toml

To include herolib as a dependency in another Python project that uses pyproject.toml, you can add it to the dependencies section of your project's pyproject.toml file. This is particularly useful for development or when you need to pin to a specific version or branch.

Example pyproject.toml for another project:

[project]
name = "my-other-project"
version = "0.1.0"
dependencies = [
    "herolib @ git+https://git.ourworld.tf/herocode/herolib_python.git",
]