Skip to main content

Sweetpotato provides an intuitive wrapper around React Native.

Project description


alt text PyPI - Downloads alt text Documentation Status Code style: black

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.


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


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)

Uploaded Source

Built Distribution

sweetpotato-0.6.0a0-py3-none-any.whl (214.8 kB view details)

Uploaded Python 3

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

Hashes for sweetpotato-0.6.0a0.tar.gz
Algorithm Hash digest
SHA256 6aacb52dda47f3dad68a6a34c8b16dd2242bd2423729d1c582eba0d002068f04
MD5 854660188891a968414cc4fe1f702aaa
BLAKE2b-256 723750cf118afb1dfcd69d9aa9c6346b8536b88d5f8e3d9ea98fccb8a632b1f8

See more details on using hashes here.

File details

Details for the file sweetpotato-0.6.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for sweetpotato-0.6.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 68ad756b5b8d7eb88ae4bfc793181a4c1b31c196a072a7570bbf6a32ce10d9e4
MD5 473952833ae27dbeeedd58d07b2cbeb2
BLAKE2b-256 98ea73131537bc504f536b841b851b939eeb8d19002723283ec2981f9f4ad0e0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page