Skip to main content

Package for IoC knowledge management

Project description

ioc-knowledge-memory-svc

ioc-knowledge-memory-svc - APIs for knowledge management

Usage Options

This service can be accessed in two ways:

  1. HTTP API (for external clients, microservices) - Port 9003
  2. Direct Library (for Python in-process, 10x faster) - See knowledge_memory

Prerequisites

  • Python 3.8+
  • Poetry: curl -sSL https://install.python-poetry.org | python3 -
  • Task:
    • macOS: brew install go-task
    • Linux: apt install task, dnf install go-task, or snap install task --classic
    • Cross-platform: npm install -g @go-task/cli
    • Go users: go install github.com/go-task/task/v3/cmd/task@latest
    • Manual install: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
    • All-in-one setup: ./install.sh (installs Poetry and Task globally, and dependencies)

Quick Start

Deployment Options

task docker-compose-up       # Start complete stack (application + databases)

Alternative Quick Start Methods

Dev setup (installs Poetry and Task globally)

./install.sh
task dev

Manual setup (if you have Poetry/Task already)

poetry install
task dev

API Documentation: http://localhost:9003/docs http://localhost:9003/openapi.json

Development

Using Task

task dev              # Start development server
task test             # Run all tests
task docker-build     # Build Docker image
task docker-run       # Run Docker container

Using Poetry directly

cd src/server
poetry run python main.py

Using Docker

docker-compose up --build

Version Management

This project uses pyproject.toml as the single source of truth for versioning.

How to Bump Version

Simply edit one line in pyproject.toml:

[project]
version = "0.1.5"  # Change this line only!

All other locations automatically sync:

  • setup.py - reads from pyproject.toml
  • src/knowledge_memory/__init__.py - uses importlib.metadata
  • .github/workflows/ci.yaml - dynamically reads and updates for dev builds

No manual sync needed! The version is automatically propagated to:

  • Package metadata when building
  • Runtime __version__ attribute
  • CI/CD dev builds (adds .devYYYYMMDDHHMMSS suffix)

Version Format

We follow PEP 440 versioning:

  • Release versions: 0.1.4, 0.2.0, 1.0.0
  • Dev builds (CI): 0.1.4.dev20260316120000

Python Library (New!)

For in-process, high-performance access without HTTP overhead:

from knowledge_memory import upsert_knowledge_graph, query_knowledge_graph
from knowledge_memory import onboard_vector_store, upsert_vector_store

# Direct function calls - no HTTP!
response = upsert_knowledge_graph(
    mas_id="agent-1",
    wksp_id="workspace-1",
    concepts=[{"id": "c1", "name": "Python"}]
)

Benefits:

  • 🚀 10x faster than HTTP API (no network overhead)
  • 🐍 Type-safe Python exceptions
  • 🔧 Same features as HTTP API
  • No regression - HTTP API still works

Documentation: See src/knowledge_memory/README.md

Quick test:

python src/knowledge_memory/examples.py     # Run examples
pytest tests/test_knowledge_memory.py -v    # Run tests
python3 validate_knowledge_memory.py        # Validate structure

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

ioc_knowledge_memory-0.2.3.tar.gz (64.7 kB view details)

Uploaded Source

Built Distribution

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

ioc_knowledge_memory-0.2.3-py3-none-any.whl (85.1 kB view details)

Uploaded Python 3

File details

Details for the file ioc_knowledge_memory-0.2.3.tar.gz.

File metadata

  • Download URL: ioc_knowledge_memory-0.2.3.tar.gz
  • Upload date:
  • Size: 64.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ioc_knowledge_memory-0.2.3.tar.gz
Algorithm Hash digest
SHA256 f18a2f8c55c8557f0d45d585bf1ecb1304584ef8507e70903d41984e441c6f9d
MD5 d1188aae8fea145b0067ce9537b465ea
BLAKE2b-256 d2d8acd03101c7fe477eba48d2fbb93093c8cceb2acc4f95f66e6e3ba78f42b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ioc_knowledge_memory-0.2.3.tar.gz:

Publisher: ci.yaml on outshift-open/ioc-knowledge-memory

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

File details

Details for the file ioc_knowledge_memory-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ioc_knowledge_memory-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3e55d97431220214c445b8ce2462687e2196d75ab0b117b8c163a86435672e4e
MD5 9f146f22ae7d05664d63e70044a4eda8
BLAKE2b-256 2fc05c6fdd8709ed0d4ccd56a739254ae083643ad65a5dc64cc6699c64fe8d51

See more details on using hashes here.

Provenance

The following attestation bundles were made for ioc_knowledge_memory-0.2.3-py3-none-any.whl:

Publisher: ci.yaml on outshift-open/ioc-knowledge-memory

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