Skip to main content

objc-types-decoder

Python application Pypi version Downloads

A type decoder for Objective-C types.

It translates the encoded Objective-C type notation, the notation that the @encode function returns, into a readable form that tries to be as close as possible to the original type definition.

For example, lets look at the following @encode:

NSLog(@"%s", @encode(float **)); // "^^f" will be printed.

Using our decoder, we can "reverse" the process:

from objc_types_decoder.decode import decode

print(decode('^^f'))  # 'float * *' will be printed.

Installation

In order to install this package, just use a regular pip installation:

pip install objc_types_decoder

Usage

In order to use the decoder, just run the main with your desired encoded type:

>> py -m objc_types_decoder ^f
float *

You can also decode by importing it in your python code:

>> from objc_types_decoder.decode import decode
>> decode('{NSObject=#}')
'struct NSObject { Class x0; }'

Sometimes, you might want to keep the tail of the parsed data. For this case, you can use decode_with_tail.

>> from objc_types_decoder.decode import decode_with_tail
>> decode_with_tail('fyour boat')
('float', 'your boat')

Metadata

Release files for objc-types-decoder 0.0.5

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

Source distribution (sdist)

Source distribution for objc-types-decoder 0.0.5
File Size Uploaded Provenance
objc_types_decoder-0.0.5.tar.gz 5.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for objc-types-decoder 0.0.5
File Interpreter ABI Platform
objc_types_decoder-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 12.0 kB

Release files / objc_types_decoder-0.0.5.tar.gz

Download URL objc_types_decoder-0.0.5.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2a48bfe9814ad8b3a1cc45bd1b243c3dbc641b53982b22625265ba1eaa2c746b
BLAKE2b-256 checksum
How to use checksums
5cd15eee97966da549b0fd48504ddedc8fb26a647e7d5bedde43769a512e58c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / objc_types_decoder-0.0.5-py3-none-any.whl

Download URL objc_types_decoder-0.0.5-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f675954ae1851b8e6cab36cfa6a540eb328ce523d5b8b8109800f16594965980
BLAKE2b-256 checksum
How to use checksums
032437a4d150edaa22259c199a550ea8764ed94ebdecb28492507f200b616aeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Security for objc-types-decoder 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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