apkpy 0.2.1__tar.gz → 0.2.2__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.
apkpy-0.2.2/PKG-INFO ADDED
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: apkpy
3
+ Version: 0.2.2
4
+ Summary: A simple framework to build Android apps using Python and CSS-like styling
5
+ Home-page: https://github.com/teu-usuario/apkpy
6
+ Author: Martim
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: click
13
+ Dynamic: author
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: home-page
18
+ Dynamic: requires-dist
19
+ Dynamic: requires-python
20
+ Dynamic: summary
21
+
22
+ # 🚀 ApkPy — Build Android Apps in Pure Python
23
+
24
+ **ApkPy** is an innovative and highly lightweight framework that enables you to build native Android applications using **only Python and CSS**.
25
+ Forget about the steep learning curve of Java/Kotlin or dealing with messy XML layouts. With ApkPy, you write simple Python code, and we **automatically generate a ready-to-compile Android Studio project (APK)**, complete with all native screens, styles, and behaviors!
26
+
27
+ ---
28
+
29
+ ## 🔥 Why use ApkPy?
30
+ - **⚡ Zero XML and Java:** Design your UI in Python. ApkPy magically converts everything into native Android Java and XML code!
31
+ - **📱 100% Native Components:** No slow WebViews here. Your buttons and text inputs are real, native Android UI elements (Activity, EditText, Button), guaranteeing flawless performance.
32
+ - **🎨 CSS-Like Styling:** Style your app using familiar CSS-inspired syntax right inside your Python file. We translate and generate all the Android `.xml` drawables for complex properties like custom backgrounds, colors, and even `border-radius`.
33
+ - **💻 Real-Time Preview:** Test and interact with your app's design directly on your computer (Windows/Mac/Linux) via a desktop simulator window before compiling.
34
+ - **🔄 Multi-Screen Navigation:** Build complex applications with multiple screens (native Activities) and seamlessly travel between them with a single command.
35
+
36
+ ---
37
+
38
+ ## 📥 Installation
39
+
40
+ You can quickly install ApkPy using the `pip` package manager:
41
+
42
+ ```bash
43
+ pip install apkpy
44
+ ```
45
+
46
+ *(If you already have apkpy installed, get the brand new version using: `pip install --upgrade apkpy`)*
47
+
48
+ ---
49
+
50
+ ## 🛠️ CLI Commands
51
+
52
+ ApkPy comes with essential and easy-to-use commands for your terminal:
53
+
54
+ - **`apkpy start your_project_name`**
55
+ Creates a new folder with your chosen name and sets up the base template in a file named `writehere.py`. This is where you can immediately start designing all your screens.
56
+
57
+ - **`apkpy build`**
58
+ This is the magic command! It parses your `writehere.py` and bundles your visuals and flows into a `my_app_android.zip` file. Inside this zip, you'll find a **Complete Android Studio Project** (Java source code, Manifests, XML Layouts, and Drawables built from scratch). Just extract it, open it in Android Studio, and hit play to build your APK!
59
+
60
+ ---
61
+
62
+ ## 📖 How it Works (Code Examples)
63
+
64
+ Completely forget about thousands of Java files. An ApkPy app looks like this:
65
+
66
+ ### 1. Simple App: Modern Login Screen with Styles
67
+ ```python
68
+ from apkpy_lib.ui import Screen, button, label, inputs, run
69
+
70
+ # Create the screen
71
+ login_screen = Screen(id="login")
72
+
73
+ # Add elements and apply styles via ID
74
+ label("Welcome to ApkPy!", screen=login_screen)
75
+ inputs("Your username", type="text", screen=login_screen, id="user")
76
+ inputs("Your secret password", type="password", screen=login_screen, id="pass")
77
+
78
+ button("Enter App", screen=login_screen, id="btn_enter")
79
+
80
+ # Easily style using CSS (Supported: colors, border-radius, and borders)
81
+ style = """
82
+ btn_enter {
83
+ background-color: blue;
84
+ color: white;
85
+ border-radius: 20px;
86
+ border-color: none;
87
+ }
88
+ pass {
89
+ border-radius: 10px;
90
+ border-color: red;
91
+ }
92
+ """
93
+
94
+ # Launch the simulator on your PC
95
+ run(start_screen=login_screen)
96
+ ```
97
+
98
+ ### 2. Multi-Screen & Fluent Navigation
99
+ Navigating through menus has never been easier in an Android App:
100
+
101
+ ```python
102
+ from apkpy_lib.ui import Screen, button, label, run
103
+
104
+ # Screen 1
105
+ home = Screen(id="home")
106
+ label("This is the Main Menu", screen=home)
107
+ btn_next = button("Go to Settings", screen=home)
108
+
109
+ # Screen 2
110
+ settings = Screen(id="settings")
111
+ label("You can change settings here.", screen=settings)
112
+ btn_back = button("Go Back", screen=settings)
113
+
114
+ # Make buttons travel between screens (Translates to Java Intents)
115
+ home.on_click_navigate(button=btn_next, to=settings)
116
+ settings.on_click_navigate(button=btn_back, to=home)
117
+
118
+ run(start_screen=home)
119
+ ```
120
+
121
+ ---
122
+
123
+ ## 📦 Supported UI Elements
124
+
125
+ ApkPy already natively integrates fantastic Android UI tools into simple magic boxes that you can test with the `inputs()` command:
126
+
127
+ - `label("Just text")`: A basic display text indicator.
128
+ - `button("Action")`: A perfectly touch-responsive native button.
129
+ - `inputs(type="text")`: The standard input box for letters and numbers.
130
+ - `inputs(type="password")`: A secure input box hidden by asterisks (***).
131
+ - `inputs(type="search")`: A text box formatted for searching data (includes a native clear ✕ button).
132
+ - `inputs(type="checkbox")`: The classic box layout with a checkmark validation (✓).
133
+ - `inputs(type="radio", placeholder="Dog|Cat")`: Exclusive selection bubbles for choices. (Just write options separated by a pipe |).
134
+ - `inputs(type="range")`: A sliding bar controller to easily visualize and adjust values.
135
+
136
+ ---
137
+
138
+ > Condensing years of Android development study into mere minutes of your time. Create. Compile. Amaze with ApkPy!
apkpy-0.2.2/README.md ADDED
@@ -0,0 +1,117 @@
1
+ # 🚀 ApkPy — Build Android Apps in Pure Python
2
+
3
+ **ApkPy** is an innovative and highly lightweight framework that enables you to build native Android applications using **only Python and CSS**.
4
+ Forget about the steep learning curve of Java/Kotlin or dealing with messy XML layouts. With ApkPy, you write simple Python code, and we **automatically generate a ready-to-compile Android Studio project (APK)**, complete with all native screens, styles, and behaviors!
5
+
6
+ ---
7
+
8
+ ## 🔥 Why use ApkPy?
9
+ - **⚡ Zero XML and Java:** Design your UI in Python. ApkPy magically converts everything into native Android Java and XML code!
10
+ - **📱 100% Native Components:** No slow WebViews here. Your buttons and text inputs are real, native Android UI elements (Activity, EditText, Button), guaranteeing flawless performance.
11
+ - **🎨 CSS-Like Styling:** Style your app using familiar CSS-inspired syntax right inside your Python file. We translate and generate all the Android `.xml` drawables for complex properties like custom backgrounds, colors, and even `border-radius`.
12
+ - **💻 Real-Time Preview:** Test and interact with your app's design directly on your computer (Windows/Mac/Linux) via a desktop simulator window before compiling.
13
+ - **🔄 Multi-Screen Navigation:** Build complex applications with multiple screens (native Activities) and seamlessly travel between them with a single command.
14
+
15
+ ---
16
+
17
+ ## 📥 Installation
18
+
19
+ You can quickly install ApkPy using the `pip` package manager:
20
+
21
+ ```bash
22
+ pip install apkpy
23
+ ```
24
+
25
+ *(If you already have apkpy installed, get the brand new version using: `pip install --upgrade apkpy`)*
26
+
27
+ ---
28
+
29
+ ## 🛠️ CLI Commands
30
+
31
+ ApkPy comes with essential and easy-to-use commands for your terminal:
32
+
33
+ - **`apkpy start your_project_name`**
34
+ Creates a new folder with your chosen name and sets up the base template in a file named `writehere.py`. This is where you can immediately start designing all your screens.
35
+
36
+ - **`apkpy build`**
37
+ This is the magic command! It parses your `writehere.py` and bundles your visuals and flows into a `my_app_android.zip` file. Inside this zip, you'll find a **Complete Android Studio Project** (Java source code, Manifests, XML Layouts, and Drawables built from scratch). Just extract it, open it in Android Studio, and hit play to build your APK!
38
+
39
+ ---
40
+
41
+ ## 📖 How it Works (Code Examples)
42
+
43
+ Completely forget about thousands of Java files. An ApkPy app looks like this:
44
+
45
+ ### 1. Simple App: Modern Login Screen with Styles
46
+ ```python
47
+ from apkpy_lib.ui import Screen, button, label, inputs, run
48
+
49
+ # Create the screen
50
+ login_screen = Screen(id="login")
51
+
52
+ # Add elements and apply styles via ID
53
+ label("Welcome to ApkPy!", screen=login_screen)
54
+ inputs("Your username", type="text", screen=login_screen, id="user")
55
+ inputs("Your secret password", type="password", screen=login_screen, id="pass")
56
+
57
+ button("Enter App", screen=login_screen, id="btn_enter")
58
+
59
+ # Easily style using CSS (Supported: colors, border-radius, and borders)
60
+ style = """
61
+ btn_enter {
62
+ background-color: blue;
63
+ color: white;
64
+ border-radius: 20px;
65
+ border-color: none;
66
+ }
67
+ pass {
68
+ border-radius: 10px;
69
+ border-color: red;
70
+ }
71
+ """
72
+
73
+ # Launch the simulator on your PC
74
+ run(start_screen=login_screen)
75
+ ```
76
+
77
+ ### 2. Multi-Screen & Fluent Navigation
78
+ Navigating through menus has never been easier in an Android App:
79
+
80
+ ```python
81
+ from apkpy_lib.ui import Screen, button, label, run
82
+
83
+ # Screen 1
84
+ home = Screen(id="home")
85
+ label("This is the Main Menu", screen=home)
86
+ btn_next = button("Go to Settings", screen=home)
87
+
88
+ # Screen 2
89
+ settings = Screen(id="settings")
90
+ label("You can change settings here.", screen=settings)
91
+ btn_back = button("Go Back", screen=settings)
92
+
93
+ # Make buttons travel between screens (Translates to Java Intents)
94
+ home.on_click_navigate(button=btn_next, to=settings)
95
+ settings.on_click_navigate(button=btn_back, to=home)
96
+
97
+ run(start_screen=home)
98
+ ```
99
+
100
+ ---
101
+
102
+ ## 📦 Supported UI Elements
103
+
104
+ ApkPy already natively integrates fantastic Android UI tools into simple magic boxes that you can test with the `inputs()` command:
105
+
106
+ - `label("Just text")`: A basic display text indicator.
107
+ - `button("Action")`: A perfectly touch-responsive native button.
108
+ - `inputs(type="text")`: The standard input box for letters and numbers.
109
+ - `inputs(type="password")`: A secure input box hidden by asterisks (***).
110
+ - `inputs(type="search")`: A text box formatted for searching data (includes a native clear ✕ button).
111
+ - `inputs(type="checkbox")`: The classic box layout with a checkmark validation (✓).
112
+ - `inputs(type="radio", placeholder="Dog|Cat")`: Exclusive selection bubbles for choices. (Just write options separated by a pipe |).
113
+ - `inputs(type="range")`: A sliding bar controller to easily visualize and adjust values.
114
+
115
+ ---
116
+
117
+ > Condensing years of Android development study into mere minutes of your time. Create. Compile. Amaze with ApkPy!
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.4
2
+ Name: apkpy
3
+ Version: 0.2.2
4
+ Summary: A simple framework to build Android apps using Python and CSS-like styling
5
+ Home-page: https://github.com/teu-usuario/apkpy
6
+ Author: Martim
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: click
13
+ Dynamic: author
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: home-page
18
+ Dynamic: requires-dist
19
+ Dynamic: requires-python
20
+ Dynamic: summary
21
+
22
+ # 🚀 ApkPy — Build Android Apps in Pure Python
23
+
24
+ **ApkPy** is an innovative and highly lightweight framework that enables you to build native Android applications using **only Python and CSS**.
25
+ Forget about the steep learning curve of Java/Kotlin or dealing with messy XML layouts. With ApkPy, you write simple Python code, and we **automatically generate a ready-to-compile Android Studio project (APK)**, complete with all native screens, styles, and behaviors!
26
+
27
+ ---
28
+
29
+ ## 🔥 Why use ApkPy?
30
+ - **⚡ Zero XML and Java:** Design your UI in Python. ApkPy magically converts everything into native Android Java and XML code!
31
+ - **📱 100% Native Components:** No slow WebViews here. Your buttons and text inputs are real, native Android UI elements (Activity, EditText, Button), guaranteeing flawless performance.
32
+ - **🎨 CSS-Like Styling:** Style your app using familiar CSS-inspired syntax right inside your Python file. We translate and generate all the Android `.xml` drawables for complex properties like custom backgrounds, colors, and even `border-radius`.
33
+ - **💻 Real-Time Preview:** Test and interact with your app's design directly on your computer (Windows/Mac/Linux) via a desktop simulator window before compiling.
34
+ - **🔄 Multi-Screen Navigation:** Build complex applications with multiple screens (native Activities) and seamlessly travel between them with a single command.
35
+
36
+ ---
37
+
38
+ ## 📥 Installation
39
+
40
+ You can quickly install ApkPy using the `pip` package manager:
41
+
42
+ ```bash
43
+ pip install apkpy
44
+ ```
45
+
46
+ *(If you already have apkpy installed, get the brand new version using: `pip install --upgrade apkpy`)*
47
+
48
+ ---
49
+
50
+ ## 🛠️ CLI Commands
51
+
52
+ ApkPy comes with essential and easy-to-use commands for your terminal:
53
+
54
+ - **`apkpy start your_project_name`**
55
+ Creates a new folder with your chosen name and sets up the base template in a file named `writehere.py`. This is where you can immediately start designing all your screens.
56
+
57
+ - **`apkpy build`**
58
+ This is the magic command! It parses your `writehere.py` and bundles your visuals and flows into a `my_app_android.zip` file. Inside this zip, you'll find a **Complete Android Studio Project** (Java source code, Manifests, XML Layouts, and Drawables built from scratch). Just extract it, open it in Android Studio, and hit play to build your APK!
59
+
60
+ ---
61
+
62
+ ## 📖 How it Works (Code Examples)
63
+
64
+ Completely forget about thousands of Java files. An ApkPy app looks like this:
65
+
66
+ ### 1. Simple App: Modern Login Screen with Styles
67
+ ```python
68
+ from apkpy_lib.ui import Screen, button, label, inputs, run
69
+
70
+ # Create the screen
71
+ login_screen = Screen(id="login")
72
+
73
+ # Add elements and apply styles via ID
74
+ label("Welcome to ApkPy!", screen=login_screen)
75
+ inputs("Your username", type="text", screen=login_screen, id="user")
76
+ inputs("Your secret password", type="password", screen=login_screen, id="pass")
77
+
78
+ button("Enter App", screen=login_screen, id="btn_enter")
79
+
80
+ # Easily style using CSS (Supported: colors, border-radius, and borders)
81
+ style = """
82
+ btn_enter {
83
+ background-color: blue;
84
+ color: white;
85
+ border-radius: 20px;
86
+ border-color: none;
87
+ }
88
+ pass {
89
+ border-radius: 10px;
90
+ border-color: red;
91
+ }
92
+ """
93
+
94
+ # Launch the simulator on your PC
95
+ run(start_screen=login_screen)
96
+ ```
97
+
98
+ ### 2. Multi-Screen & Fluent Navigation
99
+ Navigating through menus has never been easier in an Android App:
100
+
101
+ ```python
102
+ from apkpy_lib.ui import Screen, button, label, run
103
+
104
+ # Screen 1
105
+ home = Screen(id="home")
106
+ label("This is the Main Menu", screen=home)
107
+ btn_next = button("Go to Settings", screen=home)
108
+
109
+ # Screen 2
110
+ settings = Screen(id="settings")
111
+ label("You can change settings here.", screen=settings)
112
+ btn_back = button("Go Back", screen=settings)
113
+
114
+ # Make buttons travel between screens (Translates to Java Intents)
115
+ home.on_click_navigate(button=btn_next, to=settings)
116
+ settings.on_click_navigate(button=btn_back, to=home)
117
+
118
+ run(start_screen=home)
119
+ ```
120
+
121
+ ---
122
+
123
+ ## 📦 Supported UI Elements
124
+
125
+ ApkPy already natively integrates fantastic Android UI tools into simple magic boxes that you can test with the `inputs()` command:
126
+
127
+ - `label("Just text")`: A basic display text indicator.
128
+ - `button("Action")`: A perfectly touch-responsive native button.
129
+ - `inputs(type="text")`: The standard input box for letters and numbers.
130
+ - `inputs(type="password")`: A secure input box hidden by asterisks (***).
131
+ - `inputs(type="search")`: A text box formatted for searching data (includes a native clear ✕ button).
132
+ - `inputs(type="checkbox")`: The classic box layout with a checkmark validation (✓).
133
+ - `inputs(type="radio", placeholder="Dog|Cat")`: Exclusive selection bubbles for choices. (Just write options separated by a pipe |).
134
+ - `inputs(type="range")`: A sliding bar controller to easily visualize and adjust values.
135
+
136
+ ---
137
+
138
+ > Condensing years of Android development study into mere minutes of your time. Create. Compile. Amaze with ApkPy!
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name='apkpy',
5
- version='0.2.1', # GARANTE que está 0.1.1
5
+ version='0.2.2', # GARANTE que está 0.1.1
6
6
  author='Martim',
7
7
  description='A simple framework to build Android apps using Python and CSS-like styling',
8
8
  long_description=open('README.md', encoding='utf-8').read(), # ADICIONA O ENCODING AQUI
apkpy-0.2.1/PKG-INFO DELETED
@@ -1,138 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: apkpy
3
- Version: 0.2.1
4
- Summary: A simple framework to build Android apps using Python and CSS-like styling
5
- Home-page: https://github.com/teu-usuario/apkpy
6
- Author: Martim
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.6
11
- Description-Content-Type: text/markdown
12
- Requires-Dist: click
13
- Dynamic: author
14
- Dynamic: classifier
15
- Dynamic: description
16
- Dynamic: description-content-type
17
- Dynamic: home-page
18
- Dynamic: requires-dist
19
- Dynamic: requires-python
20
- Dynamic: summary
21
-
22
- # 🚀 ApkPy — Cria as tuas Apps Android em Python
23
-
24
- **ApkPy** é uma framework inovadora e super leve que te permite construir aplicações Android nativas usando **apenas Python e CSS**.
25
- Esquece a complexidade de aprender Java/Kotlin ou de mexer em ficheiros XML confusos. Com o ApkPy, tu escreves código Python simples, e nós **geramos automaticamente um projeto Android Studio pronto a compilar num ficheiro APK**, completo com todos os ecrãs e estilos nativos.
26
-
27
- ---
28
-
29
- ## 🔥 Porquê usar o ApkPy?
30
- - **⚡ Zero XML e Java:** Desenha a tua interface em Python. O ApkPy converte tudo para código Java e XML nativo do Android magicamente!
31
- - **📱 Componentes 100% Nativos:** Nada de WebViews lentas. Os teus botões e caixas de texto são os verdadeiros elementos do Android (Activity, EditText, Button), garantindo uma performance impecável.
32
- - **🎨 Estilos CSS-Like:** Estiliza a tua app usando sintaxe inspirada em CSS diretamente no teu ficheiro Python. Nós traduzimos e geramos os `.xml` de Android para propriedades complexas como fundos, cores e até `border-radius`.
33
- - **💻 Preview em Tempo Real:** Testa e interage com o design da tua app diretamente no teu computador através de uma janela simuladora antes de compilar.
34
- - **🔄 Multi-Ecrãs:** Cria aplicações complexas com múltiplos ecrãs (Activities nativos) e viaja entre eles com um só comando.
35
-
36
- ---
37
-
38
- ## 📥 Instalação
39
-
40
- Podes instalar o ApkPy de forma rápida usando o gestor de pacotes `pip`:
41
-
42
- ```bash
43
- pip install apkpy
44
- ```
45
-
46
- *(Se já tens o apkpy instalado, acede à novíssima versão usando: `pip install --upgrade apkpy`)*
47
-
48
- ---
49
-
50
- ## 🛠️ Comandos na Consola (CLI)
51
-
52
- O ApkPy traz comandos essenciais e fáceis de usar no teu terminal:
53
-
54
- - **`apkpy start o_nome_do_projeto`**
55
- Cria uma nova pasta com o nome que ditares e carrega o template base num ficheiro chamado `writehere.py`. Lá que podes logo começar a desenhar todos os ecrãs.
56
-
57
- - **`apkpy build`**
58
- Este é o comando magia-negra! Ele analisa o teu `writehere.py` e extrai todo o visual e fluxos num ficheiro `meu_app_android.zip`. Dentro do zip terás o **Projeto Android Studio Completo** (código fonte em Java, Manifestos, Layouts XML e Drawables criados do zero). Depois só tens de extrair, abrir e exportar o APK!
59
-
60
- ---
61
-
62
- ## 📖 Como Funciona? (Exemplos de Código)
63
-
64
- Completely esquece os milhares de ficheiros de Java. Uma app no ApkPy é assim:
65
-
66
- ### 1. App Simples: Ecrã de Login Moderno com Estilos
67
- ```python
68
- from apkpy_lib.ui import Screen, button, label, inputs, run
69
-
70
- # Cria o ecrã
71
- login_screen = Screen(id="login")
72
-
73
- # Adiciona elementos e aplica lhes estilos via ID
74
- label("Bem-vindo à ApkPy!", screen=login_screen)
75
- inputs("O teu username", type="text", screen=login_screen, id="user")
76
- inputs("A tua password secreta", type="password", screen=login_screen, id="pass")
77
-
78
- button("Entrar na App", screen=login_screen, id="btn_entrar")
79
-
80
- # Estilizar facilmente com CSS (Suportado: cores, border-radius e bordas)
81
- style = """
82
- btn_entrar {
83
- background-color: blue;
84
- color: white;
85
- border-radius: 20px;
86
- border-color: none;
87
- }
88
- pass {
89
- border-radius: 10px;
90
- border-color: red;
91
- }
92
- """
93
-
94
- # Arrancar o simulador no teu Computador
95
- run(start_screen=login_screen)
96
- ```
97
-
98
- ### 2. Multi-Ecrãs e Navegação Fluente
99
- Navegar pelos menus nunca foi tão fácil numa App Android:
100
-
101
- ```python
102
- from apkpy_lib.ui import Screen, button, label, run
103
-
104
- # Ecrã 1
105
- home = Screen(id="home")
106
- label("Este é o Menu Principal", screen=home)
107
- btn_seguinte = button("Ir para Definições", screen=home)
108
-
109
- # Ecrã 2
110
- settings = Screen(id="settings")
111
- label("Aqui podes alterar definições.", screen=settings)
112
- btn_voltar = button("Voltar", screen=settings)
113
-
114
- # Fazer os botões viajar entre ecrãs (Traduzido para Java Intents)
115
- home.on_click_navigate(button=btn_seguinte, to=settings)
116
- settings.on_click_navigate(button=btn_voltar, to=home)
117
-
118
- run(start_screen=home)
119
- ```
120
-
121
- ---
122
-
123
- ## 📦 Elementos UI Suportados
124
-
125
- O ApkPy já integra nativamente ferramentas fantásticas da UI Android em caixas mágicas que podes testar com o `inputs()`:
126
-
127
- - `label("Apenas texto")`: Texto visual indicativo do que se passa.
128
- - `button("Ação")`: Um botão perfeitamente responsivo ao touch.
129
- - `inputs(type="text")`: A caixa para o utilizador introduzir letras ou números.
130
- - `inputs(type="password")`: Caixa de Input protegida por estrelas (***) contra mira.
131
- - `inputs(type="search")`: Caixa de texto formatada para pesquisar dados (X nativo).
132
- - `inputs(type="checkbox")`: Para selecionar se algo está ativado, caixa com visto.
133
- - `inputs(type="radio", placeholder="Cão|Gato")`: Bolas de seleção para inquéritos. Apenas podes escolher um animal (basta escrever opções e pôr barra |).
134
- - `inputs(type="range")`: Controlador e visualizador de uma barra deslizante de ajuste.
135
-
136
- ---
137
-
138
- > Transformando anos de estudos Android, em míseros minutos do teu tempo. Cria. Compila. Surpreende em ApkPy!
apkpy-0.2.1/README.md DELETED
@@ -1,117 +0,0 @@
1
- # 🚀 ApkPy — Cria as tuas Apps Android em Python
2
-
3
- **ApkPy** é uma framework inovadora e super leve que te permite construir aplicações Android nativas usando **apenas Python e CSS**.
4
- Esquece a complexidade de aprender Java/Kotlin ou de mexer em ficheiros XML confusos. Com o ApkPy, tu escreves código Python simples, e nós **geramos automaticamente um projeto Android Studio pronto a compilar num ficheiro APK**, completo com todos os ecrãs e estilos nativos.
5
-
6
- ---
7
-
8
- ## 🔥 Porquê usar o ApkPy?
9
- - **⚡ Zero XML e Java:** Desenha a tua interface em Python. O ApkPy converte tudo para código Java e XML nativo do Android magicamente!
10
- - **📱 Componentes 100% Nativos:** Nada de WebViews lentas. Os teus botões e caixas de texto são os verdadeiros elementos do Android (Activity, EditText, Button), garantindo uma performance impecável.
11
- - **🎨 Estilos CSS-Like:** Estiliza a tua app usando sintaxe inspirada em CSS diretamente no teu ficheiro Python. Nós traduzimos e geramos os `.xml` de Android para propriedades complexas como fundos, cores e até `border-radius`.
12
- - **💻 Preview em Tempo Real:** Testa e interage com o design da tua app diretamente no teu computador através de uma janela simuladora antes de compilar.
13
- - **🔄 Multi-Ecrãs:** Cria aplicações complexas com múltiplos ecrãs (Activities nativos) e viaja entre eles com um só comando.
14
-
15
- ---
16
-
17
- ## 📥 Instalação
18
-
19
- Podes instalar o ApkPy de forma rápida usando o gestor de pacotes `pip`:
20
-
21
- ```bash
22
- pip install apkpy
23
- ```
24
-
25
- *(Se já tens o apkpy instalado, acede à novíssima versão usando: `pip install --upgrade apkpy`)*
26
-
27
- ---
28
-
29
- ## 🛠️ Comandos na Consola (CLI)
30
-
31
- O ApkPy traz comandos essenciais e fáceis de usar no teu terminal:
32
-
33
- - **`apkpy start o_nome_do_projeto`**
34
- Cria uma nova pasta com o nome que ditares e carrega o template base num ficheiro chamado `writehere.py`. Lá que podes logo começar a desenhar todos os ecrãs.
35
-
36
- - **`apkpy build`**
37
- Este é o comando magia-negra! Ele analisa o teu `writehere.py` e extrai todo o visual e fluxos num ficheiro `meu_app_android.zip`. Dentro do zip terás o **Projeto Android Studio Completo** (código fonte em Java, Manifestos, Layouts XML e Drawables criados do zero). Depois só tens de extrair, abrir e exportar o APK!
38
-
39
- ---
40
-
41
- ## 📖 Como Funciona? (Exemplos de Código)
42
-
43
- Completely esquece os milhares de ficheiros de Java. Uma app no ApkPy é assim:
44
-
45
- ### 1. App Simples: Ecrã de Login Moderno com Estilos
46
- ```python
47
- from apkpy_lib.ui import Screen, button, label, inputs, run
48
-
49
- # Cria o ecrã
50
- login_screen = Screen(id="login")
51
-
52
- # Adiciona elementos e aplica lhes estilos via ID
53
- label("Bem-vindo à ApkPy!", screen=login_screen)
54
- inputs("O teu username", type="text", screen=login_screen, id="user")
55
- inputs("A tua password secreta", type="password", screen=login_screen, id="pass")
56
-
57
- button("Entrar na App", screen=login_screen, id="btn_entrar")
58
-
59
- # Estilizar facilmente com CSS (Suportado: cores, border-radius e bordas)
60
- style = """
61
- btn_entrar {
62
- background-color: blue;
63
- color: white;
64
- border-radius: 20px;
65
- border-color: none;
66
- }
67
- pass {
68
- border-radius: 10px;
69
- border-color: red;
70
- }
71
- """
72
-
73
- # Arrancar o simulador no teu Computador
74
- run(start_screen=login_screen)
75
- ```
76
-
77
- ### 2. Multi-Ecrãs e Navegação Fluente
78
- Navegar pelos menus nunca foi tão fácil numa App Android:
79
-
80
- ```python
81
- from apkpy_lib.ui import Screen, button, label, run
82
-
83
- # Ecrã 1
84
- home = Screen(id="home")
85
- label("Este é o Menu Principal", screen=home)
86
- btn_seguinte = button("Ir para Definições", screen=home)
87
-
88
- # Ecrã 2
89
- settings = Screen(id="settings")
90
- label("Aqui podes alterar definições.", screen=settings)
91
- btn_voltar = button("Voltar", screen=settings)
92
-
93
- # Fazer os botões viajar entre ecrãs (Traduzido para Java Intents)
94
- home.on_click_navigate(button=btn_seguinte, to=settings)
95
- settings.on_click_navigate(button=btn_voltar, to=home)
96
-
97
- run(start_screen=home)
98
- ```
99
-
100
- ---
101
-
102
- ## 📦 Elementos UI Suportados
103
-
104
- O ApkPy já integra nativamente ferramentas fantásticas da UI Android em caixas mágicas que podes testar com o `inputs()`:
105
-
106
- - `label("Apenas texto")`: Texto visual indicativo do que se passa.
107
- - `button("Ação")`: Um botão perfeitamente responsivo ao touch.
108
- - `inputs(type="text")`: A caixa para o utilizador introduzir letras ou números.
109
- - `inputs(type="password")`: Caixa de Input protegida por estrelas (***) contra mira.
110
- - `inputs(type="search")`: Caixa de texto formatada para pesquisar dados (X nativo).
111
- - `inputs(type="checkbox")`: Para selecionar se algo está ativado, caixa com visto.
112
- - `inputs(type="radio", placeholder="Cão|Gato")`: Bolas de seleção para inquéritos. Apenas podes escolher um animal (basta escrever opções e pôr barra |).
113
- - `inputs(type="range")`: Controlador e visualizador de uma barra deslizante de ajuste.
114
-
115
- ---
116
-
117
- > Transformando anos de estudos Android, em míseros minutos do teu tempo. Cria. Compila. Surpreende em ApkPy!
@@ -1,138 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: apkpy
3
- Version: 0.2.1
4
- Summary: A simple framework to build Android apps using Python and CSS-like styling
5
- Home-page: https://github.com/teu-usuario/apkpy
6
- Author: Martim
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.6
11
- Description-Content-Type: text/markdown
12
- Requires-Dist: click
13
- Dynamic: author
14
- Dynamic: classifier
15
- Dynamic: description
16
- Dynamic: description-content-type
17
- Dynamic: home-page
18
- Dynamic: requires-dist
19
- Dynamic: requires-python
20
- Dynamic: summary
21
-
22
- # 🚀 ApkPy — Cria as tuas Apps Android em Python
23
-
24
- **ApkPy** é uma framework inovadora e super leve que te permite construir aplicações Android nativas usando **apenas Python e CSS**.
25
- Esquece a complexidade de aprender Java/Kotlin ou de mexer em ficheiros XML confusos. Com o ApkPy, tu escreves código Python simples, e nós **geramos automaticamente um projeto Android Studio pronto a compilar num ficheiro APK**, completo com todos os ecrãs e estilos nativos.
26
-
27
- ---
28
-
29
- ## 🔥 Porquê usar o ApkPy?
30
- - **⚡ Zero XML e Java:** Desenha a tua interface em Python. O ApkPy converte tudo para código Java e XML nativo do Android magicamente!
31
- - **📱 Componentes 100% Nativos:** Nada de WebViews lentas. Os teus botões e caixas de texto são os verdadeiros elementos do Android (Activity, EditText, Button), garantindo uma performance impecável.
32
- - **🎨 Estilos CSS-Like:** Estiliza a tua app usando sintaxe inspirada em CSS diretamente no teu ficheiro Python. Nós traduzimos e geramos os `.xml` de Android para propriedades complexas como fundos, cores e até `border-radius`.
33
- - **💻 Preview em Tempo Real:** Testa e interage com o design da tua app diretamente no teu computador através de uma janela simuladora antes de compilar.
34
- - **🔄 Multi-Ecrãs:** Cria aplicações complexas com múltiplos ecrãs (Activities nativos) e viaja entre eles com um só comando.
35
-
36
- ---
37
-
38
- ## 📥 Instalação
39
-
40
- Podes instalar o ApkPy de forma rápida usando o gestor de pacotes `pip`:
41
-
42
- ```bash
43
- pip install apkpy
44
- ```
45
-
46
- *(Se já tens o apkpy instalado, acede à novíssima versão usando: `pip install --upgrade apkpy`)*
47
-
48
- ---
49
-
50
- ## 🛠️ Comandos na Consola (CLI)
51
-
52
- O ApkPy traz comandos essenciais e fáceis de usar no teu terminal:
53
-
54
- - **`apkpy start o_nome_do_projeto`**
55
- Cria uma nova pasta com o nome que ditares e carrega o template base num ficheiro chamado `writehere.py`. Lá que podes logo começar a desenhar todos os ecrãs.
56
-
57
- - **`apkpy build`**
58
- Este é o comando magia-negra! Ele analisa o teu `writehere.py` e extrai todo o visual e fluxos num ficheiro `meu_app_android.zip`. Dentro do zip terás o **Projeto Android Studio Completo** (código fonte em Java, Manifestos, Layouts XML e Drawables criados do zero). Depois só tens de extrair, abrir e exportar o APK!
59
-
60
- ---
61
-
62
- ## 📖 Como Funciona? (Exemplos de Código)
63
-
64
- Completely esquece os milhares de ficheiros de Java. Uma app no ApkPy é assim:
65
-
66
- ### 1. App Simples: Ecrã de Login Moderno com Estilos
67
- ```python
68
- from apkpy_lib.ui import Screen, button, label, inputs, run
69
-
70
- # Cria o ecrã
71
- login_screen = Screen(id="login")
72
-
73
- # Adiciona elementos e aplica lhes estilos via ID
74
- label("Bem-vindo à ApkPy!", screen=login_screen)
75
- inputs("O teu username", type="text", screen=login_screen, id="user")
76
- inputs("A tua password secreta", type="password", screen=login_screen, id="pass")
77
-
78
- button("Entrar na App", screen=login_screen, id="btn_entrar")
79
-
80
- # Estilizar facilmente com CSS (Suportado: cores, border-radius e bordas)
81
- style = """
82
- btn_entrar {
83
- background-color: blue;
84
- color: white;
85
- border-radius: 20px;
86
- border-color: none;
87
- }
88
- pass {
89
- border-radius: 10px;
90
- border-color: red;
91
- }
92
- """
93
-
94
- # Arrancar o simulador no teu Computador
95
- run(start_screen=login_screen)
96
- ```
97
-
98
- ### 2. Multi-Ecrãs e Navegação Fluente
99
- Navegar pelos menus nunca foi tão fácil numa App Android:
100
-
101
- ```python
102
- from apkpy_lib.ui import Screen, button, label, run
103
-
104
- # Ecrã 1
105
- home = Screen(id="home")
106
- label("Este é o Menu Principal", screen=home)
107
- btn_seguinte = button("Ir para Definições", screen=home)
108
-
109
- # Ecrã 2
110
- settings = Screen(id="settings")
111
- label("Aqui podes alterar definições.", screen=settings)
112
- btn_voltar = button("Voltar", screen=settings)
113
-
114
- # Fazer os botões viajar entre ecrãs (Traduzido para Java Intents)
115
- home.on_click_navigate(button=btn_seguinte, to=settings)
116
- settings.on_click_navigate(button=btn_voltar, to=home)
117
-
118
- run(start_screen=home)
119
- ```
120
-
121
- ---
122
-
123
- ## 📦 Elementos UI Suportados
124
-
125
- O ApkPy já integra nativamente ferramentas fantásticas da UI Android em caixas mágicas que podes testar com o `inputs()`:
126
-
127
- - `label("Apenas texto")`: Texto visual indicativo do que se passa.
128
- - `button("Ação")`: Um botão perfeitamente responsivo ao touch.
129
- - `inputs(type="text")`: A caixa para o utilizador introduzir letras ou números.
130
- - `inputs(type="password")`: Caixa de Input protegida por estrelas (***) contra mira.
131
- - `inputs(type="search")`: Caixa de texto formatada para pesquisar dados (X nativo).
132
- - `inputs(type="checkbox")`: Para selecionar se algo está ativado, caixa com visto.
133
- - `inputs(type="radio", placeholder="Cão|Gato")`: Bolas de seleção para inquéritos. Apenas podes escolher um animal (basta escrever opções e pôr barra |).
134
- - `inputs(type="range")`: Controlador e visualizador de uma barra deslizante de ajuste.
135
-
136
- ---
137
-
138
- > Transformando anos de estudos Android, em míseros minutos do teu tempo. Cria. Compila. Surpreende em ApkPy!
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes