posted 0.0.2__tar.gz → 0.0.3__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.
- {posted-0.0.2 → posted-0.0.3}/PKG-INFO +15 -2
- {posted-0.0.2 → posted-0.0.3}/README.md +14 -1
- {posted-0.0.2 → posted-0.0.3}/posted.egg-info/PKG-INFO +15 -2
- {posted-0.0.2 → posted-0.0.3}/setup.cfg +1 -1
- {posted-0.0.2 → posted-0.0.3}/LICENSE +0 -0
- {posted-0.0.2 → posted-0.0.3}/posted/__init__.py +0 -0
- {posted-0.0.2 → posted-0.0.3}/posted/scrap/__init__.py +0 -0
- {posted-0.0.2 → posted-0.0.3}/posted/scrap/reactive_dag.py +0 -0
- {posted-0.0.2 → posted-0.0.3}/posted.egg-info/SOURCES.txt +0 -0
- {posted-0.0.2 → posted-0.0.3}/posted.egg-info/dependency_links.txt +0 -0
- {posted-0.0.2 → posted-0.0.3}/posted.egg-info/not-zip-safe +0 -0
- {posted-0.0.2 → posted-0.0.3}/posted.egg-info/top_level.txt +0 -0
- {posted-0.0.2 → posted-0.0.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: posted
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: Interfacing with message-broker functionality
|
|
5
5
|
Home-page: https://github.com/i2mint/posted
|
|
6
6
|
Author: OtoSense
|
|
@@ -37,7 +37,7 @@ Examples
|
|
|
37
37
|
First, we need some func nodes to define the reaction relationships.
|
|
38
38
|
We'll stuff these func nodes in a DAG, for ease of use, but it's not necessary.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
```python
|
|
41
41
|
>>> from meshed import FuncNode, DAG
|
|
42
42
|
>>>
|
|
43
43
|
>>> def f(a, b):
|
|
@@ -76,37 +76,48 @@ We'll stuff these func nodes in a DAG, for ease of use, but it's not necessary.
|
|
|
76
76
|
<BLANKLINE>
|
|
77
77
|
g
|
|
78
78
|
<BLANKLINE>
|
|
79
|
+
```
|
|
79
80
|
|
|
80
81
|
Now we make a scope with these func nodes.
|
|
81
82
|
|
|
83
|
+
```python
|
|
82
84
|
>>> s = ReactiveScope(d)
|
|
85
|
+
```
|
|
83
86
|
|
|
84
87
|
The scope starts empty (by default).
|
|
85
88
|
|
|
89
|
+
```python
|
|
86
90
|
>>> s
|
|
87
91
|
<ReactiveScope with .scope: {}>
|
|
92
|
+
```
|
|
88
93
|
|
|
89
94
|
So if we try to access any key, we'll get a KeyError.
|
|
90
95
|
|
|
96
|
+
```python
|
|
91
97
|
>>> s['g'] # doctest: +IGNORE_EXCEPTION_DETAIL
|
|
92
98
|
Traceback (most recent call last):
|
|
93
99
|
...
|
|
94
100
|
KeyError: 'g'
|
|
101
|
+
```
|
|
95
102
|
|
|
96
103
|
That's because we didn't put write anything in the scope yet.
|
|
97
104
|
|
|
98
105
|
But, if you give ``g_`` enough data to be able to compute ``g`` (namely, if you
|
|
99
106
|
write values of ``b`` and ``a_plus_b``), then ``g`` will automatically be computed.
|
|
100
107
|
|
|
108
|
+
```python
|
|
101
109
|
>>> s['b'] = 3
|
|
102
110
|
>>> s['a_plus_b'] = 5
|
|
103
111
|
>>> s
|
|
104
112
|
<ReactiveScope with .scope: {'b': 3, 'a_plus_b': 5, 'g': 15}>
|
|
113
|
+
```
|
|
105
114
|
|
|
106
115
|
So now we can access ``g``.
|
|
107
116
|
|
|
117
|
+
```python
|
|
108
118
|
>>> s['g']
|
|
109
119
|
15
|
|
120
|
+
```
|
|
110
121
|
|
|
111
122
|
Note though, that we first showed that ``g`` appeared in the scope before we
|
|
112
123
|
explicitly asked for it. This was to show that ``g`` was computed as a
|
|
@@ -116,6 +127,7 @@ computation
|
|
|
116
127
|
Let's clear the scope and show that by specifying ``a`` and ``b``, we get all the
|
|
117
128
|
other values of the network.
|
|
118
129
|
|
|
130
|
+
```python
|
|
119
131
|
>>> s.clear()
|
|
120
132
|
>>> s
|
|
121
133
|
<ReactiveScope with .scope: {}>
|
|
@@ -125,3 +137,4 @@ other values of the network.
|
|
|
125
137
|
<ReactiveScope with .scope: {'a': 3, 'b': 4, 'a_plus_b': 7, 'g': 28}>
|
|
126
138
|
>>> s['g'] # (3 + 4) * 4 == 7 * 4 == 28
|
|
127
139
|
28
|
|
140
|
+
```
|
|
@@ -26,7 +26,7 @@ Examples
|
|
|
26
26
|
First, we need some func nodes to define the reaction relationships.
|
|
27
27
|
We'll stuff these func nodes in a DAG, for ease of use, but it's not necessary.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
```python
|
|
30
30
|
>>> from meshed import FuncNode, DAG
|
|
31
31
|
>>>
|
|
32
32
|
>>> def f(a, b):
|
|
@@ -65,37 +65,48 @@ We'll stuff these func nodes in a DAG, for ease of use, but it's not necessary.
|
|
|
65
65
|
<BLANKLINE>
|
|
66
66
|
g
|
|
67
67
|
<BLANKLINE>
|
|
68
|
+
```
|
|
68
69
|
|
|
69
70
|
Now we make a scope with these func nodes.
|
|
70
71
|
|
|
72
|
+
```python
|
|
71
73
|
>>> s = ReactiveScope(d)
|
|
74
|
+
```
|
|
72
75
|
|
|
73
76
|
The scope starts empty (by default).
|
|
74
77
|
|
|
78
|
+
```python
|
|
75
79
|
>>> s
|
|
76
80
|
<ReactiveScope with .scope: {}>
|
|
81
|
+
```
|
|
77
82
|
|
|
78
83
|
So if we try to access any key, we'll get a KeyError.
|
|
79
84
|
|
|
85
|
+
```python
|
|
80
86
|
>>> s['g'] # doctest: +IGNORE_EXCEPTION_DETAIL
|
|
81
87
|
Traceback (most recent call last):
|
|
82
88
|
...
|
|
83
89
|
KeyError: 'g'
|
|
90
|
+
```
|
|
84
91
|
|
|
85
92
|
That's because we didn't put write anything in the scope yet.
|
|
86
93
|
|
|
87
94
|
But, if you give ``g_`` enough data to be able to compute ``g`` (namely, if you
|
|
88
95
|
write values of ``b`` and ``a_plus_b``), then ``g`` will automatically be computed.
|
|
89
96
|
|
|
97
|
+
```python
|
|
90
98
|
>>> s['b'] = 3
|
|
91
99
|
>>> s['a_plus_b'] = 5
|
|
92
100
|
>>> s
|
|
93
101
|
<ReactiveScope with .scope: {'b': 3, 'a_plus_b': 5, 'g': 15}>
|
|
102
|
+
```
|
|
94
103
|
|
|
95
104
|
So now we can access ``g``.
|
|
96
105
|
|
|
106
|
+
```python
|
|
97
107
|
>>> s['g']
|
|
98
108
|
15
|
|
109
|
+
```
|
|
99
110
|
|
|
100
111
|
Note though, that we first showed that ``g`` appeared in the scope before we
|
|
101
112
|
explicitly asked for it. This was to show that ``g`` was computed as a
|
|
@@ -105,6 +116,7 @@ computation
|
|
|
105
116
|
Let's clear the scope and show that by specifying ``a`` and ``b``, we get all the
|
|
106
117
|
other values of the network.
|
|
107
118
|
|
|
119
|
+
```python
|
|
108
120
|
>>> s.clear()
|
|
109
121
|
>>> s
|
|
110
122
|
<ReactiveScope with .scope: {}>
|
|
@@ -114,3 +126,4 @@ other values of the network.
|
|
|
114
126
|
<ReactiveScope with .scope: {'a': 3, 'b': 4, 'a_plus_b': 7, 'g': 28}>
|
|
115
127
|
>>> s['g'] # (3 + 4) * 4 == 7 * 4 == 28
|
|
116
128
|
28
|
|
129
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: posted
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: Interfacing with message-broker functionality
|
|
5
5
|
Home-page: https://github.com/i2mint/posted
|
|
6
6
|
Author: OtoSense
|
|
@@ -37,7 +37,7 @@ Examples
|
|
|
37
37
|
First, we need some func nodes to define the reaction relationships.
|
|
38
38
|
We'll stuff these func nodes in a DAG, for ease of use, but it's not necessary.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
```python
|
|
41
41
|
>>> from meshed import FuncNode, DAG
|
|
42
42
|
>>>
|
|
43
43
|
>>> def f(a, b):
|
|
@@ -76,37 +76,48 @@ We'll stuff these func nodes in a DAG, for ease of use, but it's not necessary.
|
|
|
76
76
|
<BLANKLINE>
|
|
77
77
|
g
|
|
78
78
|
<BLANKLINE>
|
|
79
|
+
```
|
|
79
80
|
|
|
80
81
|
Now we make a scope with these func nodes.
|
|
81
82
|
|
|
83
|
+
```python
|
|
82
84
|
>>> s = ReactiveScope(d)
|
|
85
|
+
```
|
|
83
86
|
|
|
84
87
|
The scope starts empty (by default).
|
|
85
88
|
|
|
89
|
+
```python
|
|
86
90
|
>>> s
|
|
87
91
|
<ReactiveScope with .scope: {}>
|
|
92
|
+
```
|
|
88
93
|
|
|
89
94
|
So if we try to access any key, we'll get a KeyError.
|
|
90
95
|
|
|
96
|
+
```python
|
|
91
97
|
>>> s['g'] # doctest: +IGNORE_EXCEPTION_DETAIL
|
|
92
98
|
Traceback (most recent call last):
|
|
93
99
|
...
|
|
94
100
|
KeyError: 'g'
|
|
101
|
+
```
|
|
95
102
|
|
|
96
103
|
That's because we didn't put write anything in the scope yet.
|
|
97
104
|
|
|
98
105
|
But, if you give ``g_`` enough data to be able to compute ``g`` (namely, if you
|
|
99
106
|
write values of ``b`` and ``a_plus_b``), then ``g`` will automatically be computed.
|
|
100
107
|
|
|
108
|
+
```python
|
|
101
109
|
>>> s['b'] = 3
|
|
102
110
|
>>> s['a_plus_b'] = 5
|
|
103
111
|
>>> s
|
|
104
112
|
<ReactiveScope with .scope: {'b': 3, 'a_plus_b': 5, 'g': 15}>
|
|
113
|
+
```
|
|
105
114
|
|
|
106
115
|
So now we can access ``g``.
|
|
107
116
|
|
|
117
|
+
```python
|
|
108
118
|
>>> s['g']
|
|
109
119
|
15
|
|
120
|
+
```
|
|
110
121
|
|
|
111
122
|
Note though, that we first showed that ``g`` appeared in the scope before we
|
|
112
123
|
explicitly asked for it. This was to show that ``g`` was computed as a
|
|
@@ -116,6 +127,7 @@ computation
|
|
|
116
127
|
Let's clear the scope and show that by specifying ``a`` and ``b``, we get all the
|
|
117
128
|
other values of the network.
|
|
118
129
|
|
|
130
|
+
```python
|
|
119
131
|
>>> s.clear()
|
|
120
132
|
>>> s
|
|
121
133
|
<ReactiveScope with .scope: {}>
|
|
@@ -125,3 +137,4 @@ other values of the network.
|
|
|
125
137
|
<ReactiveScope with .scope: {'a': 3, 'b': 4, 'a_plus_b': 7, 'g': 28}>
|
|
126
138
|
>>> s['g'] # (3 + 4) * 4 == 7 * 4 == 28
|
|
127
139
|
28
|
|
140
|
+
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|