Typed interface stubs for Pythonista iOS

Overview

Pythonista Stubs

PyPI GitHub issues Black Build Status

Stubs for the Pythonista iOS API. This allows for better error detection and IDE / editor autocomplete.

Installation and Usage

pip install pythonista-stubs --upgrade

N.b. you may need to pip3, particularly if you installed python3 with homebrew

Type checking can then be performed with mypy

See also: mypy integrations

API Coverage

Module Status
appex
canvas
cb
clipboard
console
dialogs
contacts
editor
keychain
linguistictagger
location
motion
notification
objc_util
photos
reminders
scene
sound
speech
twitter
ui

Built With

PEPs

Contributing

Please file a bug report for any issues you find. Even more excellent than a good bug report is a fix for a bug, or the implementation of a much-needed stub. We'd love to have your contributions.

We use the usual GitHub pull-request flow, which may be familiar to you if you've contributed to other projects on GitHub. For the mechanics, see Mypy's git and GitHub workflow help page, or GitHub's own documentation.

Code Formatting

This project is linted with pyflakes and makes strict use of Black for code formatting.

Conventions

  • long functions and methods should be split up with one argument per line
  • all function bodies should be empty
  • prefer ... over pass
  • prefer ... on the same line as the class/function signature
  • avoid vertical whitespace between consecutive module-level functions, names, or methods and fields within a single class
  • use a single blank line between top-level class definitions
  • do not use docstrings
  • use variable annotations instead of type comments
  • for arguments with a type and a default, use spaces around the =
  • use float instead of Union[int, float]
  • avoid Union return types: https://github.com/python/mypy/issues/1693
  • imports in stubs are considered private unless they use the form from library import name as name
  • avoid using the Any type when possible
  • type variables and aliases for legibility reasons should be prefixed with an underscore to make it obvious to the reader they are not part of the stubbed API.
  • these conventions derived from typeshed

Code of Conduct

Everyone participating in this community is expected to treat other people with respect and more generally to follow the guidelines articulated in the Python Community Code of Conduct.

Authors

Disclaimer

This is not an official project and is not associated with omz:software

License

Apache License 2.0

You might also like...
A simple password manager I typed with python using MongoDB .
A simple password manager I typed with python using MongoDB .

Python with MongoDB A simple python code example using MongoDB. How do i run this code • First of all you need to have a python on your computer. If y

convert a dict-list object from / to a typed object(class instance with type annotation)

objtyping 带类型定义的对象转换器 由来 Python不是强类型语言,开发人员没有给数据定义类型的习惯。这样虽然灵活,但处理复杂业务逻辑的时候却不够方便——缺乏类型检查可能导致很难发现错误,在IDE里编码时也没

A Simple, LightWeight, Statically-Typed Python3 API wrapper for GogoAnime.

AniKimi API A Simple, LightWeight, Statically-Typed Python3 API wrapper for GogoAnime The v2 of gogoanimeapi (depreciated) Made with JavaScript and Py

Statically typed BNF with semantic actions; A frontend of frontend frameworks; Use your grammar everywhere.

Statically typed BNF with semantic actions; A frontend of frontend frameworks; Use your grammar everywhere.

Run functions in parallel easily, with their results typed correctly!

typesafe_parmap pip install pip install typesafe-parmap Run functions in parallel safely with typesafe parmap! GitHub: https://github.com/thejaminato

Solutions to all 6 programming assignments in Dan Boneh's course Cryptography I, in statically typed Python.

Solutions to Cryptography I programming exercises Dan Boneh from Stanford University has an excellent online course on cryptography, hosted on Courser

cross-editor syntax highlighter for Lua, showing some merit of Typed BNF
cross-editor syntax highlighter for Lua, showing some merit of Typed BNF

Cross-editor contextual syntax highlighter via Typed BNF Do you like "one grammar, syntax highlighters everywhere?" 喜欢我一个文法,到处高亮吗? PS: NOTE that paren

Pypixiv - A fully-typed, asynchronous api wrapper for pixiv

pypixiv this library is a fully-typed, asynchronous api wrapper for pixiv. featu

Collection of library stubs for Python, with static types

typeshed About Typeshed contains external type annotations for the Python standard library and Python builtins, as well as third party packages as con

PEP-484 stubs for Django

pep484 stubs for Django This package contains type stubs and a custom mypy plugin to provide more precise static types and type inference for Django f

PEP-484 stubs for django-rest-framework

pep484 stubs for Django REST framework Mypy stubs for DRF 3.12.x. Supports Python 3.6, 3.7, 3.8 and 3.9. Installation pip install djangorestframework-

open source tools to generate mypy stubs from protobufs

mypy-protobuf: Generate mypy stub files from protobuf specs We just released a new major release mypy-protobuf 2. on 02/02/2021! It includes some back

Mypy stubs, i.e., type information, for numpy, pandas and matplotlib

Mypy type stubs for NumPy, pandas, and Matplotlib This is a PEP-561-compliant stub-only package which provides type information for matplotlib, numpy

Re-apply type annotations from .pyi stubs to your codebase.

retype Re-apply type annotations from .pyi stubs to your codebase. Usage Usage: retype [OPTIONS] [SRC]... Re-apply type annotations from .pyi stubs

PEP-484 typing stubs for SQLAlchemy 1.4 and SQLAlchemy 2.0

SQLAlchemy 2 Stubs These are PEP-484 typing stubs for SQLAlchemy 1.4 and 2.0. They are released concurrently along with a Mypy extension which is desi

Stubmaker is an easy-to-use tool for generating python stubs.

Stubmaker is an easy-to-use tool for generating python stubs. Requirements Stubmaker is to be run under Python 3.7.4+ No side effects during

python package for generating typescript grpc-web stubs from protobuf files.

grpc-web-proto-compile NOTE: This package has been superseded by romnn/proto-compile, which provides the same functionality but offers a lot more flex

Pymxs, the 3DsMax bindings of Maxscript to Python doesn't come with any stubs

PyMXS Stubs generator What Pymxs, the 3DsMax bindings of Maxscript to Python doe

HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps.
HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps.

HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps. 中文介绍 Features Non-intrusive. Your iOS project does not need to be modi

Comments
  • Stubs for the `sound` module

    Stubs for the `sound` module

    Stubs for the sound module. I wasn't sure about a set of types based on the documentation (whether they would be defined as float or int) so I reversed them to be sure. Code is added below, for the sake of completeness for the documentation.

    >>> def test_recording():
    ...   rec = sound.Recorder('test.m4a')
    ...   rec.record()
    ...   time.sleep(2)
    ...   print(rec.current_time, type(rec.current_time))
    ...   print(rec.recording)
    ...   time.sleep(3)
    ...   rec.stop()
    ...   
    >>> test_recording()
    2.0232426303854876 <class 'float'>
    True
    >>> def test_playback():
    ...   play = sound.Player('test.m4a')
    ...   play.play()
    ...   time.sleep(2)
    ...   print(play.duration, type(play.duration))
    ...   print(play.current_time, type(play.current_time))
    ...   
    >>> test_playback()
    5.037278911564626 <class 'float'>
    1.9657596371882087 <class 'float'>
    

    Although there are no merge conflicts with master, when/if #1 gets merged, there will be a conflict with setup.py. I put it as draft PR to prevent the merge conflict there, and will change that after a merge of #1.

    opened by boisei0 3
  • Added stubs for `speech`

    Added stubs for `speech`

    I've created stubs for the speech module. As mentioned in the commit comment, the top level get_languages function is a bit of a guess whether or not it should be publicly exposed and supported with typings.

    opened by boisei0 3
Releases(v0.0.2)
Owner
Harold Martin
🌅
Harold Martin
PEP-484 typing stubs for SQLAlchemy 1.4 and SQLAlchemy 2.0

SQLAlchemy 2 Stubs These are PEP-484 typing stubs for SQLAlchemy 1.4 and 2.0. They are released concurrently along with a Mypy extension which is desi

SQLAlchemy 139 Dec 30, 2022
Pymxs, the 3DsMax bindings of Maxscript to Python doesn't come with any stubs

PyMXS Stubs generator What Pymxs, the 3DsMax bindings of Maxscript to Python doe

Frieder Erdmann 19 Dec 27, 2022
coala provides a unified command-line interface for linting and fixing all your code, regardless of the programming languages you use.

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." ― John F. Woods coala provides a

coala development group 3.4k Dec 29, 2022
Make your functions return something meaningful, typed, and safe!

Make your functions return something meaningful, typed, and safe! Features Brings functional programming to Python land Provides a bunch of primitives

dry-python 2.5k Jan 5, 2023
Typed interactions with the GitHub API v3

PyGitHub PyGitHub is a Python library to access the GitHub API v3 and Github Enterprise API v3. This library enables you to manage GitHub resources su

null 5.7k Jan 6, 2023
Make your functions return something meaningful, typed, and safe!

Make your functions return something meaningful, typed, and safe! Features Brings functional programming to Python land Provides a bunch of primitives

dry-python 2.5k Jan 3, 2023
A strongly-typed genetic programming framework for Python

monkeys "If an army of monkeys were strumming on typewriters they might write all the books in the British Museum." monkeys is a framework designed to

H. Chase Stevens 115 Nov 27, 2022
OCR system for Arabic language that converts images of typed text to machine-encoded text.

Arabic OCR OCR system for Arabic language that converts images of typed text to machine-encoded text. The system currently supports only letters (29 l

Hussein Youssef 144 Jan 5, 2023
Make your functions return something meaningful, typed, and safe!

Make your functions return something meaningful, typed, and safe! Features Brings functional programming to Python land Provides a bunch of primitives

dry-python 2.6k Jan 9, 2023
This is the repo for the paper `SumGNN: Multi-typed Drug Interaction Prediction via Efficient Knowledge Graph Summarization'. (published in Bioinformatics'21)

SumGNN: Multi-typed Drug Interaction Prediction via Efficient Knowledge Graph Summarization This is the code for our paper ``SumGNN: Multi-typed Drug

Yue Yu 58 Dec 21, 2022