daedaluspy 1.0.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.
Files changed (67) hide show
  1. daedaluspy-1.0.0/LICENSE +21 -0
  2. daedaluspy-1.0.0/PKG-INFO +179 -0
  3. daedaluspy-1.0.0/README.md +141 -0
  4. daedaluspy-1.0.0/daedaluspy/__init__.py +6 -0
  5. daedaluspy-1.0.0/daedaluspy/__main__.py +10 -0
  6. daedaluspy-1.0.0/daedaluspy/cli.py +172 -0
  7. daedaluspy-1.0.0/daedaluspy/data_lib/__init__.py +38 -0
  8. daedaluspy-1.0.0/daedaluspy/data_lib/data/__init__.py +0 -0
  9. daedaluspy-1.0.0/daedaluspy/data_lib/data/base_template.py +370 -0
  10. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_aws/__init__.py +0 -0
  11. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_aws/template/__init__.py +0 -0
  12. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_aws/template/container_files/__init__.py +0 -0
  13. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_aws/template/container_files/entity_template.py +20 -0
  14. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_azure/__init__.py +0 -0
  15. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_azure/template/__init__.py +0 -0
  16. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_azure/template/container_files/__init__.py +0 -0
  17. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_azure/template/container_files/entity_template.py +21 -0
  18. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_google/__init__.py +0 -0
  19. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_google/template/__init__.py +0 -0
  20. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_google/template/container_files/__init__.py +0 -0
  21. daedaluspy-1.0.0/daedaluspy/data_lib/data/cloud_google/template/container_files/entity_template.py +20 -0
  22. daedaluspy-1.0.0/daedaluspy/data_lib/generator/__init__.py +14 -0
  23. daedaluspy-1.0.0/daedaluspy/data_lib/generator/data_entity_oop.py +108 -0
  24. daedaluspy-1.0.0/daedaluspy/data_lib/generator/library_generator.py +190 -0
  25. daedaluspy-1.0.0/daedaluspy/data_lib/generator/service_generator_oop.py +64 -0
  26. daedaluspy-1.0.0/daedaluspy/data_lib/generator/setup_file.py +168 -0
  27. daedaluspy-1.0.0/daedaluspy/data_lib/generator/templates/__init__.py +0 -0
  28. daedaluspy-1.0.0/daedaluspy/data_lib/generator/templates/config_templates.py +181 -0
  29. daedaluspy-1.0.0/daedaluspy/data_lib/generator/templates/data_quality_templates.py +347 -0
  30. daedaluspy-1.0.0/daedaluspy/data_lib/generator/templates/logger_templates.py +730 -0
  31. daedaluspy-1.0.0/daedaluspy/data_lib/generator/templates/setup_template.py +0 -0
  32. daedaluspy-1.0.0/daedaluspy/data_lib/services/__init__.py +0 -0
  33. daedaluspy-1.0.0/daedaluspy/data_lib/services/generator/corporate_service_generator.py +0 -0
  34. daedaluspy-1.0.0/daedaluspy/data_lib/services/template/__init__.py +0 -0
  35. daedaluspy-1.0.0/daedaluspy/data_lib/services/template/apis/__init__.py +0 -0
  36. daedaluspy-1.0.0/daedaluspy/data_lib/services/template/apis/auth_template.py +32 -0
  37. daedaluspy-1.0.0/daedaluspy/data_lib/services/template/apis/models_template.py +14 -0
  38. daedaluspy-1.0.0/daedaluspy/data_lib/services/template/apis/service_template.py +43 -0
  39. daedaluspy-1.0.0/daedaluspy/data_lib/services/template/database/__init__.py +0 -0
  40. daedaluspy-1.0.0/daedaluspy/data_lib/services/template/database/service_template.py +135 -0
  41. daedaluspy-1.0.0/daedaluspy/data_pipeline/__init__.py +0 -0
  42. daedaluspy-1.0.0/daedaluspy/data_pipeline/generator/__init__.py +8 -0
  43. daedaluspy-1.0.0/daedaluspy/data_pipeline/generator/pipeline_generator_oop.py +114 -0
  44. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/__init__.py +35 -0
  45. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/complete_templates.py +87 -0
  46. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/base_template.py +67 -0
  47. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/config_template.py +64 -0
  48. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/flowbuilder_template.py +112 -0
  49. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/gitignore_template.py +163 -0
  50. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/init_template.py +33 -0
  51. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/main_template.py +43 -0
  52. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/readme_template.py +275 -0
  53. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/requirements_template.py +13 -0
  54. daedaluspy-1.0.0/daedaluspy/data_pipeline/template/templates/steps_template.py +187 -0
  55. daedaluspy-1.0.0/daedaluspy.egg-info/PKG-INFO +179 -0
  56. daedaluspy-1.0.0/daedaluspy.egg-info/SOURCES.txt +65 -0
  57. daedaluspy-1.0.0/daedaluspy.egg-info/dependency_links.txt +1 -0
  58. daedaluspy-1.0.0/daedaluspy.egg-info/entry_points.txt +2 -0
  59. daedaluspy-1.0.0/daedaluspy.egg-info/requires.txt +6 -0
  60. daedaluspy-1.0.0/daedaluspy.egg-info/top_level.txt +1 -0
  61. daedaluspy-1.0.0/pyproject.toml +65 -0
  62. daedaluspy-1.0.0/setup.cfg +4 -0
  63. daedaluspy-1.0.0/setup.py +50 -0
  64. daedaluspy-1.0.0/tests/test_cli_help.py +6 -0
  65. daedaluspy-1.0.0/tests/test_generate_service.py +20 -0
  66. daedaluspy-1.0.0/tests/test_import_daedaluspy.py +6 -0
  67. daedaluspy-1.0.0/tests/test_version.py +3 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Golden Valley
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,179 @@
1
+ Metadata-Version: 2.4
2
+ Name: daedaluspy
3
+ Version: 1.0.0
4
+ Summary: Code generation toolkit for data engineering
5
+ Home-page: https://github.com/Golden-Valley-Consulting/DaedalusPy
6
+ Author: Golden Valley Consulting LTDA
7
+ Author-email: Golden Valley Consulting LTDA <contato@goldenvalleyc.com>
8
+ License-Expression: MIT
9
+ Project-URL: Homepage, https://github.com/Golden-Valley-Consulting/daedaluspy
10
+ Project-URL: Documentation, https://daedaluspy.readthedocs.io
11
+ Project-URL: Repository, https://github.com/Golden-Valley-Consulting/daedaluspy
12
+ Project-URL: Bug Tracker, https://github.com/Golden-Valley-Consulting/daedaluspy/issues
13
+ Keywords: code-generation,data-engineering,python,cli
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.7
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Software Development :: Code Generators
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+ Requires-Python: >=3.7
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=6.0; extra == "dev"
31
+ Requires-Dist: black; extra == "dev"
32
+ Requires-Dist: flake8; extra == "dev"
33
+ Requires-Dist: mypy; extra == "dev"
34
+ Dynamic: author
35
+ Dynamic: home-page
36
+ Dynamic: license-file
37
+ Dynamic: requires-python
38
+
39
+ # DaedalusPy
40
+
41
+ ## Visão Geral
42
+ DaedalusPy é um framework open-source para engenharia de dados, criado para acelerar a construção de bibliotecas de dados corporativas e pipelines analíticos modulares, com foco em padronização, governança, reuso e produtividade em ambientes multi-cloud.
43
+
44
+ ## Objetivos
45
+ - Padronizar a modelagem, transformação e integração de dados em projetos analíticos.
46
+ - Centralizar entidades, domínios, validações e funções reutilizáveis.
47
+ - Facilitar a construção, orquestração e manutenção de pipelines robustos e escaláveis.
48
+ - Promover governança, versionamento e documentação centralizada.
49
+
50
+ ## Macro Entregas (Explicação Detalhada)
51
+
52
+ 1. **Geração de Bibliotecas de Dados**
53
+ - **O que faz:** Cria a estrutura base de uma biblioteca de dados corporativa, centralizando entidades, configurações, serviços e ferramentas reutilizáveis.
54
+ - **Comando:**
55
+ ```bash
56
+ python -m daedaluspy.cli create-lib <nome> [--dataname <entidade>] [--systemname <domínio>]
57
+ ```
58
+ - **Como funciona:** Gera uma pasta `<libname>/` com subpastas para `config/`, `data/`, `service/`, `tools/` e arquivos essenciais. Isso garante que todo projeto siga o mesmo padrão e facilite o reuso entre times.
59
+ - **Quando usar:** Sempre que iniciar um novo domínio de dados ou projeto analítico.
60
+
61
+ 2. **Geração de Entidades de Dados**
62
+ - **O que faz:** Cria classes de entidades de negócio (ex: ClienteEntity) já com estrutura OOP, enums, validações e templates prontos para uso.
63
+ - **Comando:**
64
+ ```bash
65
+ python -m daedaluspy.cli create-data <ClasseEntidade> --tier <raw|clear|model> --cloud <azure|aws|google> [--columns ...]
66
+ ```
67
+ - **Como funciona:** Gera arquivos Python na estrutura correta, com métodos, validações e documentação, prontos para serem usados em pipelines e serviços.
68
+ - **Quando usar:** Sempre que precisar modelar uma nova entidade de dados, seja para ingestão, transformação ou consumo.
69
+
70
+ 3. **Geração de Serviços**
71
+ - **O que faz:** Cria serviços de integração (ex: APIs, bancos de dados) já integrados à biblioteca, seguindo padrões de OOP e enums.
72
+ - **Comando:**
73
+ ```bash
74
+ python -m daedaluspy.cli create-service <NomeServico> --type <api|database> [--models ...]
75
+ ```
76
+ - **Como funciona:** Gera a estrutura de serviço, facilitando integrações externas e padronizando o acesso a dados.
77
+ - **Quando usar:** Sempre que precisar integrar uma nova fonte ou destino de dados ao seu ecossistema.
78
+
79
+ 4. **Geração de Pipelines**
80
+ - **O que faz:** Cria a estrutura de um pipeline modular, pronto para orquestração, sem subpastas desnecessárias e com todos os arquivos essenciais (main, config, steps, etc).
81
+ - **Comando:**
82
+ ```bash
83
+ python -m daedaluspy.cli create-pipeline <domínio> <entidade> --tier <raw|clear|model> --output <pasta> [--template_type ...] [--lib_name ...] [--cloud_provider ...] [--entity_target ...] [--entity_target_class ...]
84
+ ```
85
+ - **Como funciona:** Gera uma pasta do pipeline diretamente no local especificado, pronta para receber a lógica de negócio e ser executada.
86
+ - **Quando usar:** Sempre que precisar criar um novo fluxo de ingestão, transformação ou entrega de dados, reaproveitando entidades e serviços da biblioteca.
87
+
88
+ ---
89
+
90
+ Cada comando do DaedalusPy foi desenhado para garantir padronização, acelerar o desenvolvimento e permitir que o engenheiro de dados foque no que realmente importa: a lógica de negócio e a entrega de valor. O CLI não substitui o trabalho do desenvolvedor, mas elimina o retrabalho estrutural e direciona o padrão arquitetural do projeto.
91
+
92
+ ## Casos de Uso Reais
93
+
94
+ - **Criar biblioteca de dados corporativa:**
95
+ ```bash
96
+ python -m daedaluspy.cli create-lib corp_data
97
+ ```
98
+
99
+ - **Adicionar entidade de negócio:**
100
+ ```bash
101
+ python -m daedaluspy.cli create-data ClienteEntity --tier raw --cloud azure
102
+ ```
103
+
104
+ - **Adicionar serviço de integração:**
105
+ ```bash
106
+ python -m daedaluspy.cli create-service Salesforce --type api
107
+ ```
108
+
109
+ - **Gerar pipeline para domínio/entidade/camada:**
110
+ ```bash
111
+ python -m daedaluspy.cli create-pipeline vendas ClienteEntity --tier clear --output .
112
+ ```
113
+
114
+ ## Estrutura Gerada (Exemplo Real)
115
+
116
+ ```
117
+ corp_data/
118
+ config/
119
+ __init__.py
120
+ config.py
121
+ data/
122
+ raw/
123
+ __init__.py
124
+ ClienteEntity.py
125
+ clear/
126
+ model/
127
+ service/
128
+ salesforce/
129
+ __init__.py
130
+ tools/
131
+ logger/
132
+ __init__.py
133
+ __init__.py
134
+ README.md
135
+ setup.py
136
+
137
+ vendas_ClienteEntity_clear/
138
+ __init__.py
139
+ base.py
140
+ config.py
141
+ flowbuilder.py
142
+ main.py
143
+ README.md
144
+ requirements.txt
145
+ steps.py
146
+ ```
147
+
148
+ ## Fluxo de Trabalho Típico
149
+
150
+ 1. **Crie a biblioteca:**
151
+ `python -m daedaluspy.cli create-lib corp_data`
152
+ 2. **Adicione entidades e serviços:**
153
+ `python -m daedaluspy.cli create-data ClienteEntity --tier raw --cloud azure`
154
+ `python -m daedaluspy.cli create-service Salesforce --type api`
155
+ 3. **Gere o pipeline:**
156
+ `python -m daedaluspy.cli create-pipeline vendas ClienteEntity --tier clear --output .`
157
+ 4. **Implemente lógica e execute.**
158
+
159
+ ## Integração e Extensibilidade
160
+ - Suporte a múltiplos clouds e bancos.
161
+ - Templates customizáveis.
162
+ - Código OOP, enums e tipagem forte.
163
+ - CLI extensível para novos comandos.
164
+
165
+ ## Melhores Práticas
166
+ - Use o CLI para gerar a estrutura base e arquivos padronizados.
167
+ - Implemente a lógica de negócio, transformações e integrações nos arquivos gerados.
168
+ - Siga os padrões de OOP, enums e templates definidos pelo framework.
169
+ - Evite alterar manualmente a estrutura dos arquivos base gerados pelo CLI (exceto para lógica de negócio).
170
+ - Mantenha a biblioteca centralizada e versionada.
171
+ - Use templates para padronizar lógica e documentação.
172
+
173
+ ## Público-Alvo
174
+ - Engenheiros e arquitetos de dados
175
+ - Times de analytics, BI e governança
176
+ - Projetos que exigem padronização, reuso e automação
177
+
178
+ ## Licença
179
+ MIT
@@ -0,0 +1,141 @@
1
+ # DaedalusPy
2
+
3
+ ## Visão Geral
4
+ DaedalusPy é um framework open-source para engenharia de dados, criado para acelerar a construção de bibliotecas de dados corporativas e pipelines analíticos modulares, com foco em padronização, governança, reuso e produtividade em ambientes multi-cloud.
5
+
6
+ ## Objetivos
7
+ - Padronizar a modelagem, transformação e integração de dados em projetos analíticos.
8
+ - Centralizar entidades, domínios, validações e funções reutilizáveis.
9
+ - Facilitar a construção, orquestração e manutenção de pipelines robustos e escaláveis.
10
+ - Promover governança, versionamento e documentação centralizada.
11
+
12
+ ## Macro Entregas (Explicação Detalhada)
13
+
14
+ 1. **Geração de Bibliotecas de Dados**
15
+ - **O que faz:** Cria a estrutura base de uma biblioteca de dados corporativa, centralizando entidades, configurações, serviços e ferramentas reutilizáveis.
16
+ - **Comando:**
17
+ ```bash
18
+ python -m daedaluspy.cli create-lib <nome> [--dataname <entidade>] [--systemname <domínio>]
19
+ ```
20
+ - **Como funciona:** Gera uma pasta `<libname>/` com subpastas para `config/`, `data/`, `service/`, `tools/` e arquivos essenciais. Isso garante que todo projeto siga o mesmo padrão e facilite o reuso entre times.
21
+ - **Quando usar:** Sempre que iniciar um novo domínio de dados ou projeto analítico.
22
+
23
+ 2. **Geração de Entidades de Dados**
24
+ - **O que faz:** Cria classes de entidades de negócio (ex: ClienteEntity) já com estrutura OOP, enums, validações e templates prontos para uso.
25
+ - **Comando:**
26
+ ```bash
27
+ python -m daedaluspy.cli create-data <ClasseEntidade> --tier <raw|clear|model> --cloud <azure|aws|google> [--columns ...]
28
+ ```
29
+ - **Como funciona:** Gera arquivos Python na estrutura correta, com métodos, validações e documentação, prontos para serem usados em pipelines e serviços.
30
+ - **Quando usar:** Sempre que precisar modelar uma nova entidade de dados, seja para ingestão, transformação ou consumo.
31
+
32
+ 3. **Geração de Serviços**
33
+ - **O que faz:** Cria serviços de integração (ex: APIs, bancos de dados) já integrados à biblioteca, seguindo padrões de OOP e enums.
34
+ - **Comando:**
35
+ ```bash
36
+ python -m daedaluspy.cli create-service <NomeServico> --type <api|database> [--models ...]
37
+ ```
38
+ - **Como funciona:** Gera a estrutura de serviço, facilitando integrações externas e padronizando o acesso a dados.
39
+ - **Quando usar:** Sempre que precisar integrar uma nova fonte ou destino de dados ao seu ecossistema.
40
+
41
+ 4. **Geração de Pipelines**
42
+ - **O que faz:** Cria a estrutura de um pipeline modular, pronto para orquestração, sem subpastas desnecessárias e com todos os arquivos essenciais (main, config, steps, etc).
43
+ - **Comando:**
44
+ ```bash
45
+ python -m daedaluspy.cli create-pipeline <domínio> <entidade> --tier <raw|clear|model> --output <pasta> [--template_type ...] [--lib_name ...] [--cloud_provider ...] [--entity_target ...] [--entity_target_class ...]
46
+ ```
47
+ - **Como funciona:** Gera uma pasta do pipeline diretamente no local especificado, pronta para receber a lógica de negócio e ser executada.
48
+ - **Quando usar:** Sempre que precisar criar um novo fluxo de ingestão, transformação ou entrega de dados, reaproveitando entidades e serviços da biblioteca.
49
+
50
+ ---
51
+
52
+ Cada comando do DaedalusPy foi desenhado para garantir padronização, acelerar o desenvolvimento e permitir que o engenheiro de dados foque no que realmente importa: a lógica de negócio e a entrega de valor. O CLI não substitui o trabalho do desenvolvedor, mas elimina o retrabalho estrutural e direciona o padrão arquitetural do projeto.
53
+
54
+ ## Casos de Uso Reais
55
+
56
+ - **Criar biblioteca de dados corporativa:**
57
+ ```bash
58
+ python -m daedaluspy.cli create-lib corp_data
59
+ ```
60
+
61
+ - **Adicionar entidade de negócio:**
62
+ ```bash
63
+ python -m daedaluspy.cli create-data ClienteEntity --tier raw --cloud azure
64
+ ```
65
+
66
+ - **Adicionar serviço de integração:**
67
+ ```bash
68
+ python -m daedaluspy.cli create-service Salesforce --type api
69
+ ```
70
+
71
+ - **Gerar pipeline para domínio/entidade/camada:**
72
+ ```bash
73
+ python -m daedaluspy.cli create-pipeline vendas ClienteEntity --tier clear --output .
74
+ ```
75
+
76
+ ## Estrutura Gerada (Exemplo Real)
77
+
78
+ ```
79
+ corp_data/
80
+ config/
81
+ __init__.py
82
+ config.py
83
+ data/
84
+ raw/
85
+ __init__.py
86
+ ClienteEntity.py
87
+ clear/
88
+ model/
89
+ service/
90
+ salesforce/
91
+ __init__.py
92
+ tools/
93
+ logger/
94
+ __init__.py
95
+ __init__.py
96
+ README.md
97
+ setup.py
98
+
99
+ vendas_ClienteEntity_clear/
100
+ __init__.py
101
+ base.py
102
+ config.py
103
+ flowbuilder.py
104
+ main.py
105
+ README.md
106
+ requirements.txt
107
+ steps.py
108
+ ```
109
+
110
+ ## Fluxo de Trabalho Típico
111
+
112
+ 1. **Crie a biblioteca:**
113
+ `python -m daedaluspy.cli create-lib corp_data`
114
+ 2. **Adicione entidades e serviços:**
115
+ `python -m daedaluspy.cli create-data ClienteEntity --tier raw --cloud azure`
116
+ `python -m daedaluspy.cli create-service Salesforce --type api`
117
+ 3. **Gere o pipeline:**
118
+ `python -m daedaluspy.cli create-pipeline vendas ClienteEntity --tier clear --output .`
119
+ 4. **Implemente lógica e execute.**
120
+
121
+ ## Integração e Extensibilidade
122
+ - Suporte a múltiplos clouds e bancos.
123
+ - Templates customizáveis.
124
+ - Código OOP, enums e tipagem forte.
125
+ - CLI extensível para novos comandos.
126
+
127
+ ## Melhores Práticas
128
+ - Use o CLI para gerar a estrutura base e arquivos padronizados.
129
+ - Implemente a lógica de negócio, transformações e integrações nos arquivos gerados.
130
+ - Siga os padrões de OOP, enums e templates definidos pelo framework.
131
+ - Evite alterar manualmente a estrutura dos arquivos base gerados pelo CLI (exceto para lógica de negócio).
132
+ - Mantenha a biblioteca centralizada e versionada.
133
+ - Use templates para padronizar lógica e documentação.
134
+
135
+ ## Público-Alvo
136
+ - Engenheiros e arquitetos de dados
137
+ - Times de analytics, BI e governança
138
+ - Projetos que exigem padronização, reuso e automação
139
+
140
+ ## Licença
141
+ MIT
@@ -0,0 +1,6 @@
1
+ """
2
+ DaedalusPy - Data Engineering Library Code Generator
3
+ """
4
+
5
+ __version__ = "1.0.0"
6
+ __author__ = "Golden Valley Consulting"
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ DaedalusPy - Toolkit de geração de código para engenharia de dados
4
+ Entry point para execução via python -m daedaluspy
5
+ """
6
+
7
+ from .cli import main
8
+
9
+ if __name__ == "__main__":
10
+ main()
@@ -0,0 +1,172 @@
1
+ from daedaluspy.data_pipeline.template.complete_templates import get_template_set
2
+ from daedaluspy.data_pipeline.generator.pipeline_generator_oop import PipelineGenerator, PipelineTier, CloudProvider as PipelineCloudProvider
3
+ import argparse
4
+ import sys
5
+ from enum import Enum
6
+ from daedaluspy.data_lib.generator.library_generator import LibraryGenerator
7
+ from daedaluspy.data_lib.generator.data_entity_oop import DataEntityGenerator, CloudProvider
8
+ from daedaluspy.data_lib.generator.service_generator_oop import ServiceGenerator
9
+
10
+ class Tier(Enum):
11
+ RAW = "raw"
12
+ CLEAR = "clear"
13
+ MODEL = "model"
14
+
15
+ class ServiceType(Enum):
16
+ API = "api"
17
+ DATABASE = "database"
18
+
19
+ class Command:
20
+ def execute(self, args):
21
+ raise NotImplementedError
22
+
23
+ class CreateLibCommand(Command):
24
+ def execute(self, args):
25
+ generator = LibraryGenerator(
26
+ name=args.name,
27
+ data_name=args.dataname,
28
+ system_name=args.systemname
29
+ )
30
+ generator.generate()
31
+ print(f"Estrutura da biblioteca '{args.name}' criada com sucesso!")
32
+
33
+ class CreateDataCommand(Command):
34
+ def execute(self, args):
35
+ if not args.tier:
36
+ print("Erro: --tier é obrigatório (raw, clear, model)")
37
+ sys.exit(1)
38
+ tier = Tier(args.tier)
39
+ generator = DataEntityGenerator(
40
+ classname=args.name,
41
+ tier=tier,
42
+ cloud_provider=CloudProvider(args.cloud),
43
+ columns=args.columns or [],
44
+ output_path=args.output or f"./{args.name.lower()}/{tier.value}"
45
+ )
46
+ generator.generate()
47
+ print(f"Entidade '{args.name}' criada com sucesso na camada {tier.value}.")
48
+
49
+ class CreateServiceCommand(Command):
50
+ def execute(self, args):
51
+ service_type = ServiceType(args.type)
52
+ # Permite argumentos opcionais futuros
53
+ extra_kwargs = {}
54
+ if hasattr(args, 'output') and args.output:
55
+ extra_kwargs['output_path'] = args.output
56
+ # Converter models de lista de strings JSON para lista de dicts
57
+ import json
58
+ models = []
59
+ if args.models:
60
+ for m in args.models:
61
+ if isinstance(m, dict):
62
+ models.append(m)
63
+ else:
64
+ try:
65
+ models.append(json.loads(m))
66
+ except Exception:
67
+ pass
68
+ generator = ServiceGenerator(
69
+ service_name=args.name,
70
+ service_type=service_type,
71
+ models=models,
72
+ **extra_kwargs
73
+ )
74
+ generator.generate()
75
+ print(f"Serviço '{args.name}' ({service_type.value}) criado com sucesso.")
76
+
77
+ class CreatePipelineCommand(Command):
78
+ def execute(self, args):
79
+ tier = PipelineTier(args.tier)
80
+ # Permitir todos os parâmetros opcionais igual ao create-pipeline-project
81
+ def enum_from_value(enum_cls, value):
82
+ for e in enum_cls:
83
+ if value == e.value or value == e.name or value.upper() == e.name:
84
+ return e
85
+ raise ValueError(f"{value} não é válido para {enum_cls.__name__}")
86
+
87
+ generator = PipelineGenerator(
88
+ system_name=args.system_name,
89
+ dataname=args.dataname,
90
+ tier=tier,
91
+ output_path=args.output if args.output else ".",
92
+ template_type=getattr(args, "template_type", "all"),
93
+ lib_name=getattr(args, "lib_name", "atlaspy"),
94
+ cloud_provider=enum_from_value(PipelineCloudProvider, getattr(args, "cloud_provider", "cloud_azure")),
95
+ entity_target=getattr(args, "entity_target", None),
96
+ entity_target_class=getattr(args, "entity_target_class", None)
97
+ )
98
+ generator.generate()
99
+ print(f"Pipeline '{args.system_name}/{args.dataname}/{tier.value}' criado com sucesso.")
100
+
101
+
102
+ def main():
103
+ parser = argparse.ArgumentParser(description="DaedalusPy CLI")
104
+ subparsers = parser.add_subparsers(dest="command")
105
+ # create pipeline project (completo)
106
+ parser_pipeline_project = subparsers.add_parser("create-pipeline-project")
107
+ parser_pipeline_project.add_argument("system_name")
108
+ parser_pipeline_project.add_argument("dataname")
109
+ parser_pipeline_project.add_argument("tier", choices=["raw", "clear", "model"])
110
+ parser_pipeline_project.add_argument("--output", "-o", default=".")
111
+ parser_pipeline_project.add_argument("--template-type", "-t", choices=["essential", "dev", "all"], default="all")
112
+ parser_pipeline_project.add_argument("--lib-name", default="atlaspy")
113
+ parser_pipeline_project.add_argument("--cloud-provider", default="cloud_azure")
114
+ parser_pipeline_project.add_argument("--entity-target", default="azure_sql_database")
115
+ parser_pipeline_project.add_argument("--entity-target-class", default="AzureSQLDatabase")
116
+
117
+ # create lib
118
+ parser_lib = subparsers.add_parser("create-lib")
119
+ parser_lib.add_argument("name")
120
+ parser_lib.add_argument("--dataname")
121
+ parser_lib.add_argument("--systemname")
122
+
123
+ # create data
124
+ parser_data = subparsers.add_parser("create-data")
125
+ parser_data.add_argument("name")
126
+ parser_data.add_argument("--tier", required=True, choices=[t.value for t in Tier])
127
+ parser_data.add_argument("--cloud", required=True)
128
+ parser_data.add_argument("--extension")
129
+ parser_data.add_argument("--columns", nargs="*")
130
+ parser_data.add_argument("--imports")
131
+ parser_data.add_argument("--read_code")
132
+ parser_data.add_argument("--write_code")
133
+ parser_data.add_argument("--output")
134
+ parser_data.add_argument("--lib")
135
+
136
+
137
+ # create service
138
+ parser_service = subparsers.add_parser("create-service")
139
+ parser_service.add_argument("name")
140
+ parser_service.add_argument("--type", required=True, choices=[t.value for t in ServiceType])
141
+ parser_service.add_argument("--models", nargs="*")
142
+ parser_service.add_argument("--output")
143
+
144
+ # create pipeline
145
+ parser_pipeline = subparsers.add_parser("create-pipeline")
146
+ parser_pipeline.add_argument("system_name")
147
+ parser_pipeline.add_argument("dataname")
148
+ parser_pipeline.add_argument("--tier", required=True, choices=[t.value for t in PipelineTier])
149
+ parser_pipeline.add_argument("--output", default=".")
150
+ parser_pipeline.add_argument("--template_type", default="all")
151
+ parser_pipeline.add_argument("--lib_name", default="atlaspy")
152
+ parser_pipeline.add_argument("--cloud_provider", default="cloud_azure")
153
+ parser_pipeline.add_argument("--entity_target", default="azure_sql_database")
154
+ parser_pipeline.add_argument("--entity_target_class", default="AzureSQLDatabase")
155
+
156
+ args = parser.parse_args()
157
+
158
+
159
+ commands = {
160
+ "create-lib": CreateLibCommand(),
161
+ "create-data": CreateDataCommand(),
162
+ "create-service": CreateServiceCommand(),
163
+ "create-pipeline": CreatePipelineCommand(),
164
+ }
165
+
166
+ if args.command in commands:
167
+ commands[args.command].execute(args)
168
+ else:
169
+ parser.print_help()
170
+
171
+ if __name__ == "__main__":
172
+ main()
@@ -0,0 +1,38 @@
1
+ """
2
+ DaedalusPy - Framework para Engenharia de Dados Multi-Cloud
3
+
4
+ Este módulo fornece ferramentas para automatizar e padronizar o desenvolvimento
5
+ de soluções de engenharia de dados em múltiplas plataformas cloud.
6
+
7
+ Módulos principais:
8
+ - data: Biblioteca para templates e estruturas de dados
9
+ - generator: Biblioteca para geração de entidades e integrações
10
+ - services: Biblioteca para templates de serviços
11
+
12
+ Exemplo de uso:
13
+ from data_lib.generator.data_entity import generate_entity_file
14
+
15
+ generate_entity_file(
16
+ cloud_provider="azure",
17
+ classname="MinhaEntidade",
18
+ file_extension="parquet",
19
+ columns=['col1', 'col2'],
20
+ imports="import pandas as pd",
21
+ read_code="return pd.read_parquet(buffer)",
22
+ write_code="data.to_parquet(buffer, index=False)",
23
+ output_path="./output"
24
+ )
25
+
26
+ Autor: Golden Valley Consulting LTDA
27
+ Licença: MIT
28
+ """
29
+
30
+ __version__ = "1.0.0"
31
+ __author__ = "Golden Valley Consulting LTDA"
32
+
33
+ # Importações principais
34
+ from . import data
35
+ from . import generator
36
+ from . import services
37
+
38
+ __all__ = ['data', 'generator', 'services']
File without changes