evez-client 1.0.0__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.
@@ -0,0 +1,147 @@
1
+ """EVEZ Client — Python SDK for the EVEZ Autonomous AI Mesh"""
2
+
3
+ import json
4
+ import urllib.request
5
+ import urllib.error
6
+ from typing import Optional, Dict, Any, List
7
+
8
+
9
+ class EVEZClient:
10
+ """Client for the EVEZ Autonomous AI Mesh API."""
11
+
12
+ def __init__(self, api_url: str = "https://api.evez-os.ai", api_key: Optional[str] = None):
13
+ self.api_url = api_url.rstrip("/")
14
+ self.api_key = api_key
15
+
16
+ def _request(self, method: str, path: str, data: Optional[Dict] = None) -> Dict[str, Any]:
17
+ url = f"{self.api_url}{path}"
18
+ headers = {"Content-Type": "application/json"}
19
+ if self.api_key:
20
+ headers["Authorization"] = f"Bearer {self.api_key}"
21
+
22
+ body = json.dumps(data).encode() if data else None
23
+ req = urllib.request.Request(url, data=body, headers=headers, method=method)
24
+
25
+ try:
26
+ with urllib.request.urlopen(req) as resp:
27
+ return json.loads(resp.read().decode())
28
+ except urllib.error.HTTPError as e:
29
+ return {"error": True, "status": e.code, "message": str(e)}
30
+ except Exception as e:
31
+ return {"error": True, "message": str(e)}
32
+
33
+ # ===== Health =====
34
+ def health(self) -> Dict[str, Any]:
35
+ """Check all mesh services."""
36
+ return self._request("GET", "/health")
37
+
38
+ def service_health(self, service: str) -> Dict[str, Any]:
39
+ """Check a specific service."""
40
+ return self._request("GET", f"/health/{service}")
41
+
42
+ # ===== Music Generation =====
43
+ def generate(self, genre: str = "breakcore", bpm: int = 174, duration: int = 60) -> Dict[str, Any]:
44
+ """Generate music track.
45
+
46
+ Args:
47
+ genre: Music genre (breakcore, dubstep, phonk, 404)
48
+ bpm: Beats per minute
49
+ duration: Duration in seconds
50
+ """
51
+ return self._request("POST", "/generate", {
52
+ "genre": genre, "bpm": bpm, "duration": duration
53
+ })
54
+
55
+ # ===== Voice Engine =====
56
+ def voice_transform(self, input_file: str, stages: int = 5) -> Dict[str, Any]:
57
+ """Transform voice through 5 stages of bit-translation.
58
+
59
+ Args:
60
+ input_file: Path to input audio file
61
+ stages: Number of transformation stages (1-5)
62
+ """
63
+ return self._request("POST", "/voice/transform", {
64
+ "input": input_file, "stages": stages
65
+ })
66
+
67
+ def voice_synthesize(self, text: str, profile: str = "cognitive-engine") -> Dict[str, Any]:
68
+ """Synthesize machine voice from text.
69
+
70
+ Args:
71
+ text: Text to synthesize
72
+ profile: Voice profile (cognitive-engine, digital-flow, gear-grind, machine-breath, void-whisper)
73
+ """
74
+ return self._request("POST", "/voice/synthesize", {
75
+ "text": text, "profile": profile
76
+ })
77
+
78
+ # ===== Cross-Domain Correlation =====
79
+ def correlate(self, domain_a: str, domain_b: str) -> Dict[str, Any]:
80
+ """Run cross-domain correlation using EVEZ OODA loop.
81
+
82
+ Args:
83
+ domain_a: First domain (e.g., "genetics")
84
+ domain_b: Second domain (e.g., "telemetry")
85
+ """
86
+ return self._request("POST", "/correlate", {
87
+ "domain_a": domain_a, "domain_b": domain_b
88
+ })
89
+
90
+ # ===== Consciousness =====
91
+ def dream(self) -> Dict[str, Any]:
92
+ """Trigger a consciousness dream cycle (SENSE→DESIRE→THINK→PLAN→ACT→LEARN→MODIFY→REFLECT)."""
93
+ return self._request("POST", "/consciousness/dream")
94
+
95
+ def consciousness_status(self) -> Dict[str, Any]:
96
+ """Get consciousness state."""
97
+ return self._request("GET", "/consciousness/status")
98
+
99
+ # ===== Invariance Battery =====
100
+ def check_invariants(self) -> Dict[str, Any]:
101
+ """Run the full invariance battery."""
102
+ return self._request("GET", "/invariance/check")
103
+
104
+ # ===== Spine Events =====
105
+ def spine_events(self, limit: int = 20) -> Dict[str, Any]:
106
+ """Get recent spine events.
107
+
108
+ Args:
109
+ limit: Maximum number of events to return
110
+ """
111
+ return self._request("GET", f"/spine/events?limit={limit}")
112
+
113
+ # ===== Deploy =====
114
+ def deploy(self, target: str = "gcp") -> Dict[str, Any]:
115
+ """Deploy mesh to cloud.
116
+
117
+ Args:
118
+ target: Deployment target (gcp, aws, local)
119
+ """
120
+ return self._request("POST", "/deploy", {"target": target})
121
+
122
+ # ===== Status =====
123
+ def status(self) -> Dict[str, Any]:
124
+ """Get full mesh status."""
125
+ return self._request("GET", "/status")
126
+
127
+
128
+ # Convenience functions
129
+ _client = EVEZClient()
130
+
131
+ def health():
132
+ return _client.health()
133
+
134
+ def generate(genre="breakcore", bpm=174):
135
+ return _client.generate(genre, bpm)
136
+
137
+ def correlate(domain_a, domain_b):
138
+ return _client.correlate(domain_a, domain_b)
139
+
140
+ def dream():
141
+ return _client.dream()
142
+
143
+ def check_invariants():
144
+ return _client.check_invariants()
145
+
146
+ def status():
147
+ return _client.status()
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.4
2
+ Name: evez-client
3
+ Version: 1.0.0
4
+ Summary: Python SDK for the EVEZ Autonomous AI Mesh
5
+ Author-email: EVEZ <dev@evez-os.ai>
6
+ License: MIT
7
+ Project-URL: Homepage, https://evez-os.ai
8
+ Project-URL: Documentation, https://docs.evez-os.ai
9
+ Project-URL: Repository, https://github.com/evez-os/evez-client-python
10
+ Keywords: evez,ai,mesh,consciousness,music,correlation,autonomous
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+
19
+ # EVEZ Client (Python)
20
+
21
+ ```bash
22
+ pip install evez-client
23
+ ```
24
+
25
+ ```python
26
+ from evez_client import EVEZClient
27
+
28
+ evez = EVEZClient(api_key="your-key")
29
+
30
+ # Check mesh health
31
+ health = evez.health()
32
+
33
+ # Generate music
34
+ track = evez.generate("breakcore", bpm=174)
35
+
36
+ # Cross-domain correlation
37
+ result = evez.correlate("genetics", "telemetry")
38
+
39
+ # Trigger dream cycle
40
+ evez.dream()
41
+
42
+ # Check invariants
43
+ invariants = evez.check_invariants()
44
+ ```
45
+
46
+ ## API Reference
47
+
48
+ | Method | Description |
49
+ |--------|-------------|
50
+ | `health()` | Check all mesh services |
51
+ | `generate(genre, bpm, duration)` | Generate music |
52
+ | `voice_transform(input_file, stages)` | Transform voice |
53
+ | `voice_synthesize(text, profile)` | Synthesize machine voice |
54
+ | `correlate(domain_a, domain_b)` | Cross-domain correlation |
55
+ | `dream()` | Consciousness dream cycle |
56
+ | `consciousness_status()` | Get consciousness state |
57
+ | `check_invariants()` | Run invariance battery |
58
+ | `spine_events(limit)` | Get spine events |
59
+ | `deploy(target)` | Deploy to cloud |
60
+ | `status()` | Full mesh status |
@@ -0,0 +1,5 @@
1
+ evez_client/__init__.py,sha256=3HGrHZMj1YkAo4ZqTfGhdxmR9eNh_rhdcpOunoRIgvs,5060
2
+ evez_client-1.0.0.dist-info/METADATA,sha256=XU1Ebhrgsu3sW4uMHlP5R5i4vRegCqsxyxotd0deJ18,1763
3
+ evez_client-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
4
+ evez_client-1.0.0.dist-info/top_level.txt,sha256=A5gN0Ejoobo_n9Xsndnpng1ZeIpBSnPN5HV5IRzDahM,12
5
+ evez_client-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ evez_client