A library for creating, maintaining, and utilizing Universal Histories across multiple domains
Project description
Universal History
A library for creating, maintaining, and utilizing Universal Histories across multiple domains.
Overview
The Universal History library provides a standardized framework for recording, analyzing, and retrieving historical information about any subject across various domains. Whether you're tracking educational progress, medical history, employment records, or any other domain-specific information, this library offers a unified approach to managing that data.
Key Features
- Multi-domain support: Track histories across education, health, work, finance, and other domains
- Event recording: Capture individual events with rich context and metadata
- Trajectory synthesis: Generate summaries and analyses from sequences of events
- State document: Maintain an up-to-date representation of the subject's current state
- Domain catalogs: Define and standardize domain-specific terminology and metrics
- LLM integration: Optimize historical data for use as context with language models
- Multiple storage backends: Store data in memory, files, or MongoDB
Installation
pip install universal-history
For MongoDB support:
pip install universal-history[mongodb]
For LLM integration:
pip install universal-history[llm]
Quick Start
from universal_history import UniversalHistoryClient
# Initialize a client with file storage
client = UniversalHistoryClient(storage_dir="./data")
# Create an event
event = client.create_event(
subject_id="student123",
domain_type="education",
event_type="exam",
content="Student scored 92/100 on Algebra final exam.",
source_type="institution",
source_id="school001",
source_name="Springfield High School",
metrics={"score": 92, "max_score": 100},
tags=["math", "algebra", "exam"]
)
# Update the state document with information from events
client.update_state_from_events(
subject_id="student123",
domain_type="education"
)
# Get LLM-optimized context
context = client.get_llm_context("student123")
print(context)
Architecture
The Universal History system consists of several key components:
- Event Record (RE): The basic unit of information, capturing specific events or observations
- Trajectory Synthesis (ST): Analysis and summary of multiple events over a period of time
- State Document (DE): Real-time representation of the current state of a subject
- Domain Catalog (CDD): Semantic framework for interpreting information in a specific domain
- Universal History (HU): Container for all components related to a specific subject
Documentation
For detailed documentation, visit https://universal-history.readthedocs.io/
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file universal_history-0.1.2.tar.gz.
File metadata
- Download URL: universal_history-0.1.2.tar.gz
- Upload date:
- Size: 36.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7c1cce121ddc03abfde4757e9a4de51cfe0469c5bcf8fda3133856d3322d953
|
|
| MD5 |
48b4c7a23367681d253e04c2fec4066f
|
|
| BLAKE2b-256 |
e755ed84bd65ef88d95241f88723e37fa50fff0ed7599b971cb246fcc4491f13
|
File details
Details for the file universal_history-0.1.2-py3-none-any.whl.
File metadata
- Download URL: universal_history-0.1.2-py3-none-any.whl
- Upload date:
- Size: 46.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6da3c2e173ab80adb17e5152e95aa8c3dd66494cf404440b4dcd03a98b28cb65
|
|
| MD5 |
2360d416387270615d254f65b0e648fa
|
|
| BLAKE2b-256 |
757926f453d1e7f711afe55f5fc4a4d3e1b6d8e1c76a631befb09b788fffbffe
|