exonware-xwnode 0.0.1.12__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.
- exonware/__init__.py +14 -0
- exonware/xwnode/__init__.py +127 -0
- exonware/xwnode/base.py +676 -0
- exonware/xwnode/config.py +178 -0
- exonware/xwnode/contracts.py +730 -0
- exonware/xwnode/errors.py +503 -0
- exonware/xwnode/facade.py +460 -0
- exonware/xwnode/strategies/__init__.py +158 -0
- exonware/xwnode/strategies/advisor.py +463 -0
- exonware/xwnode/strategies/edges/__init__.py +32 -0
- exonware/xwnode/strategies/edges/adj_list.py +227 -0
- exonware/xwnode/strategies/edges/adj_matrix.py +391 -0
- exonware/xwnode/strategies/edges/base.py +169 -0
- exonware/xwnode/strategies/flyweight.py +328 -0
- exonware/xwnode/strategies/impls/__init__.py +13 -0
- exonware/xwnode/strategies/impls/_base_edge.py +403 -0
- exonware/xwnode/strategies/impls/_base_node.py +307 -0
- exonware/xwnode/strategies/impls/edge_adj_list.py +353 -0
- exonware/xwnode/strategies/impls/edge_adj_matrix.py +445 -0
- exonware/xwnode/strategies/impls/edge_bidir_wrapper.py +455 -0
- exonware/xwnode/strategies/impls/edge_block_adj_matrix.py +539 -0
- exonware/xwnode/strategies/impls/edge_coo.py +533 -0
- exonware/xwnode/strategies/impls/edge_csc.py +447 -0
- exonware/xwnode/strategies/impls/edge_csr.py +492 -0
- exonware/xwnode/strategies/impls/edge_dynamic_adj_list.py +503 -0
- exonware/xwnode/strategies/impls/edge_flow_network.py +555 -0
- exonware/xwnode/strategies/impls/edge_hyperedge_set.py +516 -0
- exonware/xwnode/strategies/impls/edge_neural_graph.py +650 -0
- exonware/xwnode/strategies/impls/edge_octree.py +574 -0
- exonware/xwnode/strategies/impls/edge_property_store.py +655 -0
- exonware/xwnode/strategies/impls/edge_quadtree.py +519 -0
- exonware/xwnode/strategies/impls/edge_rtree.py +820 -0
- exonware/xwnode/strategies/impls/edge_temporal_edgeset.py +558 -0
- exonware/xwnode/strategies/impls/edge_tree_graph_basic.py +271 -0
- exonware/xwnode/strategies/impls/edge_weighted_graph.py +411 -0
- exonware/xwnode/strategies/manager.py +775 -0
- exonware/xwnode/strategies/metrics.py +538 -0
- exonware/xwnode/strategies/migration.py +432 -0
- exonware/xwnode/strategies/nodes/__init__.py +50 -0
- exonware/xwnode/strategies/nodes/_base_node.py +307 -0
- exonware/xwnode/strategies/nodes/adjacency_list.py +267 -0
- exonware/xwnode/strategies/nodes/aho_corasick.py +345 -0
- exonware/xwnode/strategies/nodes/array_list.py +209 -0
- exonware/xwnode/strategies/nodes/base.py +247 -0
- exonware/xwnode/strategies/nodes/deque.py +200 -0
- exonware/xwnode/strategies/nodes/hash_map.py +135 -0
- exonware/xwnode/strategies/nodes/heap.py +307 -0
- exonware/xwnode/strategies/nodes/linked_list.py +232 -0
- exonware/xwnode/strategies/nodes/node_aho_corasick.py +520 -0
- exonware/xwnode/strategies/nodes/node_array_list.py +175 -0
- exonware/xwnode/strategies/nodes/node_avl_tree.py +371 -0
- exonware/xwnode/strategies/nodes/node_b_plus_tree.py +542 -0
- exonware/xwnode/strategies/nodes/node_bitmap.py +420 -0
- exonware/xwnode/strategies/nodes/node_bitset_dynamic.py +513 -0
- exonware/xwnode/strategies/nodes/node_bloom_filter.py +347 -0
- exonware/xwnode/strategies/nodes/node_btree.py +357 -0
- exonware/xwnode/strategies/nodes/node_count_min_sketch.py +470 -0
- exonware/xwnode/strategies/nodes/node_cow_tree.py +473 -0
- exonware/xwnode/strategies/nodes/node_cuckoo_hash.py +392 -0
- exonware/xwnode/strategies/nodes/node_fenwick_tree.py +301 -0
- exonware/xwnode/strategies/nodes/node_hash_map.py +269 -0
- exonware/xwnode/strategies/nodes/node_heap.py +191 -0
- exonware/xwnode/strategies/nodes/node_hyperloglog.py +407 -0
- exonware/xwnode/strategies/nodes/node_linked_list.py +409 -0
- exonware/xwnode/strategies/nodes/node_lsm_tree.py +400 -0
- exonware/xwnode/strategies/nodes/node_ordered_map.py +390 -0
- exonware/xwnode/strategies/nodes/node_ordered_map_balanced.py +565 -0
- exonware/xwnode/strategies/nodes/node_patricia.py +512 -0
- exonware/xwnode/strategies/nodes/node_persistent_tree.py +378 -0
- exonware/xwnode/strategies/nodes/node_radix_trie.py +452 -0
- exonware/xwnode/strategies/nodes/node_red_black_tree.py +497 -0
- exonware/xwnode/strategies/nodes/node_roaring_bitmap.py +570 -0
- exonware/xwnode/strategies/nodes/node_segment_tree.py +289 -0
- exonware/xwnode/strategies/nodes/node_set_hash.py +354 -0
- exonware/xwnode/strategies/nodes/node_set_tree.py +480 -0
- exonware/xwnode/strategies/nodes/node_skip_list.py +316 -0
- exonware/xwnode/strategies/nodes/node_splay_tree.py +393 -0
- exonware/xwnode/strategies/nodes/node_suffix_array.py +487 -0
- exonware/xwnode/strategies/nodes/node_treap.py +387 -0
- exonware/xwnode/strategies/nodes/node_tree_graph_hybrid.py +1434 -0
- exonware/xwnode/strategies/nodes/node_trie.py +252 -0
- exonware/xwnode/strategies/nodes/node_union_find.py +187 -0
- exonware/xwnode/strategies/nodes/node_xdata_optimized.py +369 -0
- exonware/xwnode/strategies/nodes/priority_queue.py +209 -0
- exonware/xwnode/strategies/nodes/queue.py +161 -0
- exonware/xwnode/strategies/nodes/sparse_matrix.py +206 -0
- exonware/xwnode/strategies/nodes/stack.py +152 -0
- exonware/xwnode/strategies/nodes/trie.py +274 -0
- exonware/xwnode/strategies/nodes/union_find.py +283 -0
- exonware/xwnode/strategies/pattern_detector.py +603 -0
- exonware/xwnode/strategies/performance_monitor.py +487 -0
- exonware/xwnode/strategies/queries/__init__.py +24 -0
- exonware/xwnode/strategies/queries/base.py +236 -0
- exonware/xwnode/strategies/queries/cql.py +201 -0
- exonware/xwnode/strategies/queries/cypher.py +181 -0
- exonware/xwnode/strategies/queries/datalog.py +70 -0
- exonware/xwnode/strategies/queries/elastic_dsl.py +70 -0
- exonware/xwnode/strategies/queries/eql.py +70 -0
- exonware/xwnode/strategies/queries/flux.py +70 -0
- exonware/xwnode/strategies/queries/gql.py +70 -0
- exonware/xwnode/strategies/queries/graphql.py +240 -0
- exonware/xwnode/strategies/queries/gremlin.py +181 -0
- exonware/xwnode/strategies/queries/hiveql.py +214 -0
- exonware/xwnode/strategies/queries/hql.py +70 -0
- exonware/xwnode/strategies/queries/jmespath.py +219 -0
- exonware/xwnode/strategies/queries/jq.py +66 -0
- exonware/xwnode/strategies/queries/json_query.py +66 -0
- exonware/xwnode/strategies/queries/jsoniq.py +248 -0
- exonware/xwnode/strategies/queries/kql.py +70 -0
- exonware/xwnode/strategies/queries/linq.py +238 -0
- exonware/xwnode/strategies/queries/logql.py +70 -0
- exonware/xwnode/strategies/queries/mql.py +68 -0
- exonware/xwnode/strategies/queries/n1ql.py +210 -0
- exonware/xwnode/strategies/queries/partiql.py +70 -0
- exonware/xwnode/strategies/queries/pig.py +215 -0
- exonware/xwnode/strategies/queries/promql.py +70 -0
- exonware/xwnode/strategies/queries/sparql.py +220 -0
- exonware/xwnode/strategies/queries/sql.py +275 -0
- exonware/xwnode/strategies/queries/xml_query.py +66 -0
- exonware/xwnode/strategies/queries/xpath.py +223 -0
- exonware/xwnode/strategies/queries/xquery.py +258 -0
- exonware/xwnode/strategies/queries/xwnode_executor.py +332 -0
- exonware/xwnode/strategies/queries/xwquery_strategy.py +424 -0
- exonware/xwnode/strategies/registry.py +604 -0
- exonware/xwnode/strategies/simple.py +273 -0
- exonware/xwnode/strategies/utils.py +532 -0
- exonware/xwnode/types.py +912 -0
- exonware/xwnode/version.py +78 -0
- exonware_xwnode-0.0.1.12.dist-info/METADATA +169 -0
- exonware_xwnode-0.0.1.12.dist-info/RECORD +132 -0
- exonware_xwnode-0.0.1.12.dist-info/WHEEL +4 -0
- exonware_xwnode-0.0.1.12.dist-info/licenses/LICENSE +21 -0
exonware/__init__.py
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
"""
|
2
|
+
exonware package - Enterprise-grade Python framework ecosystem
|
3
|
+
|
4
|
+
Company: eXonware.com
|
5
|
+
Author: Eng. Muhammad AlShehri
|
6
|
+
Email: connect@exonware.com
|
7
|
+
Version: 0.0.1.12
|
8
|
+
Generation Date: 2025-01-03
|
9
|
+
"""
|
10
|
+
|
11
|
+
__version__ = '0.0.1'
|
12
|
+
__author__ = 'Eng. Muhammad AlShehri'
|
13
|
+
__email__ = 'connect@exonware.com'
|
14
|
+
__company__ = 'eXonware.com'
|
@@ -0,0 +1,127 @@
|
|
1
|
+
"""
|
2
|
+
#exonware/xwnode/src/exonware/xwnode/__init__.py
|
3
|
+
|
4
|
+
xwnode: A lightweight library for representing and navigating hierarchical data.
|
5
|
+
|
6
|
+
The xwnode library provides a clean, immutable interface for working with
|
7
|
+
tree-structured data. It's designed to be the foundation for more complex
|
8
|
+
data handling libraries like xdata.
|
9
|
+
|
10
|
+
Company: eXonware.com
|
11
|
+
Author: Eng. Muhammad AlShehri
|
12
|
+
Email: connect@exonware.com
|
13
|
+
Version: 0.0.1.12
|
14
|
+
Generation Date: 07-Sep-2025
|
15
|
+
|
16
|
+
Main Classes:
|
17
|
+
XWNode: The primary interface for working with hierarchical data
|
18
|
+
XWQuery: Query interface for searching and filtering nodes
|
19
|
+
XWFactory: Factory for creating XWNode instances
|
20
|
+
|
21
|
+
Exceptions:
|
22
|
+
XWNodeError: Base exception for all xwnode errors
|
23
|
+
XWNodeTypeError: Raised for invalid node type operations
|
24
|
+
XWNodePathError: Raised for invalid path lookups
|
25
|
+
XWNodeValueError: Raised for value operation failures
|
26
|
+
XWNodeSecurityError: Raised for security violations
|
27
|
+
XWNodeLimitError: Raised for resource limit violations
|
28
|
+
|
29
|
+
Example:
|
30
|
+
>>> from exonware.xwnode import XWNode
|
31
|
+
>>>
|
32
|
+
>>> # Create from Python objects
|
33
|
+
>>> data = XWNode.from_native({
|
34
|
+
... 'users': [
|
35
|
+
... {'name': 'Alice', 'age': 30},
|
36
|
+
... {'name': 'Bob', 'age': 25}
|
37
|
+
... ]
|
38
|
+
... })
|
39
|
+
>>>
|
40
|
+
>>> # Navigate using paths
|
41
|
+
>>> data.find('users.0.name').value
|
42
|
+
'Alice'
|
43
|
+
>>>
|
44
|
+
>>> # Use bracket notation
|
45
|
+
>>> data['users'][1]['age'].value
|
46
|
+
25
|
47
|
+
"""
|
48
|
+
|
49
|
+
# =============================================================================
|
50
|
+
# LAZY INSTALLATION - Simple One-Line Configuration
|
51
|
+
# =============================================================================
|
52
|
+
from exonware.xwsystem.utils.lazy_discovery import config_package_lazy_install_enabled
|
53
|
+
config_package_lazy_install_enabled("xwnode") # Auto-detect [lazy] extra
|
54
|
+
|
55
|
+
# =============================================================================
|
56
|
+
# IMPORTS - Standard Python Imports (No Defensive Code!)
|
57
|
+
# =============================================================================
|
58
|
+
from .facade import (
|
59
|
+
XWNode, XWEdge, XWQuery, XWFactory,
|
60
|
+
# A+ Usability Presets
|
61
|
+
create_with_preset, list_available_presets,
|
62
|
+
# Performance Modes
|
63
|
+
fast, optimized, adaptive, dual_adaptive
|
64
|
+
)
|
65
|
+
from .errors import (
|
66
|
+
XWNodeError, XWNodeTypeError, XWNodePathError, XWNodeValueError,
|
67
|
+
XWNodeSecurityError, XWNodeLimitError, XWNodePathSecurityError
|
68
|
+
)
|
69
|
+
from .config import XWNodeConfig, get_config, set_config
|
70
|
+
|
71
|
+
# xwsystem lazy install functionality
|
72
|
+
from exonware.xwsystem.utils.lazy_install import xwimport
|
73
|
+
from exonware.xwsystem.monitoring import get_metrics as get_xwsystem_metrics, reset_metrics as reset_xwsystem_metrics
|
74
|
+
|
75
|
+
# Version info
|
76
|
+
__version__ = '0.0.1'
|
77
|
+
__author__ = 'Eng. Muhammad AlShehri'
|
78
|
+
__email__ = 'connect@exonware.com'
|
79
|
+
__company__ = 'eXonware.com'
|
80
|
+
|
81
|
+
# Public API
|
82
|
+
__all__ = [
|
83
|
+
# Main classes
|
84
|
+
'XWNode',
|
85
|
+
'XWEdge',
|
86
|
+
'XWQuery',
|
87
|
+
'XWFactory',
|
88
|
+
|
89
|
+
# A+ Usability Presets
|
90
|
+
'create_with_preset',
|
91
|
+
'list_available_presets',
|
92
|
+
|
93
|
+
# Performance Modes
|
94
|
+
'fast',
|
95
|
+
'optimized',
|
96
|
+
'adaptive',
|
97
|
+
'dual_adaptive',
|
98
|
+
|
99
|
+
# Configuration
|
100
|
+
'XWNodeConfig',
|
101
|
+
'get_config',
|
102
|
+
'set_config',
|
103
|
+
|
104
|
+
# Lazy Install
|
105
|
+
'xwimport',
|
106
|
+
|
107
|
+
# Exceptions
|
108
|
+
'XWNodeError',
|
109
|
+
'XWNodeTypeError',
|
110
|
+
'XWNodePathError',
|
111
|
+
'XWNodeValueError',
|
112
|
+
'XWNodeSecurityError',
|
113
|
+
'XWNodeLimitError',
|
114
|
+
'XWNodePathSecurityError',
|
115
|
+
]
|
116
|
+
|
117
|
+
# =============================================================================
|
118
|
+
# CONVENIENCE FUNCTIONS
|
119
|
+
# =============================================================================
|
120
|
+
|
121
|
+
def get_metrics():
|
122
|
+
"""Get XWNode metrics instance."""
|
123
|
+
return get_xwsystem_metrics('xwnode')
|
124
|
+
|
125
|
+
def reset_metrics():
|
126
|
+
"""Reset XWNode metrics."""
|
127
|
+
reset_xwsystem_metrics('xwnode')
|