apkpy 0.2.0__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 +138 -0
- apkpy-0.2.2/README.md +117 -0
- apkpy-0.2.2/apkpy.egg-info/PKG-INFO +138 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/setup.py +1 -1
- apkpy-0.2.0/PKG-INFO +0 -72
- apkpy-0.2.0/README.md +0 -51
- apkpy-0.2.0/apkpy.egg-info/PKG-INFO +0 -72
- {apkpy-0.2.0 → apkpy-0.2.2}/MANIFEST.in +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy.egg-info/SOURCES.txt +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy.egg-info/dependency_links.txt +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy.egg-info/entry_points.txt +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy.egg-info/requires.txt +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy.egg-info/top_level.txt +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/__init__.py +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/cli.py +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/core/__pycache__/compiler.cpython-313.pyc +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/core/compiler.py +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/core/style_parser.py +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/templates/android_project/app/src/main/AndroidManifest.xml +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/templates/android_project/app/src/main/java/com/exemplo/MainActivity.java +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/ui.py +0 -0
- {apkpy-0.2.0 → apkpy-0.2.2}/setup.cfg +0 -0
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.
|
|
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.0/PKG-INFO
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: apkpy
|
|
3
|
-
Version: 0.2.0
|
|
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 UIs with Pure Python
|
|
23
|
-
ApkPy is a lightweight framework designed to bridge the gap between Python logic and Native Android UI. It translates your Python code directly into Production-Ready Java, allowing you to structure Android activities without touching a single line of XML or Java manually.
|
|
24
|
-
|
|
25
|
-
🔥 Key Features
|
|
26
|
-
⚡ Zero XML: Forget about complex layout files. Define your UI in Python, and let ApkPy handle the Java generation.
|
|
27
|
-
|
|
28
|
-
📱 Native Components: Not a web-view! These are real Android native components.
|
|
29
|
-
|
|
30
|
-
🎨 Style Integration: Built-in CSS-like parser to handle your app's look and feel.
|
|
31
|
-
|
|
32
|
-
🛠️ CLI Powered: Use the built-in command line interface to scaffold and build your projects instantly.
|
|
33
|
-
|
|
34
|
-
🏗️ Supported UI Elements
|
|
35
|
-
Text: text("Hello") — Renders as an Android TextView.
|
|
36
|
-
|
|
37
|
-
Button: button("Click Me") — Renders as an Android Button.
|
|
38
|
-
|
|
39
|
-
Input: input_field(type="text") — Renders as a standard EditText.
|
|
40
|
-
|
|
41
|
-
Password: input_field(type="password") — Renders as an EditText with secure masking.
|
|
42
|
-
|
|
43
|
-
Search: input_field(type="search") — Renders as a native SearchView.
|
|
44
|
-
|
|
45
|
-
Range: input_field(type="range") — Renders as an Android SeekBar.
|
|
46
|
-
|
|
47
|
-
Checkbox: input_field(type="checkbox") — Renders as a native CheckBox.
|
|
48
|
-
|
|
49
|
-
Radio: input_field(type="radio") — Renders as a native RadioButton.
|
|
50
|
-
|
|
51
|
-
💻 Fast Example
|
|
52
|
-
Python
|
|
53
|
-
from apkpy_lib.ui import text, button, input_field
|
|
54
|
-
from apkpy_lib.core.compiler import Compiler
|
|
55
|
-
|
|
56
|
-
# Define your layout
|
|
57
|
-
my_app = [
|
|
58
|
-
text("Welcome to ApkPy", id="title"),
|
|
59
|
-
input_field(id="user_login", type="text", placeholder="Username"),
|
|
60
|
-
input_field(id="user_pass", type="password", placeholder="Password"),
|
|
61
|
-
button("Login", id="login_btn")
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
# Compile to Native Java
|
|
65
|
-
compiler = Compiler(output_dir="my_android_project")
|
|
66
|
-
compiler.compile(my_app)
|
|
67
|
-
📥 Installation
|
|
68
|
-
|
|
69
|
-
pip install apkpy
|
|
70
|
-
To upgrade to the latest version (0.1.1) with new input types:
|
|
71
|
-
|
|
72
|
-
pip install --upgrade apkpy
|
apkpy-0.2.0/README.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# 🚀 ApkPy — Build Android UIs with Pure Python
|
|
2
|
-
ApkPy is a lightweight framework designed to bridge the gap between Python logic and Native Android UI. It translates your Python code directly into Production-Ready Java, allowing you to structure Android activities without touching a single line of XML or Java manually.
|
|
3
|
-
|
|
4
|
-
🔥 Key Features
|
|
5
|
-
⚡ Zero XML: Forget about complex layout files. Define your UI in Python, and let ApkPy handle the Java generation.
|
|
6
|
-
|
|
7
|
-
📱 Native Components: Not a web-view! These are real Android native components.
|
|
8
|
-
|
|
9
|
-
🎨 Style Integration: Built-in CSS-like parser to handle your app's look and feel.
|
|
10
|
-
|
|
11
|
-
🛠️ CLI Powered: Use the built-in command line interface to scaffold and build your projects instantly.
|
|
12
|
-
|
|
13
|
-
🏗️ Supported UI Elements
|
|
14
|
-
Text: text("Hello") — Renders as an Android TextView.
|
|
15
|
-
|
|
16
|
-
Button: button("Click Me") — Renders as an Android Button.
|
|
17
|
-
|
|
18
|
-
Input: input_field(type="text") — Renders as a standard EditText.
|
|
19
|
-
|
|
20
|
-
Password: input_field(type="password") — Renders as an EditText with secure masking.
|
|
21
|
-
|
|
22
|
-
Search: input_field(type="search") — Renders as a native SearchView.
|
|
23
|
-
|
|
24
|
-
Range: input_field(type="range") — Renders as an Android SeekBar.
|
|
25
|
-
|
|
26
|
-
Checkbox: input_field(type="checkbox") — Renders as a native CheckBox.
|
|
27
|
-
|
|
28
|
-
Radio: input_field(type="radio") — Renders as a native RadioButton.
|
|
29
|
-
|
|
30
|
-
💻 Fast Example
|
|
31
|
-
Python
|
|
32
|
-
from apkpy_lib.ui import text, button, input_field
|
|
33
|
-
from apkpy_lib.core.compiler import Compiler
|
|
34
|
-
|
|
35
|
-
# Define your layout
|
|
36
|
-
my_app = [
|
|
37
|
-
text("Welcome to ApkPy", id="title"),
|
|
38
|
-
input_field(id="user_login", type="text", placeholder="Username"),
|
|
39
|
-
input_field(id="user_pass", type="password", placeholder="Password"),
|
|
40
|
-
button("Login", id="login_btn")
|
|
41
|
-
]
|
|
42
|
-
|
|
43
|
-
# Compile to Native Java
|
|
44
|
-
compiler = Compiler(output_dir="my_android_project")
|
|
45
|
-
compiler.compile(my_app)
|
|
46
|
-
📥 Installation
|
|
47
|
-
|
|
48
|
-
pip install apkpy
|
|
49
|
-
To upgrade to the latest version (0.1.1) with new input types:
|
|
50
|
-
|
|
51
|
-
pip install --upgrade apkpy
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: apkpy
|
|
3
|
-
Version: 0.2.0
|
|
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 UIs with Pure Python
|
|
23
|
-
ApkPy is a lightweight framework designed to bridge the gap between Python logic and Native Android UI. It translates your Python code directly into Production-Ready Java, allowing you to structure Android activities without touching a single line of XML or Java manually.
|
|
24
|
-
|
|
25
|
-
🔥 Key Features
|
|
26
|
-
⚡ Zero XML: Forget about complex layout files. Define your UI in Python, and let ApkPy handle the Java generation.
|
|
27
|
-
|
|
28
|
-
📱 Native Components: Not a web-view! These are real Android native components.
|
|
29
|
-
|
|
30
|
-
🎨 Style Integration: Built-in CSS-like parser to handle your app's look and feel.
|
|
31
|
-
|
|
32
|
-
🛠️ CLI Powered: Use the built-in command line interface to scaffold and build your projects instantly.
|
|
33
|
-
|
|
34
|
-
🏗️ Supported UI Elements
|
|
35
|
-
Text: text("Hello") — Renders as an Android TextView.
|
|
36
|
-
|
|
37
|
-
Button: button("Click Me") — Renders as an Android Button.
|
|
38
|
-
|
|
39
|
-
Input: input_field(type="text") — Renders as a standard EditText.
|
|
40
|
-
|
|
41
|
-
Password: input_field(type="password") — Renders as an EditText with secure masking.
|
|
42
|
-
|
|
43
|
-
Search: input_field(type="search") — Renders as a native SearchView.
|
|
44
|
-
|
|
45
|
-
Range: input_field(type="range") — Renders as an Android SeekBar.
|
|
46
|
-
|
|
47
|
-
Checkbox: input_field(type="checkbox") — Renders as a native CheckBox.
|
|
48
|
-
|
|
49
|
-
Radio: input_field(type="radio") — Renders as a native RadioButton.
|
|
50
|
-
|
|
51
|
-
💻 Fast Example
|
|
52
|
-
Python
|
|
53
|
-
from apkpy_lib.ui import text, button, input_field
|
|
54
|
-
from apkpy_lib.core.compiler import Compiler
|
|
55
|
-
|
|
56
|
-
# Define your layout
|
|
57
|
-
my_app = [
|
|
58
|
-
text("Welcome to ApkPy", id="title"),
|
|
59
|
-
input_field(id="user_login", type="text", placeholder="Username"),
|
|
60
|
-
input_field(id="user_pass", type="password", placeholder="Password"),
|
|
61
|
-
button("Login", id="login_btn")
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
# Compile to Native Java
|
|
65
|
-
compiler = Compiler(output_dir="my_android_project")
|
|
66
|
-
compiler.compile(my_app)
|
|
67
|
-
📥 Installation
|
|
68
|
-
|
|
69
|
-
pip install apkpy
|
|
70
|
-
To upgrade to the latest version (0.1.1) with new input types:
|
|
71
|
-
|
|
72
|
-
pip install --upgrade 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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{apkpy-0.2.0 → apkpy-0.2.2}/apkpy_lib/templates/android_project/app/src/main/AndroidManifest.xml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|