Skip to main content

Convenience facilities for working with pyobjc (MacOSX Objective C facilities). See also: https://pyobjc.readthedocs.io/en/latest/index.html

Project description

Convenience facilities for working with pyobjc (MacOSX Objective C facilities). See also: https://pyobjc.readthedocs.io/en/latest/index.html

Latest release 20240622: Initial PyPI release supporting upcoming cs.app.osx.spaces.

apple = <cs.app.osx.objc.AutoBundles object at 0x10c3d3070>

An object whose attributes autoload {prefix}{attrname}. The default prefix is DEFAULT_BUNDLE_ID_PREFIX ('com.apple.').

Class AutoBundles

An object whose attributes autoload {prefix}{attrname}. The default prefix is DEFAULT_BUNDLE_ID_PREFIX ('com.apple.').

Class Bundle(cs.obj.SingletonMixin)

Wrapper class for an NSBundle.

Instances have the following attributes:

  • _bundle: the underlying NSBundle instance
  • _bundle_id: the identifier of the underlying bundle, eg 'com.apple.HIServices'
  • _ns: a dictionary containing all the functions from the bundle

The functions from the bundle are available as attributes on the Bundle.

Function cg(func)

A decorator to provide a cg_conn keyword argument if missing, containing the default Core graphics connection.

Example:

@cg
def do_some_graphics(blah, *, cg_conn, ...):
    ...

Function convertNSDate(d: objc.NSDate) -> datetime.datetime

Convert an NSDate into a datetime.

Function convertNSDateComponents(d: objc.NSDateComponents) -> datetime.datetime

Convert an NSDateComponents into a datetime.

Function convertObjCtype(o)

Convert an object containing an ObjC object into the equivalent Python type.

Current conversions:

  • None -> None
  • NSDate, NSDateComponents -> datetime
  • ABMultiValueCoreDataWrapper -> list with members converted
  • int -> int
  • objc._pythonify.OC_PythonInt -> int
  • objc._pythonify.OC_PythonFloat -> float
  • dictionries with .keys() -> dict

Release Log

Release 20240622: Initial PyPI release supporting upcoming cs.app.osx.spaces.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs.app.osx.objc-20240622.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cs.app.osx.objc-20240622-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file cs.app.osx.objc-20240622.tar.gz.

File metadata

  • Download URL: cs.app.osx.objc-20240622.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.6

File hashes

Hashes for cs.app.osx.objc-20240622.tar.gz
Algorithm Hash digest
SHA256 65680beef1441317624f00d6787dc4944f71d05b467281d25374416bbab14f66
MD5 79d14008562765766f521c4c47169a13
BLAKE2b-256 22cd47fdf74c0b8ff61e08fb92439e4a0d6d15c14b217507d686145c169aa83a

See more details on using hashes here.

File details

Details for the file cs.app.osx.objc-20240622-py3-none-any.whl.

File metadata

File hashes

Hashes for cs.app.osx.objc-20240622-py3-none-any.whl
Algorithm Hash digest
SHA256 9ed06d1e6aab1c2a201089cfc3a561be6daeb87a50b7742646a65345f629ea23
MD5 59eb000a534c351f121716ef7c76ad5a
BLAKE2b-256 1f539f780be0f45a27384672ec9a4a957dc207631d7ebe50057219071f53e1f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page