76 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			76 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
Metadata-Version: 2.4
 | 
						|
Name: herolib
 | 
						|
Version: 0.1.0
 | 
						|
Summary: A Python library for HeroCode
 | 
						|
Author-email: Kilo Code <kilo.code@example.com>
 | 
						|
Requires-Python: >=3.12
 | 
						|
Description-Content-Type: text/markdown
 | 
						|
Requires-Dist: peewee
 | 
						|
Requires-Dist: psutil>=5.9.0
 | 
						|
Requires-Dist: fastapi>=0.100.0
 | 
						|
Requires-Dist: uvicorn>=0.23.0
 | 
						|
Requires-Dist: toml>=0.10.2
 | 
						|
Requires-Dist: libtmux>=0.25.0
 | 
						|
 | 
						|
# 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`:
 | 
						|
 | 
						|
```bash
 | 
						|
uv pip install git+https://git.ourworld.tf/herocode/herolib_python.git
 | 
						|
```
 | 
						|
 | 
						|
To install in editable mode for development:
 | 
						|
 | 
						|
```bash
 | 
						|
uv pip install -e git+https://git.ourworld.tf/herocode/herolib_python.git#egg=herolib
 | 
						|
```
 | 
						|
 | 
						|
## Usage
 | 
						|
 | 
						|
Once installed, you can import modules from the `herolib` package:
 | 
						|
 | 
						|
```python
 | 
						|
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](pythonsetup/README.md)
 | 
						|
 | 
						|
## Version Control
 | 
						|
 | 
						|
This library follows standard Git version control practices. Releases can be managed by tagging specific commits in the Git repository. Users installing directly from the Git URL can specify a particular branch, tag, or commit hash to get a specific version. For example:
 | 
						|
 | 
						|
```bash
 | 
						|
# Install from a specific branch
 | 
						|
uv pip install git+https://git.ourworld.tf/herocode/herolib_python.git@main
 | 
						|
 | 
						|
# Install from a specific tag (e.g., v0.1.0)
 | 
						|
uv pip install git+https://git.ourworld.tf/herocode/herolib_python.git@v0.1.0
 | 
						|
 | 
						|
# Install from a specific commit hash
 | 
						|
uv pip install git+https://git.ourworld.tf/herocode/herolib_python.git@<commit_hash>
 | 
						|
```
 | 
						|
 | 
						|
## 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:
 | 
						|
 | 
						|
```toml
 | 
						|
[project]
 | 
						|
name = "my-other-project"
 | 
						|
version = "0.1.0"
 | 
						|
dependencies = [
 | 
						|
    "herolib @ git+https://git.ourworld.tf/herocode/herolib_python.git",
 | 
						|
]
 |