A Python tool to find the process ID (PID) of a macOS window by its title or other attributes
Project description
macos-window-info
A Python project to find the process ID (PID) of a window by its title or other attributes.
Requirements
- Python 3.13 or higher
- macOS (uses Quartz framework)
Installation
From PyPI
pip install macos-window-info
From source
This project uses Poetry for dependency management.
poetry install
Usage
Run the main script:
python macos-window-info.py
Or if installed via pip:
macos-window-info
Development
Setting up development environment
# Clone the repository
git clone https://github.com/bsamartins/macos-window-info.git
cd macos-window-info
# Install with development dependencies
poetry install --with dev
# Run tests
poetry run pytest
# Run code formatting
poetry run black src/
# Run linting
poetry run flake8 src/
CI/CD
This project uses GitHub Actions for continuous integration and deployment:
- Build and Test: Runs on every push and pull request, testing across multiple OS and Python versions
- Code Quality: Runs code formatting, linting, and security checks
- Publish: Automatically publishes to PyPI when a new release is created
Setting up PyPI publishing
To enable automatic publishing to PyPI, you need to set up the following secrets in your GitHub repository:
PYPI_API_TOKEN: Your PyPI API token for publishing to the main PyPITEST_PYPI_API_TOKEN: Your Test PyPI API token for testing releases
You can create these tokens at:
Manual publishing
You can also manually trigger publishing to Test PyPI using the workflow dispatch feature in GitHub Actions.
Author
Bernardo Martins (bsamartins@gmail.com)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file macos_window_info-0.1.0.tar.gz.
File metadata
- Download URL: macos_window_info-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31adcbd6c1f891bf26779c1ea60b3d028ce7153a4eef8bb69edc4e1dad4764d4
|
|
| MD5 |
29d3f76468f2c7f3856ba7c5aee22790
|
|
| BLAKE2b-256 |
0455b627c9ac14d28282a0544437d1f1bdcbd49c876be8e7682d89ff953215b5
|
Provenance
The following attestation bundles were made for macos_window_info-0.1.0.tar.gz:
Publisher:
publish.yml on bsamartins/macos-window-info
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
macos_window_info-0.1.0.tar.gz -
Subject digest:
31adcbd6c1f891bf26779c1ea60b3d028ce7153a4eef8bb69edc4e1dad4764d4 - Sigstore transparency entry: 310962282
- Sigstore integration time:
-
Permalink:
bsamartins/macos-window-info@3408f081277efda8be89570320bb8e5e2ccc2596 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bsamartins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3408f081277efda8be89570320bb8e5e2ccc2596 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file macos_window_info-0.1.0-py3-none-any.whl.
File metadata
- Download URL: macos_window_info-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
845fed0ec934b625b77dfab92a2bc5e4e425da4971d81a28b1549ac0db321bc3
|
|
| MD5 |
7cb625333085ed92954eb47b070177b0
|
|
| BLAKE2b-256 |
2b6f45a7d105945ad3573edf6dc395dce8d69229882a795b8b6ab1e3ffe20b22
|
Provenance
The following attestation bundles were made for macos_window_info-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on bsamartins/macos-window-info
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
macos_window_info-0.1.0-py3-none-any.whl -
Subject digest:
845fed0ec934b625b77dfab92a2bc5e4e425da4971d81a28b1549ac0db321bc3 - Sigstore transparency entry: 310962299
- Sigstore integration time:
-
Permalink:
bsamartins/macos-window-info@3408f081277efda8be89570320bb8e5e2ccc2596 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/bsamartins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3408f081277efda8be89570320bb8e5e2ccc2596 -
Trigger Event:
workflow_dispatch
-
Statement type: