Skip to main content

macApp

A macOS .app information retriever for Python 3

Installation

pip install macApp --upgrade

Works for Python >=3.1

Usage

>>> import macApp
>>> macApp.App(<path>)
'App Name'
# Example:
>>> VSCode = macApp.App("/Applications/Visual Studio Code - Insiders.app")
>>> VSCode.architectures
['arm64']
>>> VSCode.used_dates
['2020-12-24 08:00:00 +0000', '2020-12-24 23:00:00 +0000', '2020-12-25 23:00:00 +0000', '2020-12-26 23:00:00 +0000', '2020-12-27 23:00:00 +0000', '2020-12-28 23:00:00 +0000', '2020-12-29 23:00:00 +0000']
>>> VSCode.size
'276.41MB'
>>> VSCode.copyright
'Copyright (C) 2019 Microsoft. All rights reserved'
>>> VSCode.creation_date
'2020-12-16 00:00:00 +0000'
>>> VSCode.bundle_id
'com.microsoft.VSCodeInsiders'
>>> VSCode.bundle_id.vendor
'microsoft'
>>> VSCode.bundle_id.app
'VSCodeInsiders'
>>> VSCode.bundle_id.version
'1.53.0-insider'
>>> VSCode.bundle_id.version.major
1
>>> VSCode.as_dict
{'displayName': 'Visual Studio Code - Insiders.app', 'alternateNames': ['Visual Studio Code - Insiders.app'], 'category': 'public.app-category.developer-tools', 'categoryType': None, 'bundleID': {'id': 'com.microsoft.VSCodeInsiders', [...] 'minor': 53, 'patch': 0, 'other': None}}

Methods

  • kill(signal=None)

Closes the app if running (is_running == True)

The 'signal' parameter is used specify a special signal used with killall

  • relatives(starting_path=OPTIMIZEDPATH, no_warning=False)

Searches for all of the files which might be related to the app

The 'starting_path' parameter is used specify which directory (folder) to start searching from
The 'no_warning' parameter is used specify if macApp should display warnings or not

OPTIMIZEDPATH or macApp.utils.OptimizedPath() is a variable used to indicate relatives() that we want to search through predefined paths which are more likely to have files related to the app

  • uninstall(starting_path=OPTIMIZEDPATH, no_warning=False)

Moves all of the files found by relatives() to a folder and creates a report

'starting_path' is the same as the one on relatives()
'no_warning' is the same as the one on relatives()

How does it work

macApp parses the result from the shell macOS built-in shell command mdls to retrieve information about the app

Dependencies

This module uses one dependency to ensure that created reports are safely written to

  • safeIO

Credit

macApp by Anime no Sekai

© Anime no Sekai — 2020

Metadata

Release files for macApp 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for macApp 1.1
File Size Uploaded
macApp-1.1.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for macApp 1.1
File Interpreter ABI Platform
macApp-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.0 kB

Release files / macApp-1.1.tar.gz

Download URL macApp-1.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5c30ff5ce161a70ee2a695e888b277c7f819a8452ac5e1be8f75ef464f497125
BLAKE2b-256 checksum
How to use checksums
880680a127bcf96bca984b4ffda1dce700c5cb5e54c7fefbeca6a82ce7c98041
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release files / macApp-1.1-py3-none-any.whl

Download URL macApp-1.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b21cc22e0bd8ddf36c9e787a5d151212792dc0a20fe1c7b1dd63f3f80933f7e
BLAKE2b-256 checksum
How to use checksums
164ad36f05edb01ba261e97b7e9f824658720fc3235929d18a35e47ca5d1d037
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/49.6.0.post20201009 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page