oktopios-framework 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) 2025 Mouanwiya Ali Soule
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,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: oktopios-framework
3
+ Version: 0.1.0
4
+ Summary: Framework web MVC pour le langage Oktopios (facon Django / Symfony) — ORM, config par environnement, et plus
5
+ Author: Mouanwiya Ali Soule
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Mouanwiya Ali Soule
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/ALISOULEMOUANWIYA/oktopios-framework
29
+ Project-URL: ORM, https://pypi.org/project/oktopios-orm/
30
+ Project-URL: Language, https://pypi.org/project/oktopios/
31
+ Keywords: oktopios,framework,web,mvc,orm,okp
32
+ Requires-Python: >=3.8
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: oktopios-orm>=0.1.0
36
+ Dynamic: license-file
37
+
38
+ # oktopios-framework 🐙🌐
39
+
40
+ Framework web **MVC** pour le langage **[Oktopios](https://pypi.org/project/oktopios/)**,
41
+ dans l'esprit de **Django** et **Symfony** — on reprend leurs points forts, on
42
+ vise à transformer leurs points faibles en points forts.
43
+
44
+ Troisième couche de l'écosystème, façon Django/Symfony :
45
+
46
+ | Couche | Rôle | Équivalent |
47
+ |---|---|---|
48
+ | `oktopios` | langage + interpréteur | Python / PHP |
49
+ | `oktopios-orm` | ORM (modèles, migrations, requêtes) | Django ORM / Doctrine |
50
+ | **`oktopios-framework`** | framework applicatif (config, MVC…) | **Django / Symfony** |
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install oktopios-framework
56
+ ```
57
+
58
+ Installe automatiquement `oktopios-orm` et `oktopios` (dépendances) — comme
59
+ Django tire Python et Symfony tire PHP.
60
+
61
+ ## Statut (construction pilier par pilier)
62
+
63
+ - ✅ **ORM** (via `oktopios-orm`) — modèles décorés, migrations, query-builder
64
+ - ✅ **Configuration** par environnement (`.env.local`, `.env.prod`)
65
+ - ⏳ Routing + contrôleurs (serveur HTTP)
66
+ - ⏳ Moteur de templates (vues)
67
+ - ⏳ Formulaires / validation, Auth, CLI / scaffolding
68
+
69
+ ## Structure
70
+
71
+ ```
72
+ oktopios-framework/
73
+ ├── oktopios_framework/
74
+ │ ├── config.okp # Config : chargement .env.<env>
75
+ │ └── (routing.okp, view.okp … à venir)
76
+ └── examples/
77
+ ├── blog.okp # démo ORM + config
78
+ ├── .env.local # config développement
79
+ └── .env.prod # config production
80
+ ```
81
+
82
+ ## Démarrage
83
+
84
+ ```bash
85
+ pip install oktopios-framework
86
+ okp examples/blog.okp # depuis la racine du projet
87
+ ```
88
+
89
+ ```okp
90
+ use "oktopios_orm/orm.okp"
91
+ use "oktopios_framework/config.okp"
92
+
93
+ var cfg = new Config()
94
+ cfg.load("local") // lit .env.local ("prod" -> .env.prod)
95
+ print(cfg.get("DB_PATH"))
96
+
97
+ @Entity("articles")
98
+ class Article {
99
+ @Id
100
+ var id: int
101
+ @Column("titre")
102
+ var title: string
103
+ }
104
+ // ... Schema.migrate / Repo / Query fournis par oktopios-orm
105
+ ```
106
+
107
+ ## Configuration `.env` (façon Symfony)
108
+
109
+ `.env.local` (développement) et `.env.prod` (production) contiennent des paires
110
+ `CLE=VALEUR`. `Config.load("local")` / `Config.load("prod")` chargent le fichier
111
+ correspondant. Ne mettez jamais de secrets réels dans un `.env.prod` versionné.
112
+
113
+ ## Licence
114
+
115
+ MIT © Mouanwiya Ali Soule
@@ -0,0 +1,78 @@
1
+ # oktopios-framework 🐙🌐
2
+
3
+ Framework web **MVC** pour le langage **[Oktopios](https://pypi.org/project/oktopios/)**,
4
+ dans l'esprit de **Django** et **Symfony** — on reprend leurs points forts, on
5
+ vise à transformer leurs points faibles en points forts.
6
+
7
+ Troisième couche de l'écosystème, façon Django/Symfony :
8
+
9
+ | Couche | Rôle | Équivalent |
10
+ |---|---|---|
11
+ | `oktopios` | langage + interpréteur | Python / PHP |
12
+ | `oktopios-orm` | ORM (modèles, migrations, requêtes) | Django ORM / Doctrine |
13
+ | **`oktopios-framework`** | framework applicatif (config, MVC…) | **Django / Symfony** |
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install oktopios-framework
19
+ ```
20
+
21
+ Installe automatiquement `oktopios-orm` et `oktopios` (dépendances) — comme
22
+ Django tire Python et Symfony tire PHP.
23
+
24
+ ## Statut (construction pilier par pilier)
25
+
26
+ - ✅ **ORM** (via `oktopios-orm`) — modèles décorés, migrations, query-builder
27
+ - ✅ **Configuration** par environnement (`.env.local`, `.env.prod`)
28
+ - ⏳ Routing + contrôleurs (serveur HTTP)
29
+ - ⏳ Moteur de templates (vues)
30
+ - ⏳ Formulaires / validation, Auth, CLI / scaffolding
31
+
32
+ ## Structure
33
+
34
+ ```
35
+ oktopios-framework/
36
+ ├── oktopios_framework/
37
+ │ ├── config.okp # Config : chargement .env.<env>
38
+ │ └── (routing.okp, view.okp … à venir)
39
+ └── examples/
40
+ ├── blog.okp # démo ORM + config
41
+ ├── .env.local # config développement
42
+ └── .env.prod # config production
43
+ ```
44
+
45
+ ## Démarrage
46
+
47
+ ```bash
48
+ pip install oktopios-framework
49
+ okp examples/blog.okp # depuis la racine du projet
50
+ ```
51
+
52
+ ```okp
53
+ use "oktopios_orm/orm.okp"
54
+ use "oktopios_framework/config.okp"
55
+
56
+ var cfg = new Config()
57
+ cfg.load("local") // lit .env.local ("prod" -> .env.prod)
58
+ print(cfg.get("DB_PATH"))
59
+
60
+ @Entity("articles")
61
+ class Article {
62
+ @Id
63
+ var id: int
64
+ @Column("titre")
65
+ var title: string
66
+ }
67
+ // ... Schema.migrate / Repo / Query fournis par oktopios-orm
68
+ ```
69
+
70
+ ## Configuration `.env` (façon Symfony)
71
+
72
+ `.env.local` (développement) et `.env.prod` (production) contiennent des paires
73
+ `CLE=VALEUR`. `Config.load("local")` / `Config.load("prod")` chargent le fichier
74
+ correspondant. Ne mettez jamais de secrets réels dans un `.env.prod` versionné.
75
+
76
+ ## Licence
77
+
78
+ MIT © Mouanwiya Ali Soule
@@ -0,0 +1,2 @@
1
+ """oktopios-framework — framework web MVC pour Oktopios."""
2
+ __version__ = "0.1.0"
@@ -0,0 +1,57 @@
1
+ // =====================================================================
2
+ // oktopios-framework — Configuration par environnement (façon Symfony)
3
+ // Charge un fichier .env.<env> (KEY=VALUE) dans une Map.
4
+ // Config.load("local") -> lit .env.local
5
+ // Config.load("prod") -> lit .env.prod
6
+ // Chargé via : use "framework/config.okp"
7
+ // =====================================================================
8
+ inject File
9
+ inject String
10
+ inject Map
11
+
12
+ class Config {
13
+ var values: any
14
+
15
+ fun __construct() {
16
+ this.values = {}
17
+ }
18
+
19
+ // Charge .env.<env> s'il existe (ex: "local", "prod")
20
+ fun load(env: string): Config {
21
+ var path = ".env." + env
22
+ if (File.exists(path)) {
23
+ this.parseFile(path)
24
+ }
25
+ return this
26
+ }
27
+
28
+ fun parseFile(path: string) {
29
+ for (ligne in File.readlines(path)) {
30
+ var l = String.trim(ligne)
31
+ var estCommentaire = String.startsWith(l, "#")
32
+ if (l != "") {
33
+ if (estCommentaire == false) {
34
+ var i = String.indexOf(l, "=")
35
+ if (i > 0) {
36
+ var n = String.length(l)
37
+ var debut = i + 1
38
+ var brutCle = String.substring(l, 0, i)
39
+ var brutVal = String.substring(l, debut, n)
40
+ var cle = String.trim(brutCle)
41
+ var valeur = String.trim(brutVal)
42
+ var maj = Map.set(this.values, cle, valeur)
43
+ this.values = maj
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ fun get(cle: string): any {
51
+ return Map.get(this.values, cle)
52
+ }
53
+
54
+ fun has(cle: string): bool {
55
+ return Map.has(this.values, cle)
56
+ }
57
+ }
@@ -0,0 +1,115 @@
1
+ Metadata-Version: 2.4
2
+ Name: oktopios-framework
3
+ Version: 0.1.0
4
+ Summary: Framework web MVC pour le langage Oktopios (facon Django / Symfony) — ORM, config par environnement, et plus
5
+ Author: Mouanwiya Ali Soule
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Mouanwiya Ali Soule
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/ALISOULEMOUANWIYA/oktopios-framework
29
+ Project-URL: ORM, https://pypi.org/project/oktopios-orm/
30
+ Project-URL: Language, https://pypi.org/project/oktopios/
31
+ Keywords: oktopios,framework,web,mvc,orm,okp
32
+ Requires-Python: >=3.8
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: oktopios-orm>=0.1.0
36
+ Dynamic: license-file
37
+
38
+ # oktopios-framework 🐙🌐
39
+
40
+ Framework web **MVC** pour le langage **[Oktopios](https://pypi.org/project/oktopios/)**,
41
+ dans l'esprit de **Django** et **Symfony** — on reprend leurs points forts, on
42
+ vise à transformer leurs points faibles en points forts.
43
+
44
+ Troisième couche de l'écosystème, façon Django/Symfony :
45
+
46
+ | Couche | Rôle | Équivalent |
47
+ |---|---|---|
48
+ | `oktopios` | langage + interpréteur | Python / PHP |
49
+ | `oktopios-orm` | ORM (modèles, migrations, requêtes) | Django ORM / Doctrine |
50
+ | **`oktopios-framework`** | framework applicatif (config, MVC…) | **Django / Symfony** |
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install oktopios-framework
56
+ ```
57
+
58
+ Installe automatiquement `oktopios-orm` et `oktopios` (dépendances) — comme
59
+ Django tire Python et Symfony tire PHP.
60
+
61
+ ## Statut (construction pilier par pilier)
62
+
63
+ - ✅ **ORM** (via `oktopios-orm`) — modèles décorés, migrations, query-builder
64
+ - ✅ **Configuration** par environnement (`.env.local`, `.env.prod`)
65
+ - ⏳ Routing + contrôleurs (serveur HTTP)
66
+ - ⏳ Moteur de templates (vues)
67
+ - ⏳ Formulaires / validation, Auth, CLI / scaffolding
68
+
69
+ ## Structure
70
+
71
+ ```
72
+ oktopios-framework/
73
+ ├── oktopios_framework/
74
+ │ ├── config.okp # Config : chargement .env.<env>
75
+ │ └── (routing.okp, view.okp … à venir)
76
+ └── examples/
77
+ ├── blog.okp # démo ORM + config
78
+ ├── .env.local # config développement
79
+ └── .env.prod # config production
80
+ ```
81
+
82
+ ## Démarrage
83
+
84
+ ```bash
85
+ pip install oktopios-framework
86
+ okp examples/blog.okp # depuis la racine du projet
87
+ ```
88
+
89
+ ```okp
90
+ use "oktopios_orm/orm.okp"
91
+ use "oktopios_framework/config.okp"
92
+
93
+ var cfg = new Config()
94
+ cfg.load("local") // lit .env.local ("prod" -> .env.prod)
95
+ print(cfg.get("DB_PATH"))
96
+
97
+ @Entity("articles")
98
+ class Article {
99
+ @Id
100
+ var id: int
101
+ @Column("titre")
102
+ var title: string
103
+ }
104
+ // ... Schema.migrate / Repo / Query fournis par oktopios-orm
105
+ ```
106
+
107
+ ## Configuration `.env` (façon Symfony)
108
+
109
+ `.env.local` (développement) et `.env.prod` (production) contiennent des paires
110
+ `CLE=VALEUR`. `Config.load("local")` / `Config.load("prod")` chargent le fichier
111
+ correspondant. Ne mettez jamais de secrets réels dans un `.env.prod` versionné.
112
+
113
+ ## Licence
114
+
115
+ MIT © Mouanwiya Ali Soule
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ oktopios_framework/__init__.py
5
+ oktopios_framework/config.okp
6
+ oktopios_framework.egg-info/PKG-INFO
7
+ oktopios_framework.egg-info/SOURCES.txt
8
+ oktopios_framework.egg-info/dependency_links.txt
9
+ oktopios_framework.egg-info/requires.txt
10
+ oktopios_framework.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ oktopios-orm>=0.1.0
@@ -0,0 +1 @@
1
+ oktopios_framework
@@ -0,0 +1,25 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "oktopios-framework"
7
+ version = "0.1.0"
8
+ description = "Framework web MVC pour le langage Oktopios (facon Django / Symfony) — ORM, config par environnement, et plus"
9
+ readme = "README.md"
10
+ license = { file = "LICENSE" }
11
+ requires-python = ">=3.8"
12
+ authors = [{ name = "Mouanwiya Ali Soule" }]
13
+ keywords = ["oktopios", "framework", "web", "mvc", "orm", "okp"]
14
+ dependencies = ["oktopios-orm>=0.1.0"]
15
+
16
+ [project.urls]
17
+ Homepage = "https://github.com/ALISOULEMOUANWIYA/oktopios-framework"
18
+ ORM = "https://pypi.org/project/oktopios-orm/"
19
+ Language = "https://pypi.org/project/oktopios/"
20
+
21
+ [tool.setuptools.packages.find]
22
+ include = ["oktopios_framework*"]
23
+
24
+ [tool.setuptools.package-data]
25
+ "oktopios_framework" = ["*.okp"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+