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
sweetpotato-0.7.0a0.tar.gz
(220.7 kB
view hashes)
Built Distribution
sweetpotato-0.7.0a0-py3-none-any.whl
(229.2 kB
view hashes)
Close
Hashes for sweetpotato-0.7.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5149825b2c9089255b2ebdd14008c21d375eec42440340b74c446c9ec34625af |
|
MD5 | 0ae8ea5415a97d7c3a980ac1d2dc2f8a |
|
BLAKE2b-256 | be7e40e0c8647ae9da896cb58e8f50f177ff18528d346eb2f18e6853cfd55548 |