Skip to main content

Encode binary data into fun emoji strings!

Project description

Mojipack

Encode any collection of bytes into a fun square of emojis. It's like base64, but more colourful!

๐Ÿ“ฆโ€Œ๐Ÿ’–โ€Œ๐ŸŒบโ€Œ๐Ÿฆ‹โ€Œ๐ŸŒˆโ€Œ๐Ÿฅฐโ€Œ๐Ÿ˜‚โ€Œ๐Ÿฆโ€Œ๐Ÿฉโ€Œ๐Ÿ’ตโ€Œ๐Ÿ˜ขโ€Œ๐Ÿฆ„
๐ŸŽโ€Œ๐ŸŽโ€Œ๐ŸŽโ€Œ๐ŸŽโ€Œ๐ŸŽโ€Œ๐ŸŒโ€Œโฐโ€Œ๐Ÿ’ชโ€Œ๐Ÿ‘Œโ€Œ๐ŸŽŠโ€Œ๐Ÿ’“โ€Œ๐Ÿ’–
๐ŸŽ‚โ€Œ๐Ÿ’ธโ€Œ๐Ÿงกโ€Œ๐ŸŒˆโ€Œ๐Ÿ™ƒโ€Œ๐ŸŽตโ€Œ๐Ÿ‘‰โ€Œ๐ŸŒทโ€Œ๐Ÿ’“โ€Œ๐Ÿ‘‰โ€Œ๐Ÿ“ขโ€Œ๐Ÿ“บ
๐Ÿ™ƒโ€Œ๐Ÿถโ€Œ๐Ÿ’–โ€Œ๐ŸŒปโ€Œ๐Ÿ’ธโ€Œ๐Ÿ˜ขโ€Œ๐Ÿš€โ€Œ๐Ÿ’ญโ€Œ๐ŸŒˆโ€Œ๐Ÿ’ฐโ€Œ๐Ÿ™ƒโ€Œ๐Ÿ™ƒ
๐Ÿค—โ€Œ๐Ÿฏโ€Œ๐Ÿ€โ€Œ๐Ÿ’ซโ€Œ๐Ÿค—โ€Œ๐Ÿ˜คโ€Œ๐Ÿ’ซโ€Œ๐Ÿ’Žโ€Œ๐Ÿคงโ€Œ๐ŸŽตโ€Œ๐Ÿ“ฃโ€Œ๐Ÿ“บ
๐Ÿ“บโ€Œ๐Ÿคงโ€Œ๐Ÿฏโ€Œ๐Ÿ˜คโ€Œ๐Ÿ’˜โ€Œ๐Ÿ™‚โ€Œ๐Ÿปโ€Œ๐ŸŒทโ€Œ๐Ÿ˜ฑโ€Œ๐Ÿ˜žโ€Œ๐ŸŒžโ€Œ๐Ÿ˜น
๐Ÿ‘‰โ€Œ๐Ÿคญโ€Œ๐Ÿ’ชโ€Œ๐Ÿ’ชโ€Œ๐Ÿš€โ€Œ๐Ÿ’ชโ€Œ๐Ÿ’“โ€Œ๐Ÿฆ‹โ€Œ๐Ÿ’ฐโ€Œ๐Ÿ’ฐโ€Œ๐Ÿ˜ฑโ€Œ๐Ÿ˜ฑ
๐Ÿ˜โ€Œ๐ŸŽโ€Œ๐Ÿ˜ขโ€Œ๐Ÿคงโ€Œ๐ŸŒบโ€Œ๐ŸŒบโ€Œ๐Ÿ“โ€Œ๐Ÿ‘Œโ€Œ๐Ÿคงโ€Œ๐Ÿ’ชโ€Œ๐Ÿ€โ€Œ๐Ÿฆ„
๐Ÿฆ„โ€Œโฐโ€Œ๐Ÿ˜šโ€Œ๐Ÿ“ขโ€Œ๐ŸŒปโ€Œ๐Ÿ˜ฑโ€Œ๐ŸŒˆโ€Œ๐Ÿ’ญโ€Œ๐Ÿ“Œโ€Œ๐Ÿคงโ€Œ๐Ÿ“Œโ€Œ๐Ÿ˜ป
๐ŸŽ€โ€Œ๐Ÿ’ซโ€Œ๐ŸŒทโ€Œ๐Ÿ˜คโ€Œ๐Ÿ˜ฑโ€Œ๐Ÿคฏโ€Œ๐Ÿฅดโ€Œ๐Ÿคฏโ€Œ๐Ÿ“บโ€Œ๐Ÿฆ„โ€Œ๐Ÿฅดโ€Œ๐Ÿ“
๐Ÿ™ƒโ€Œ๐Ÿ’‹โ€Œ๐Ÿถโ€Œ๐Ÿค—โ€Œ๐Ÿ€โ€Œ๐Ÿฏโ€Œ๐Ÿ˜ขโ€Œ๐Ÿ‘‰โ€Œ๐Ÿ˜นโ€Œ๐Ÿ˜โ€Œ๐Ÿ’ซโ€Œ๐Ÿ’˜
๐ŸŒโ€Œ๐ŸŽโ€Œ๐Ÿ˜ƒโ€Œ๐ŸŒทโ€Œ๐Ÿ˜ƒโ€Œ๐Ÿคงโ€Œ๐ŸŽตโ€Œ๐Ÿ“Œโ€Œ๐Ÿคฏโ€Œ๐Ÿ‘Œโ€Œ๐Ÿš€โ€Œ๐Ÿ˜„
๐Ÿ˜คโ€Œ๐Ÿคญโ€Œ๐ŸŒˆโ€Œ๐Ÿ˜โ€Œ๐Ÿ˜šโ€Œ๐Ÿ’ฐโ€Œ๐Ÿ’˜

Installation

Mojipack is on PyPI! So all you need to get started is to install it with pip:

pip install mojipack

Usage

Here is how you create a mojipack encoded payload. The example uses msgpack for inner encoding. You could also use UTF-8 encoded json if you don't want to install more packages.

import mojipack
import msgpack

data = msgpack.packb(
    {
        "name": "Jane Doe",
        "age": 21,
        "city": "New York",
        "is_student": False
    },
    use_bin_type=True
)

output = mojipack.encode(data)

print(output)

Decoding is just as simple:

import mojipack
import msgpack

MOJIPACK_MESSAGE = "๐Ÿ“ฆโ€Œ๐Ÿ’–โ€Œ๐ŸŒบโ€Œ๐Ÿฆ‹โ€Œ๐ŸŒˆโ€Œ๐Ÿฅฐโ€Œ๐Ÿ˜‚โ€Œ๐Ÿฆโ€Œ๐Ÿฉโ€Œ ..."

data = mojipack.decode(MOJIPACK_MESSAGE)

print(
    repr(
        msgpack.unpackb(data)
    )
)

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

mojipack-2.0.0.tar.gz (15.9 kB view hashes)

Uploaded Source

Built Distribution

mojipack-2.0.0-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

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