sop4py 2.0.2__py3-none-any.whl → 2.0.3__py3-none-any.whl
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 sop4py might be problematic. Click here for more details.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sop4py
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.3
|
|
4
4
|
Summary: Scalable Objects Persistence for Python. Beta 3 Release
|
|
5
5
|
Author-email: Gerardo Recinto <gerardorecinto@yahoo.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -40,7 +40,7 @@ SOP supports popular architectures & Operating Systems such as Linux, Darwin & M
|
|
|
40
40
|
|
|
41
41
|
# SOP for Python package
|
|
42
42
|
Following steps outlines how to use the Scalable Objects Persistence code library for Python:
|
|
43
|
-
* Install the package using: pip install
|
|
43
|
+
* Install the package using: pip install sop4py
|
|
44
44
|
* Follow standard Python package import and start coding to use the SOP for Python code library for data management. Import the sop package in your python code file.
|
|
45
45
|
* Specify Home base folders where Store info & Registry data files will be stored.
|
|
46
46
|
* Specify Erasure Coding (EC) configuration details which will be used by SOP's EC based replication.
|
|
@@ -51,7 +51,7 @@ Following steps outlines how to use the Scalable Objects Persistence code librar
|
|
|
51
51
|
* Manage data, do some CRUD operations
|
|
52
52
|
* Commit the transaction
|
|
53
53
|
|
|
54
|
-
Below is an example code
|
|
54
|
+
Below is an example code block for illustrating the above steps. For other SOP B-tree examples, you can checkout the code in the unit tests test_btree.py & test_btree_idx.py files that comes w/ the SOP package you downloaded from pypi.
|
|
55
55
|
|
|
56
56
|
```
|
|
57
57
|
from sop import transaction
|
|
@@ -61,7 +61,8 @@ from sop import redis
|
|
|
61
61
|
|
|
62
62
|
stores_folders = ("/disk1", "/disk2")
|
|
63
63
|
ec = {
|
|
64
|
-
# Erasure Config default entry(key="") will allow different B-tree(
|
|
64
|
+
# Erasure Config default entry(key="") will allow different B-tree (data store) to share same EC structure.
|
|
65
|
+
# You can also specify a different one exclusive to a B-tree with the given name.
|
|
65
66
|
"": transaction.ErasureCodingConfig(
|
|
66
67
|
2, # two data shards
|
|
67
68
|
2, # two parity shards
|
|
@@ -91,7 +92,8 @@ to = transaction.TransationOptions(
|
|
|
91
92
|
ec,
|
|
92
93
|
)
|
|
93
94
|
|
|
94
|
-
# Context object.
|
|
95
|
+
# Context object. Your code can call the "cancel" method of the context if you want to abort the operation & rollback the transaction.
|
|
96
|
+
# Useful for example, if you have a concurrently running python code and wanted to abort the running SOP transaction.
|
|
95
97
|
ctx = context.Context()
|
|
96
98
|
|
|
97
99
|
# initialize/open SOP global Redis connection. You can specify your Redis cluster host address(es) & port, etc
|
|
@@ -16,7 +16,7 @@ sop/redis.py,sha256=M2gZEDAPntG2HpV74Uc1FDneCWVFvsf3nv3zZ1Zx-3A,1165
|
|
|
16
16
|
sop/test_btree.py,sha256=4hUvZM1eXU2SrdgjZSXRtDFV9nWnTF-aDfFeJ8XZpbs,13071
|
|
17
17
|
sop/test_btree_idx.py,sha256=FcKosiDEaBkBw-zhHcP3EjdB3_FOcTo7YkGKaQtBnUo,2231
|
|
18
18
|
sop/transaction.py,sha256=Rl92TCdHgYIrCZBIrncOcjDhoT1THKYX5mFHN1sr85c,5767
|
|
19
|
-
sop4py-2.0.
|
|
20
|
-
sop4py-2.0.
|
|
21
|
-
sop4py-2.0.
|
|
22
|
-
sop4py-2.0.
|
|
19
|
+
sop4py-2.0.3.dist-info/METADATA,sha256=T8swfDN7MaWF558snlYuDlREQ2l0Z3kLRqSYRu2KksE,6930
|
|
20
|
+
sop4py-2.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
sop4py-2.0.3.dist-info/top_level.txt,sha256=Xg42qRXwoOKelr7Lc8cpmy9uuBU3LtD3tPLHVnt0aHs,4
|
|
22
|
+
sop4py-2.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|