Sweetpotato provides an intuitive wrapper around React Native.
Project description
Sweetpotato 🥔
This project is still in early stages of development and is not stable.
Sweetpotato provides an intuitive wrapper around React Native, making cross-platform development (iOS, Android, Web) accessible from Python.
- Supported packages include but are not limited to:
See https://sweetpotato.readthedocs.io for documentation.
You can view the below example at the following link: https://snack.expo.dev/@greysonlalonde13/amused-crackers
from sweetpotato.app import App
from sweetpotato.components import Image, StyleSheet, Text, Button, View
from sweetpotato.config import settings
from sweetpotato.navigation import create_bottom_tab_navigator
settings.USE_NAVIGATION = True
styles = StyleSheet.create({
"image": {"height": 200, "width": 200, "borderRadius": 50},
"layout": {
"justifyContent": "center",
"alignItems": "center",
"flex": 1,
},
"text": {"margin": 25},
})
tab = create_bottom_tab_navigator(name="tab")
image_url = "https://raw.githubusercontent.com/greysonlalonde/sweetpotato/main/media/sweetpotatoes.JPG"
home_page = View(
style=styles.layout,
children=[
Image(style=styles.image, source={"uri": image_url}),
Text(style=styles.text, text="Sweet, Sweet Potatoes"),
Button(title="Info", on_press="() => alert('This app was made with sweetpotato')")
]
)
tab.screen(
screen_name="Home",
children=[home_page],
)
app = App(component=tab, theme="dark")
if __name__ == "__main__":
app.run()
iOS, Android, and web:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sweetpotato-0.7.0a0.tar.gz.
File metadata
- Download URL: sweetpotato-0.7.0a0.tar.gz
- Upload date:
- Size: 220.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
447033a18cbca380e9cb81def6f15e9b6a7b226f5cb48747660255b325a9706f
|
|
| MD5 |
1b34b3050e47c0ec3f9facc48cc10e68
|
|
| BLAKE2b-256 |
bbbea9d461f1edf7884ffeeabbca000de7b67cb6fc9c2b710def13e3ece47e8b
|
File details
Details for the file sweetpotato-0.7.0a0-py3-none-any.whl.
File metadata
- Download URL: sweetpotato-0.7.0a0-py3-none-any.whl
- Upload date:
- Size: 229.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5149825b2c9089255b2ebdd14008c21d375eec42440340b74c446c9ec34625af
|
|
| MD5 |
0ae8ea5415a97d7c3a980ac1d2dc2f8a
|
|
| BLAKE2b-256 |
be7e40e0c8647ae9da896cb58e8f50f177ff18528d346eb2f18e6853cfd55548
|