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 Image, StyleSheet
from sweetpotato.ui_kitten import Layout, Text, Button
from sweetpotato.config import settings
from sweetpotato.navigation import create_bottom_tab_navigator
settings.USE_UI_KITTEN = True
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 = Layout(
style=styles.layout,
children=[
Image(style=styles.image, source={"uri": image_url}),
Text(style=styles.text, 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.6.0a0.tar.gz
(208.1 kB
view details)
Built Distribution
sweetpotato-0.6.0a0-py3-none-any.whl
(214.8 kB
view details)
File details
Details for the file sweetpotato-0.6.0a0.tar.gz
.
File metadata
- Download URL: sweetpotato-0.6.0a0.tar.gz
- Upload date:
- Size: 208.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6aacb52dda47f3dad68a6a34c8b16dd2242bd2423729d1c582eba0d002068f04 |
|
MD5 | 854660188891a968414cc4fe1f702aaa |
|
BLAKE2b-256 | 723750cf118afb1dfcd69d9aa9c6346b8536b88d5f8e3d9ea98fccb8a632b1f8 |
File details
Details for the file sweetpotato-0.6.0a0-py3-none-any.whl
.
File metadata
- Download URL: sweetpotato-0.6.0a0-py3-none-any.whl
- Upload date:
- Size: 214.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68ad756b5b8d7eb88ae4bfc793181a4c1b31c196a072a7570bbf6a32ce10d9e4 |
|
MD5 | 473952833ae27dbeeedd58d07b2cbeb2 |
|
BLAKE2b-256 | 98ea73131537bc504f536b841b851b939eeb8d19002723283ec2981f9f4ad0e0 |