pythonx-platform
Device features for Python apps: notifications, camera, sensors, file picker and permissions, as one API.Python 앱을 위한 기기 기능: 알림, 카메라, 센서, 파일 선택, 권한을 하나의 API로.
Overview개요
pythonx-platform gives Python apps the device: OS notifications, camera, sensors, file picking, sharing and permissions, with one API on Android, iOS and desktop.
pythonx-platform은 Python 앱에 기기를 줍니다. OS 알림, 카메라, 센서, 파일 선택, 공유, 권한을 Android, iOS, 데스크톱에서 하나의 API로 씁니다.
The problem it solves푸는 문제
Every Python-on-mobile effort ends up wrapping platform APIs by hand, one per platform, and the wrappers age. Kotlin apps need the same features, and Compose Multiplatform does not ship many of them.
모바일 Python 시도들은 결국 플랫폼 API를 플랫폼마다 손으로 감싸게 되고, 그 래퍼는 낡아 갑니다. Kotlin 앱에도 같은 기능이 필요한데 Compose Multiplatform은 그중 많은 것을 제공하지 않습니다.
How it works동작 방식
The work is split by layer. Each device feature is implemented once in Kotlin, as a multiplatform androidx library in compose-multiplatform-core-extended, so Kotlin apps use it too. Python reaches it through python-multiplatform's binder under its own name. pythonx-platform groups those libraries under pythonx.platform and adds Python-shaped conveniences where the Kotlin shape is awkward.
일은 계층으로 나눕니다. 기기 기능은 Kotlin으로 한 번, compose-multiplatform-core-extended의 멀티플랫폼 androidx 라이브러리로 구현해서 Kotlin 앱도 씁니다. Python은 python-multiplatform의 바인더로 원래 이름 그대로 닿습니다. pythonx-platform은 그 라이브러리들을 pythonx.platform 아래로 묶고, Kotlin 모양이 어색한 곳에 Python다운 편의를 더합니다.
Design decisions설계 결정
- Never reimplement a feature in Python.
- Never rename a Kotlin namespace.
- Absent where the platform lacks it, never stubbed.
- 기능을 Python으로 다시 구현하지 않는다.
- Kotlin 네임스페이스 이름을 바꾸지 않는다.
- 플랫폼에 없으면 없다고 둔다. 흉내 내지 않습니다.
Where it fits생태계 안의 위치
Kotlin side: compose-multiplatform-core-extended. Bridge: python-multiplatform. Neighbours: pythonx-compose for UI that asks for permissions or shows pickers.
Kotlin 쪽은 compose-multiplatform-core-extended, 다리는 python-multiplatform, 이웃은 권한을 묻거나 선택 화면을 띄우는 UI를 위한 pythonx-compose입니다.
Where it stands현재 상태
Intent recorded, name reserved on PyPI. The first Kotlin library, OS notifications, is planned in compose-multiplatform-core-extended.
의도 기록, PyPI 이름 선점. 첫 Kotlin 라이브러리인 OS 알림은 compose-multiplatform-core-extended에 계획돼 있습니다.
Future design미래 설계
The device as a set of multiplatform androidx libraries that Kotlin and Python apps share, so a feature written once reaches both languages on every platform.
Kotlin 앱과 Python 앱이 함께 쓰는 멀티플랫폼 androidx 라이브러리 묶음으로서의 기기. 한 번 쓴 기능이 모든 플랫폼에서 두 언어에 닿습니다.
Roadmap로드맵
In the pythonx turn, after the Kotlin libraries it needs exist.
pythonx 차례에, 필요한 Kotlin 라이브러리가 생긴 뒤.