Sweetpotato provides an intuitive wrapper around React Native.
Project description
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 Text, Button, Image
from sweetpotato.ui_kitten import Layout
from sweetpotato.config import settings
from sweetpotato.navigation import create_bottom_tab_navigator
settings.USE_UI_KITTEN = True
settings.USE_NAVIGATION = True
view_style = {
"justifyContent": "center",
"alignItems": "center", "flex": 1,
}
image_style = {'height': 200, 'width': 200, 'borderRadius': 50}
tab = create_bottom_tab_navigator(name="tab")
image_url = "https://raw.githubusercontent.com/greysonlalonde/sweetpotato/main/media/sweetpotatoes.JPG"
home_page = Layout(
style=view_style,
children=[
Image(style=image_style, source={"uri": image_url}),
Text(style={'margin': 25}, text="Sweet, Sweet Potatoes"),
Button(title="Info", onPress="() => 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
sweetpotato-0.5.0a.tar.gz
(208.1 kB
view hashes)
Built Distribution
sweetpotato-0.5.0a-py3-none-any.whl
(215.0 kB
view hashes)
Close
Hashes for sweetpotato-0.5.0a-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb4668b55b19b70f183418d92f4fd497227c968b284d8b059c727365c11c0ee2 |
|
MD5 | 86b803c9e31a3b44fce247522bc824e4 |
|
BLAKE2b-256 | b54f85e1cb05026dc0667f8ac572e20504b607c8a037e83638cf1ecb8130b305 |