koi-net 1.0.0b10__tar.gz → 1.0.0b12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of koi-net might be problematic. Click here for more details.
- koi_net-1.0.0b12/.github/workflows/publish-to-pypi.yml +81 -0
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/.gitignore +6 -6
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/LICENSE +21 -21
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/PKG-INFO +4 -2
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/README.md +647 -645
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/examples/basic_coordinator_node.py +134 -134
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/examples/basic_partial_node.py +83 -83
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/examples/full_node_template.py +93 -93
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/examples/partial_node_template.py +40 -40
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/pyproject.toml +30 -30
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/requirements.txt +8 -8
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/core.py +125 -125
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/identity.py +69 -69
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/network/graph.py +127 -127
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/network/interface.py +273 -273
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/network/request_handler.py +148 -148
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/network/response_handler.py +58 -58
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/processor/default_handlers.py +162 -162
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/processor/handler.py +59 -59
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/processor/interface.py +298 -295
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/processor/knowledge_object.py +122 -122
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/protocol/api_models.py +46 -46
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/protocol/consts.py +6 -6
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/protocol/edge.py +20 -20
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/protocol/event.py +50 -50
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/protocol/helpers.py +24 -24
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/protocol/node.py +16 -16
- koi_net-1.0.0b10/test.py +0 -25
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/__init__.py +0 -0
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/network/__init__.py +0 -0
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/processor/__init__.py +0 -0
- {koi_net-1.0.0b10 → koi_net-1.0.0b12}/src/koi_net/protocol/__init__.py +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Publish Python package to PyPI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags:
|
|
5
|
+
- 'v*.*.*'
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
name: Build distro
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
persistent-credentials: false
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.x"
|
|
20
|
+
- name: Install pypa/build
|
|
21
|
+
run: python3 -m pip install build --user
|
|
22
|
+
- name: Build a binary wheel and a source tarball
|
|
23
|
+
run: python3 -m build
|
|
24
|
+
- name: Store the distribution packages
|
|
25
|
+
uses: actions/upload-artifact@v4
|
|
26
|
+
with:
|
|
27
|
+
name: python-package-distributions
|
|
28
|
+
path: dist/
|
|
29
|
+
|
|
30
|
+
publish-to-pypi:
|
|
31
|
+
name: Publish Python distribution to PyPI
|
|
32
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
33
|
+
needs:
|
|
34
|
+
- build
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
environment:
|
|
37
|
+
name: pypi
|
|
38
|
+
url: https://pypi.org/p/koi-net
|
|
39
|
+
permissions:
|
|
40
|
+
id-token: write
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- name: Download all the dists
|
|
44
|
+
uses: actions/download-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: python-package-distributions
|
|
47
|
+
path: dist/
|
|
48
|
+
- name: Publish distro to PyPI
|
|
49
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
50
|
+
|
|
51
|
+
github-release:
|
|
52
|
+
name: >-
|
|
53
|
+
Sign the Python distribution with Sigstore
|
|
54
|
+
and upload them to GitHub Release
|
|
55
|
+
needs:
|
|
56
|
+
- publish-to-pypi
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
|
|
59
|
+
permissions:
|
|
60
|
+
contents: write
|
|
61
|
+
id-token: write
|
|
62
|
+
|
|
63
|
+
steps:
|
|
64
|
+
- name: Download all the dists
|
|
65
|
+
uses: actions/download-artifact@v4
|
|
66
|
+
with:
|
|
67
|
+
name: python-package-distributions
|
|
68
|
+
path: dist/
|
|
69
|
+
- name: Sign the dists with Sigstore
|
|
70
|
+
uses: sigstore/gh-action-sigstore-python@v3.0.0
|
|
71
|
+
with:
|
|
72
|
+
inputs: >-
|
|
73
|
+
./dist/*.tar.gz
|
|
74
|
+
./dist/*.whl
|
|
75
|
+
- name: Upload artifact signatures to GitHub Release
|
|
76
|
+
env:
|
|
77
|
+
GITHUB_TOKEN: ${{ github.token }}
|
|
78
|
+
run: >-
|
|
79
|
+
gh release upload
|
|
80
|
+
"$GITHUB_REF_NAME" dist/**
|
|
81
|
+
--repo "$GITHUB_REPOSITORY"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
rid-lib
|
|
2
|
-
__pycache__
|
|
3
|
-
*.json
|
|
4
|
-
venv
|
|
5
|
-
prototypes
|
|
6
|
-
.vscode
|
|
1
|
+
rid-lib
|
|
2
|
+
__pycache__
|
|
3
|
+
*.json
|
|
4
|
+
venv
|
|
5
|
+
prototypes
|
|
6
|
+
.vscode
|
|
7
7
|
dist/
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 BlockScience
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 BlockScience
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: koi-net
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0b12
|
|
4
4
|
Summary: Implementation of KOI-net protocol in Python
|
|
5
5
|
Project-URL: Homepage, https://github.com/BlockScience/koi-net/
|
|
6
6
|
Author-email: Luke Miller <luke@block.science>
|
|
@@ -118,7 +118,9 @@ The request and payload JSON objects are composed of the fundamental "knowledge
|
|
|
118
118
|
}
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
An event is a signalling construct that conveys information about RID objects between networked nodes. Events are composed of an RID, manifest, or bundle with an event type attached. Event types can be one of `"FORGET"`, `"UPDATE"`, or `"NEW"` forming the "FUN" acronym.
|
|
122
|
+
|
|
123
|
+
As opposed to CRUD (create, read, update, delete), events are a series of messages, not operations. Each node has its own autonomy in deciding how to react based on the message it receives. For example, a processor node may receive a `"NEW"` event for an RID object its not interested in, and ignore it. Or it may decide that an `"UPDATE"` event should trigger fetching a bundle from another node. A node emits an event to indicate that its internal state has changed:
|
|
122
124
|
- `"NEW"` - indicates an previously unknown RID was cached
|
|
123
125
|
- `"UPDATE"` - indicates a previously known RID was cached
|
|
124
126
|
- `"FORGET"` - indicates a previously known RID was deleted
|