Metadata-Version: 2.4
Name: pythonnative
Version: 0.3.0
Summary: Cross-platform native UI toolkit for Android and iOS
Author: Owen Carey
License: MIT License
        
        Copyright (c) 2025 PythonNative
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in
        all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
        THE SOFTWARE.
        
Project-URL: Homepage, https://github.com/pythonnative/pythonnative
Project-URL: Repository, https://github.com/pythonnative/pythonnative
Project-URL: Issues, https://github.com/pythonnative/pythonnative/issues
Project-URL: Documentation, https://docs.pythonnative.com/
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Provides-Extra: ios
Requires-Dist: rubicon-objc<0.5.0,>=0.4.6; extra == "ios"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5; extra == "docs"
Requires-Dist: mkdocs-material[imaging]>=9.5; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.24; extra == "docs"
Provides-Extra: dev
Requires-Dist: black>=24.0; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Requires-Dist: pytest>=8.0; extra == "dev"
Provides-Extra: ci
Requires-Dist: black>=24.0; extra == "ci"
Requires-Dist: ruff>=0.5; extra == "ci"
Requires-Dist: mypy>=1.10; extra == "ci"
Requires-Dist: pytest>=8.0; extra == "ci"
Dynamic: license-file

# PythonNative

**PythonNative** is a cross-platform toolkit that allows you to create native Android and iOS apps using Python. Inspired by frameworks like React Native and NativeScript, PythonNative provides a Pythonic interface for building native UI elements, handling lifecycle events, and accessing platform-specific APIs.

## Features

- **Native UI Components**: Create and manage native buttons, labels, lists, and more, all from Python.
- **Cross-Platform**: Write once, run on both Android and iOS.
- **Lifecycle Management**: Handle app lifecycle events with ease.
- **Native API Access**: Access device features like Camera, Geolocation, and Notifications.
- **Powered by Proven Tools**: PythonNative integrates seamlessly with [Rubicon](https://beeware.org/project/projects/bridges/rubicon/) for iOS and [Chaquopy](https://chaquo.com/chaquopy/) for Android, ensuring robust native performance.

## Quick Start

### Installation

First, install PythonNative via pip:

```bash
pip install pythonnative
```

### Create Your First App

Initialize a new PythonNative app:

```bash
pn init my_app
```

Your app directory will look like this:

```text
my_app/
├── README.md
├── app
│   ├── __init__.py
│   ├── main_page.py
│   └── resources
├── pythonnative.json
├── requirements.txt
└── tests
```

### Writing Views

In PythonNative, everything is a view. Here's a simple example of how to create a main page with a list view:

```python
import pythonnative as pn

class MainPage(pn.Page):
    def __init__(self, native_instance):
        super().__init__(native_instance)

    def on_create(self):
        super().on_create()
        stack_view = pn.StackView(self.native_instance)
        list_data = ["item_{}".format(i) for i in range(100)]
        list_view = pn.ListView(self.native_instance, list_data)
        stack_view.add_view(list_view)
        self.set_root_view(stack_view)
```

### Run the app

```bash
pn run android
pn run ios
```

## Documentation

For detailed guides and API references, visit the [PythonNative documentation](https://docs.pythonnative.com/).
