cypher-lang 0.1.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Daouda Abdoul Anzize - Nexus Studio
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.
@@ -0,0 +1,6 @@
1
+ include README.md
2
+ include README.fr.md
3
+ include LICENSE
4
+ include cypher.py
5
+ recursive-include docs *
6
+ recursive-include examples *.cy
@@ -0,0 +1,212 @@
1
+ Metadata-Version: 2.4
2
+ Name: cypher-lang
3
+ Version: 0.1.0
4
+ Summary: Minimalist programming language with 8 primitives
5
+ Home-page: https://github.com/tryboy869/cypher
6
+ Author: Daouda Abdoul Anzize
7
+ Author-email: Daouda Abdoul Anzize <nexusstudio100@gmail.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/tryboy869/cypher
10
+ Project-URL: Documentation, https://github.com/tryboy869/cypher/tree/main/docs
11
+ Project-URL: Repository, https://github.com/tryboy869/cypher
12
+ Project-URL: Issues, https://github.com/tryboy869/cypher/issues
13
+ Keywords: programming-language,compiler,interpreter,minimalist
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Dynamic: author
26
+ Dynamic: home-page
27
+ Dynamic: license-file
28
+ Dynamic: requires-python
29
+
30
+ # 🧬 CYPHER Programming Language
31
+
32
+ **Version:** 0.1.0
33
+ **Author:** Daouda Abdoul Anzize
34
+ **Organization:** Nexus Studio
35
+ **License:** MIT
36
+
37
+ ---
38
+
39
+ ## 🌟 What is CYPHER?
40
+
41
+ CYPHER is a **minimalist programming language** inspired by biological information processing concepts, featuring:
42
+
43
+ - **8 core primitives** for all operations
44
+ - **Unified architecture** - one source file generates frontend, backend, and database code
45
+ - **Automatic hardware optimization** - transparent CPU/GPU/Worker management
46
+ - **Single-file runtime** - entire language in ~1,800 lines
47
+ - **Zero-dependency deployment**
48
+
49
+ ## πŸš€ Quick Start
50
+
51
+ ### Installation
52
+
53
+ ```bash
54
+ pip install cypher-lang
55
+ ```
56
+
57
+ ### Your First Program
58
+
59
+ Create `hello.cy`:
60
+
61
+ ```cypher
62
+ # Hello World in CYPHER
63
+ A(greeting)
64
+ G(greeting;text:Hello, CYPHER!)
65
+ T(greeting;render:console)
66
+ F(greeting;fixed)
67
+ L(greeting;life)
68
+ ```
69
+
70
+ Run it:
71
+
72
+ ```bash
73
+ cypher run hello.cy
74
+ ```
75
+
76
+ ## πŸ“š The 8 Primitives
77
+
78
+ | Primitive | Function | Example |
79
+ |-----------|----------|---------|
80
+ | **A** | Create/Allocate | `A(user)` |
81
+ | **C** | Connect/Link | `C(database)` |
82
+ | **G** | Generate/Store | `G(name:Alice)` |
83
+ | **T** | Transform/Compute | `T(validate:email)` |
84
+ | **F** | Fix with constraints | `F(min:0;max:100)` |
85
+ | **L** | Execute/Live | `L(life)` |
86
+ | **I** | Conditional | `I(condition)` |
87
+ | **J** | Jump/Loop | `J(label)` |
88
+
89
+ ## πŸ’‘ Key Features
90
+
91
+ ### Multi-Context Execution
92
+
93
+ One CYPHER file generates multiple outputs:
94
+
95
+ ```cypher
96
+ A(user)
97
+ G(user;name:Alice;email:alice@example.com)
98
+ C(user;database)
99
+ T(user;validate:email)
100
+ F(user;fixed)
101
+ L(user;life)
102
+ ```
103
+
104
+ Outputs:
105
+ - **Frontend**: HTML user interface
106
+ - **Backend**: Rust-like API code
107
+ - **Database**: SQL schema
108
+
109
+ ### Automatic Hardware Management
110
+
111
+ CYPHER automatically selects the best hardware:
112
+
113
+ ```cypher
114
+ A(processing)
115
+ T(processing;normalize:data) # β†’ Auto-routed to GPU if available
116
+ C(processing;database) # β†’ Auto-routed to async Workers
117
+ F(processing;fixed)
118
+ L(processing;life)
119
+ ```
120
+
121
+ ### Evolution Constraints (F Primitive)
122
+
123
+ Define state boundaries with auto-evolution:
124
+
125
+ ```cypher
126
+ # Temperature controller with safety limits
127
+ A(temperature)
128
+ G(temperature;value:20)
129
+ F(temperature;min:15;max:30;auto_evolve:true;adapt_rate:0.1)
130
+ L(temperature;life)
131
+ ```
132
+
133
+ ## πŸ“– Documentation
134
+
135
+ - [English Documentation](./docs/en/)
136
+ - [Documentation FranΓ§aise](./docs/fr/)
137
+ - [Examples](./examples/)
138
+ - [API Reference](./docs/en/api_reference.md)
139
+
140
+ ## πŸ§ͺ Examples
141
+
142
+ ### Web Application
143
+
144
+ ```cypher
145
+ A(dashboard)
146
+ G(dashboard;title:Analytics Dashboard)
147
+ T(dashboard;layout:grid)
148
+ C(dashboard;api)
149
+ F(dashboard;fixed)
150
+ L(dashboard;life)
151
+ ```
152
+
153
+ ### API Server
154
+
155
+ ```cypher
156
+ A(get_users)
157
+ G(get_users;endpoint:/api/users;method:GET)
158
+ C(get_users;database)
159
+ T(get_users;format:json)
160
+ F(get_users;fixed)
161
+ L(get_users;life)
162
+ ```
163
+
164
+ ## πŸ”§ CLI Commands
165
+
166
+ ```bash
167
+ # Run CYPHER file
168
+ cypher run app.cy
169
+
170
+ # Compile to bytecode
171
+ cypher build app.cy
172
+
173
+ # Multi-context execution
174
+ cypher run app.cy --contexts frontend,backend,database
175
+
176
+ # Version info
177
+ cypher version
178
+ ```
179
+
180
+ ## 🐍 Python API
181
+
182
+ ```python
183
+ from cypher import execute_cypher
184
+
185
+ result = execute_cypher("""
186
+ A(user)
187
+ G(user;name:Alice)
188
+ F(user;fixed)
189
+ L(user;life)
190
+ """, contexts=['frontend', 'backend'])
191
+
192
+ print(result['frontend']) # HTML output
193
+ print(result['backend']) # Backend code
194
+ ```
195
+
196
+ ## 🀝 Contributing
197
+
198
+ Contributions welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md)
199
+
200
+ ## πŸ“„ License
201
+
202
+ MIT License - see [LICENSE](./LICENSE)
203
+
204
+ ## πŸ”— Links
205
+
206
+ - [GitHub](https://github.com/tryboy869/cypher)
207
+ - [PyPI](https://pypi.org/project/cypher-lang/)
208
+ - [Documentation](./docs/)
209
+
210
+ ---
211
+
212
+ **Made with ❀️ by Nexus Studio**
@@ -0,0 +1,159 @@
1
+ # 🧬 Langage de Programmation CYPHER
2
+
3
+ **Version:** 0.1.0
4
+ **Auteur:** Daouda Abdoul Anzize
5
+ **Organisation:** Nexus Studio
6
+ **Licence:** MIT
7
+
8
+ ---
9
+
10
+ ## 🌟 Qu'est-ce que CYPHER ?
11
+
12
+ CYPHER est un **langage de programmation minimaliste** inspirΓ© par les concepts de traitement de l'information biologique, avec :
13
+
14
+ - **8 primitives fondamentales** pour toutes les opΓ©rations
15
+ - **Architecture unifiée** - un fichier source génère le frontend, backend et la base de données
16
+ - **Optimisation matΓ©rielle automatique** - gestion transparente CPU/GPU/Workers
17
+ - **Runtime mono-fichier** - tout le langage en ~1,800 lignes
18
+ - **DΓ©ploiement sans dΓ©pendances**
19
+
20
+ ## πŸš€ DΓ©marrage Rapide
21
+
22
+ ### Installation
23
+
24
+ ```bash
25
+ pip install cypher-lang
26
+ ```
27
+
28
+ ### Votre Premier Programme
29
+
30
+ CrΓ©ez `hello.cy`:
31
+
32
+ ```cypher
33
+ # Hello World en CYPHER
34
+ A(salutation)
35
+ G(salutation;texte:Bonjour, CYPHER!)
36
+ T(salutation;rendu:console)
37
+ F(salutation;fixe)
38
+ L(salutation;vie)
39
+ ```
40
+
41
+ ExΓ©cutez-le:
42
+
43
+ ```bash
44
+ cypher run hello.cy
45
+ ```
46
+
47
+ ## πŸ“š Les 8 Primitives
48
+
49
+ | Primitive | Fonction | Exemple |
50
+ |-----------|----------|---------|
51
+ | **A** | CrΓ©er/Allouer | `A(utilisateur)` |
52
+ | **C** | Connecter/Lier | `C(base_donnees)` |
53
+ | **G** | GΓ©nΓ©rer/Stocker | `G(nom:Alice)` |
54
+ | **T** | Transformer/Calculer | `T(valider:email)` |
55
+ | **F** | Fixer avec contraintes | `F(min:0;max:100)` |
56
+ | **L** | ExΓ©cuter/Vivre | `L(vie)` |
57
+ | **I** | Conditionnel | `I(condition)` |
58
+ | **J** | Saut/Boucle | `J(label)` |
59
+
60
+ ## πŸ’‘ FonctionnalitΓ©s ClΓ©s
61
+
62
+ ### ExΓ©cution Multi-Contexte
63
+
64
+ Un fichier CYPHER génère plusieurs sorties:
65
+
66
+ ```cypher
67
+ A(utilisateur)
68
+ G(utilisateur;nom:Alice;email:alice@example.com)
69
+ C(utilisateur;base_donnees)
70
+ T(utilisateur;valider:email)
71
+ F(utilisateur;fixe)
72
+ L(utilisateur;vie)
73
+ ```
74
+
75
+ Sorties:
76
+ - **Frontend**: Interface utilisateur HTML
77
+ - **Backend**: Code API type Rust
78
+ - **Base de donnΓ©es**: SchΓ©ma SQL
79
+
80
+ ### Gestion MatΓ©rielle Automatique
81
+
82
+ CYPHER sΓ©lectionne automatiquement le meilleur matΓ©riel:
83
+
84
+ ```cypher
85
+ A(traitement)
86
+ T(traitement;normaliser:donnees) # β†’ Auto-routΓ© vers GPU si disponible
87
+ C(traitement;base_donnees) # β†’ Auto-routΓ© vers Workers async
88
+ F(traitement;fixe)
89
+ L(traitement;vie)
90
+ ```
91
+
92
+ ### Contraintes d'Γ‰volution (Primitive F)
93
+
94
+ DΓ©finissez des limites d'Γ©tat avec auto-Γ©volution:
95
+
96
+ ```cypher
97
+ # ContrΓ΄leur de tempΓ©rature avec limites de sΓ©curitΓ©
98
+ A(temperature)
99
+ G(temperature;valeur:20)
100
+ F(temperature;min:15;max:30;auto_evolve:true;adapt_rate:0.1)
101
+ L(temperature;vie)
102
+ ```
103
+
104
+ ## πŸ“– Documentation
105
+
106
+ - [Documentation Anglaise](./docs/en/)
107
+ - [Documentation FranΓ§aise](./docs/fr/)
108
+ - [Exemples](./examples/)
109
+ - [RΓ©fΓ©rence API](./docs/fr/reference_api.md)
110
+
111
+ ## πŸ”§ Commandes CLI
112
+
113
+ ```bash
114
+ # ExΓ©cuter un fichier CYPHER
115
+ cypher run app.cy
116
+
117
+ # Compiler en bytecode
118
+ cypher build app.cy
119
+
120
+ # ExΓ©cution multi-contexte
121
+ cypher run app.cy --contexts frontend,backend,database
122
+
123
+ # Info version
124
+ cypher version
125
+ ```
126
+
127
+ ## 🐍 API Python
128
+
129
+ ```python
130
+ from cypher import execute_cypher
131
+
132
+ resultat = execute_cypher("""
133
+ A(utilisateur)
134
+ G(utilisateur;nom:Alice)
135
+ F(utilisateur;fixe)
136
+ L(utilisateur;vie)
137
+ """, contexts=['frontend', 'backend'])
138
+
139
+ print(resultat['frontend']) # Sortie HTML
140
+ print(resultat['backend']) # Code backend
141
+ ```
142
+
143
+ ## 🀝 Contribution
144
+
145
+ Les contributions sont les bienvenues! Voir [CONTRIBUTING.md](./CONTRIBUTING.md)
146
+
147
+ ## πŸ“„ Licence
148
+
149
+ Licence MIT - voir [LICENSE](./LICENSE)
150
+
151
+ ## πŸ”— Liens
152
+
153
+ - [GitHub](https://github.com/tryboy869/cypher)
154
+ - [PyPI](https://pypi.org/project/cypher-lang/)
155
+ - [Documentation](./docs/)
156
+
157
+ ---
158
+
159
+ **Fait avec ❀️ par Nexus Studio**
@@ -0,0 +1,183 @@
1
+ # 🧬 CYPHER Programming Language
2
+
3
+ **Version:** 0.1.0
4
+ **Author:** Daouda Abdoul Anzize
5
+ **Organization:** Nexus Studio
6
+ **License:** MIT
7
+
8
+ ---
9
+
10
+ ## 🌟 What is CYPHER?
11
+
12
+ CYPHER is a **minimalist programming language** inspired by biological information processing concepts, featuring:
13
+
14
+ - **8 core primitives** for all operations
15
+ - **Unified architecture** - one source file generates frontend, backend, and database code
16
+ - **Automatic hardware optimization** - transparent CPU/GPU/Worker management
17
+ - **Single-file runtime** - entire language in ~1,800 lines
18
+ - **Zero-dependency deployment**
19
+
20
+ ## πŸš€ Quick Start
21
+
22
+ ### Installation
23
+
24
+ ```bash
25
+ pip install cypher-lang
26
+ ```
27
+
28
+ ### Your First Program
29
+
30
+ Create `hello.cy`:
31
+
32
+ ```cypher
33
+ # Hello World in CYPHER
34
+ A(greeting)
35
+ G(greeting;text:Hello, CYPHER!)
36
+ T(greeting;render:console)
37
+ F(greeting;fixed)
38
+ L(greeting;life)
39
+ ```
40
+
41
+ Run it:
42
+
43
+ ```bash
44
+ cypher run hello.cy
45
+ ```
46
+
47
+ ## πŸ“š The 8 Primitives
48
+
49
+ | Primitive | Function | Example |
50
+ |-----------|----------|---------|
51
+ | **A** | Create/Allocate | `A(user)` |
52
+ | **C** | Connect/Link | `C(database)` |
53
+ | **G** | Generate/Store | `G(name:Alice)` |
54
+ | **T** | Transform/Compute | `T(validate:email)` |
55
+ | **F** | Fix with constraints | `F(min:0;max:100)` |
56
+ | **L** | Execute/Live | `L(life)` |
57
+ | **I** | Conditional | `I(condition)` |
58
+ | **J** | Jump/Loop | `J(label)` |
59
+
60
+ ## πŸ’‘ Key Features
61
+
62
+ ### Multi-Context Execution
63
+
64
+ One CYPHER file generates multiple outputs:
65
+
66
+ ```cypher
67
+ A(user)
68
+ G(user;name:Alice;email:alice@example.com)
69
+ C(user;database)
70
+ T(user;validate:email)
71
+ F(user;fixed)
72
+ L(user;life)
73
+ ```
74
+
75
+ Outputs:
76
+ - **Frontend**: HTML user interface
77
+ - **Backend**: Rust-like API code
78
+ - **Database**: SQL schema
79
+
80
+ ### Automatic Hardware Management
81
+
82
+ CYPHER automatically selects the best hardware:
83
+
84
+ ```cypher
85
+ A(processing)
86
+ T(processing;normalize:data) # β†’ Auto-routed to GPU if available
87
+ C(processing;database) # β†’ Auto-routed to async Workers
88
+ F(processing;fixed)
89
+ L(processing;life)
90
+ ```
91
+
92
+ ### Evolution Constraints (F Primitive)
93
+
94
+ Define state boundaries with auto-evolution:
95
+
96
+ ```cypher
97
+ # Temperature controller with safety limits
98
+ A(temperature)
99
+ G(temperature;value:20)
100
+ F(temperature;min:15;max:30;auto_evolve:true;adapt_rate:0.1)
101
+ L(temperature;life)
102
+ ```
103
+
104
+ ## πŸ“– Documentation
105
+
106
+ - [English Documentation](./docs/en/)
107
+ - [Documentation FranΓ§aise](./docs/fr/)
108
+ - [Examples](./examples/)
109
+ - [API Reference](./docs/en/api_reference.md)
110
+
111
+ ## πŸ§ͺ Examples
112
+
113
+ ### Web Application
114
+
115
+ ```cypher
116
+ A(dashboard)
117
+ G(dashboard;title:Analytics Dashboard)
118
+ T(dashboard;layout:grid)
119
+ C(dashboard;api)
120
+ F(dashboard;fixed)
121
+ L(dashboard;life)
122
+ ```
123
+
124
+ ### API Server
125
+
126
+ ```cypher
127
+ A(get_users)
128
+ G(get_users;endpoint:/api/users;method:GET)
129
+ C(get_users;database)
130
+ T(get_users;format:json)
131
+ F(get_users;fixed)
132
+ L(get_users;life)
133
+ ```
134
+
135
+ ## πŸ”§ CLI Commands
136
+
137
+ ```bash
138
+ # Run CYPHER file
139
+ cypher run app.cy
140
+
141
+ # Compile to bytecode
142
+ cypher build app.cy
143
+
144
+ # Multi-context execution
145
+ cypher run app.cy --contexts frontend,backend,database
146
+
147
+ # Version info
148
+ cypher version
149
+ ```
150
+
151
+ ## 🐍 Python API
152
+
153
+ ```python
154
+ from cypher import execute_cypher
155
+
156
+ result = execute_cypher("""
157
+ A(user)
158
+ G(user;name:Alice)
159
+ F(user;fixed)
160
+ L(user;life)
161
+ """, contexts=['frontend', 'backend'])
162
+
163
+ print(result['frontend']) # HTML output
164
+ print(result['backend']) # Backend code
165
+ ```
166
+
167
+ ## 🀝 Contributing
168
+
169
+ Contributions welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md)
170
+
171
+ ## πŸ“„ License
172
+
173
+ MIT License - see [LICENSE](./LICENSE)
174
+
175
+ ## πŸ”— Links
176
+
177
+ - [GitHub](https://github.com/tryboy869/cypher)
178
+ - [PyPI](https://pypi.org/project/cypher-lang/)
179
+ - [Documentation](./docs/)
180
+
181
+ ---
182
+
183
+ **Made with ❀️ by Nexus Studio**