Skip to content

Commit 7c083f4

Browse files
committed
docs(repo): rewrite README with banner, structured sections, and badges
1 parent 2766f24 commit 7c083f4

File tree

4 files changed

+84
-16
lines changed

4 files changed

+84
-16
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,6 @@ cython_debug/
162162

163163
# Metadata
164164
*_metadata.json
165+
166+
# macOS
167+
.DS_Store

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2025 PythonNative
3+
Copyright (c) 2026 Owen Carey
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 80 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,80 @@
1-
## PythonNative
2-
3-
[![CI](https://github.com/pythonnative/pythonnative/actions/workflows/ci.yml/badge.svg)](https://github.com/pythonnative/pythonnative/actions/workflows/ci.yml)
4-
[![Docs](https://github.com/pythonnative/pythonnative/actions/workflows/docs.yml/badge.svg)](https://github.com/pythonnative/pythonnative/actions/workflows/docs.yml)
5-
[![Release](https://github.com/pythonnative/pythonnative/actions/workflows/release.yml/badge.svg)](https://github.com/pythonnative/pythonnative/actions/workflows/release.yml)
6-
[![PyPI - Version](https://img.shields.io/pypi/v/pythonnative)](https://pypi.org/project/pythonnative/)
7-
[![Python Versions](https://img.shields.io/pypi/pyversions/pythonnative)](https://pypi.org/project/pythonnative/)
8-
[![License: MIT](https://img.shields.io/pypi/l/pythonnative)](LICENSE)
9-
[![Docs Site](https://img.shields.io/website?url=https%3A%2F%2Fdocs.pythonnative.com&label=docs)](https://docs.pythonnative.com/)
10-
11-
PythonNative is a cross‑platform toolkit for building native Android and iOS
12-
apps in Python. It provides a Pythonic API for native UI components,
13-
lifecycle events, and device capabilities, powered by Rubicon (iOS) and
14-
Chaquopy (Android). For guides, API reference, and examples, see the
15-
[docs](https://docs.pythonnative.com/).
1+
<p align="center">
2+
<img src="docs/assets/banner.jpg" alt="PythonNative" width="800" />
3+
</p>
4+
5+
<p align="center">
6+
<em>Build native Android and iOS apps in Python.</em>
7+
</p>
8+
9+
<p align="center">
10+
<a href="https://github.com/pythonnative/pythonnative/actions/workflows/ci.yml"><img src="https://github.com/pythonnative/pythonnative/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
11+
<a href="https://github.com/pythonnative/pythonnative/actions/workflows/release.yml"><img src="https://github.com/pythonnative/pythonnative/actions/workflows/release.yml/badge.svg" alt="Release" /></a>
12+
<a href="https://pypi.org/project/pythonnative/"><img src="https://img.shields.io/pypi/v/pythonnative" alt="PyPI Version" /></a>
13+
<a href="https://pypi.org/project/pythonnative/"><img src="https://img.shields.io/pypi/pyversions/pythonnative" alt="Python Versions" /></a>
14+
<a href="LICENSE"><img src="https://img.shields.io/pypi/l/pythonnative" alt="License: MIT" /></a>
15+
<a href="https://docs.pythonnative.com/"><img src="https://img.shields.io/website?url=https%3A%2F%2Fdocs.pythonnative.com&label=docs" alt="Docs" /></a>
16+
</p>
17+
18+
<p align="center">
19+
<a href="https://docs.pythonnative.com/">Documentation</a> ·
20+
<a href="https://docs.pythonnative.com/getting-started/">Getting Started</a> ·
21+
<a href="https://docs.pythonnative.com/examples/">Examples</a> ·
22+
<a href="CONTRIBUTING.md">Contributing</a>
23+
</p>
24+
25+
---
26+
27+
## Overview
28+
29+
PythonNative is a cross-platform toolkit for building native Android and iOS apps in Python. It provides a Pythonic API for native UI components, lifecycle events, and device capabilities, powered by Chaquopy on Android and rubicon-objc on iOS. Write your app once in Python and run it on both platforms with genuinely native interfaces.
30+
31+
## Features
32+
33+
- **Cross-platform native UI:** Build Android and iOS apps from a single Python codebase with truly native rendering.
34+
- **Direct native bindings:** Python calls platform APIs directly through Chaquopy and rubicon-objc, with no JavaScript bridge.
35+
- **Unified component API:** Components like `Page`, `StackView`, `Label`, `Button`, and `WebView` share a consistent interface across platforms.
36+
- **CLI scaffolding:** `pn init` creates a ready-to-run project structure; `pn run android` and `pn run ios` build and launch your app.
37+
- **Page lifecycle:** Hooks for `on_create`, `on_start`, `on_resume`, `on_pause`, `on_stop`, and `on_destroy`, with state save and restore.
38+
- **Navigation:** Push and pop screens with argument passing for multi-page apps.
39+
- **Rich component set:** Core views (Label, Button, TextField, ImageView, WebView, Switch, DatePicker, and more) plus Material Design variants.
40+
- **Bundled templates:** Android Gradle and iOS Xcode templates are included, so scaffolding requires no network access.
41+
42+
## Quick Start
43+
44+
### Installation
45+
46+
```bash
47+
pip install pythonnative
48+
```
49+
50+
### Usage
51+
52+
```python
53+
import pythonnative as pn
54+
55+
56+
class MainPage(pn.Page):
57+
def __init__(self, native_instance):
58+
super().__init__(native_instance)
59+
60+
def on_create(self):
61+
super().on_create()
62+
stack = pn.StackView()
63+
stack.add_view(pn.Label("Hello from PythonNative!"))
64+
button = pn.Button("Tap me")
65+
button.set_on_click(lambda: print("Button tapped"))
66+
stack.add_view(button)
67+
self.set_root_view(stack)
68+
```
69+
70+
## Documentation
71+
72+
Visit [docs.pythonnative.com](https://docs.pythonnative.com/) for the full documentation, including getting started guides, platform-specific instructions for Android and iOS, API reference, and working examples.
73+
74+
## Contributing
75+
76+
Contributions are welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions, coding standards, and guidelines for submitting pull requests.
77+
78+
## License
79+
80+
[MIT](LICENSE)

docs/assets/banner.jpg

212 KB
Loading

0 commit comments

Comments
 (0)