Skip to content

Commit

Permalink
Prepare for PyPI! (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
JJTech0130 authored May 22, 2024
1 parent ce88a8e commit c22904a
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 32 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lints

on:
pull_request:
branches: [ "main" ]
paths:
- '.github/workflows/lint.yml'
- 'pypush/**'
- 'tests/**'
- 'pyproject.toml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
if: '! github.event.pull_request.draft'
runs-on: ${{ matrix.os }}

strategy:
matrix:
python-version: [ 3.9, "3.10", "3.11", "3.12" ]
os: [ ubuntu-latest, macos-latest, windows-latest ]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: chartboost/ruff-action@v1
- name: Test install
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[test,cli]' -U
- name: Tests
run: pytest
18 changes: 0 additions & 18 deletions .github/workflows/pyright.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/ruff.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload

on:
release:
types: [ created ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U build setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload dist/*
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
> [!WARNING]
> `pypush` is undergoing a major rewrite. The current version is not stable and may not work as expected.
> `pypush` is undergoing a major rewrite. The current version is not stable and may not work as expected. Many features have been temporarily removed.
>
> Versioning starts at 2.0.0 due to conflicts with the original package to have the `pypush` name. Do not expect stability until 3.0.0.
# pypush
`pypush` is a POC demo of my recent iMessage reverse-engineering.
It can currently register as a new device on an Apple ID, set up encryption keys, and ***send and receive iMessages***!
`pypush` was originally a POC demo of my recent iMessage reverse-engineering.
It is now being developed into a community library aiming to cover all of Apple's internal API surface.

`pypush` is completely platform-independent, and does not require a Mac or other Apple device to use!
Currently, the rewritten version supports using the client side of Apple's internal APNs API, meaning it can activate as an
Apple device and receive push notifications. Stay tuned for future updates as we bring back the iMessage API and more!

`pypush` is completely platform-independent, though it may require device identifiers to use some APIs.

## Installation
Simple installation:
```bash
pip install git+https://github.com/JJTech0130/pypush
pip install pypush[cli]
```
Editable installation (for development):
```bash
Expand Down
22 changes: 21 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,35 @@ build-backend = "setuptools.build_meta"
[project]
name = "pypush"
dynamic = ["version"]
authors = [
{ name = "JJTech", email = "[email protected]" },
]
description = "Interact with Apple Private API"

readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"Development Status :: 3 - Alpha",
"Operating System :: OS Independent",
"License :: Other/Proprietary License",
]
license = {text = "Server Side Public License (SSPL)"}
keywords = ["apple", "api", "reverse engineering", "imessage", "apns"]

dependencies = [
"anyio",
"httpx",
"httpx[http2]",
"cryptography",
"typing-extensions",
"exceptiongroup",
'importlib_metadata; python_version>="3.9"',
]

[project.urls]
Homepage = "https://github.com/JJTech0130/pypush"
Issues = "https://github.com/JJTech0130/pypush/issues"

[project.scripts]
pypush = "pypush.cli:main"

Expand Down

0 comments on commit c22904a

Please sign in to comment.