Skip to content

BlockScience/koi-net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

354 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KOI-net

PyPI Documentation

This protocol and framework are the result of several iterations of KOI research, read more here.

KOI-net (Knowledge Organization Infrastructure Network) can be understood as both a network protocol for distributed knowledge processing, and as a Python framework for building nodes, networks, and applications on top of that protocol. This repo is the implementation of that framework.

For information about the KOI-net protocol, see the official specification.

Quick Start

Installation

(Optionally) create and activate a virtual environment, and install KOI-net:

$ pip install koi-net

Create a Simple Partial Node

The KOI-net framework is built around the dependency injection pattern. Node classes are containers for interdependent components implementing internal subsystems. Each node inherits from a base partial or full node class, which comes with ~36 default components. At a minimum, each node needs to implement a config component:

from koi_net.config import PartialNodeConfig, KoiNetConfig, PartialNodeProfile  

class MyPartialNodeConfig(PartialNodeConfig):
	koi_net: KoiNetConfig = KoiNetConfig(
		node_name="partial",
		node_profile=PartialNodeProfile()
	)

Which is set in the node container:

from koi_net.core import PartialNode

class MyPartialNode(PartialNode):
	config_schema = MyPartialNodeConfig

Finally, the main method can be set to build and run the node:

if __name__ == "__main__":
	MyPartialNode().run()

See examples/coordinator.py for a more complex example node, or see the docs for more information on the KOI-net framework.

This framework depends on rid-lib, the Python implementation of the RID protocol.

About

Implementation of Knowledge Organization Infrastructure Network (KOI-net) protocol in Python

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages