Name | mojipack JSON |
Version |
2.0.0
JSON |
| download |
home_page | |
Summary | Encode binary data into fun emoji strings! |
upload_time | 2023-08-13 17:35:04 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | |
keywords |
emoji
encoding
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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:
```shell
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.
```python
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:
```python
import mojipack
import msgpack
MOJIPACK_MESSAGE = "π¦βπβπΊβπ¦βπβπ₯°βπβπ¦βπ©β ..."
data = mojipack.decode(MOJIPACK_MESSAGE)
print(
repr(
msgpack.unpackb(data)
)
)
```
Raw data
{
"_id": null,
"home_page": "",
"name": "mojipack",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "emoji,encoding",
"author": "",
"author_email": "BrinkerVII <brinkervii@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/29/65/04d4875a34b66b4b79e02143cca2467c465d4ddc3e472df7a1c88c74b38f/mojipack-2.0.0.tar.gz",
"platform": null,
"description": "# Mojipack\n\nEncode any collection of bytes into a fun square of emojis. It's like base64, but more colourful!\n\n```\n\ud83d\udce6\u200c\ud83d\udc96\u200c\ud83c\udf3a\u200c\ud83e\udd8b\u200c\ud83c\udf08\u200c\ud83e\udd70\u200c\ud83d\ude02\u200c\ud83d\udc26\u200c\ud83c\udf69\u200c\ud83d\udcb5\u200c\ud83d\ude22\u200c\ud83e\udd84\n\ud83c\udf4e\u200c\ud83c\udf4e\u200c\ud83c\udf4e\u200c\ud83c\udf4e\u200c\ud83c\udf4e\u200c\ud83d\udc0c\u200c\u23f0\u200c\ud83d\udcaa\u200c\ud83d\udc4c\u200c\ud83c\udf8a\u200c\ud83d\udc93\u200c\ud83d\udc96\n\ud83c\udf82\u200c\ud83d\udcb8\u200c\ud83e\udde1\u200c\ud83c\udf08\u200c\ud83d\ude43\u200c\ud83c\udfb5\u200c\ud83d\udc49\u200c\ud83c\udf37\u200c\ud83d\udc93\u200c\ud83d\udc49\u200c\ud83d\udce2\u200c\ud83d\udcfa\n\ud83d\ude43\u200c\ud83d\udc36\u200c\ud83d\udc96\u200c\ud83c\udf3b\u200c\ud83d\udcb8\u200c\ud83d\ude22\u200c\ud83d\ude80\u200c\ud83d\udcad\u200c\ud83c\udf08\u200c\ud83d\udcb0\u200c\ud83d\ude43\u200c\ud83d\ude43\n\ud83e\udd17\u200c\ud83d\udc2f\u200c\ud83c\udf40\u200c\ud83d\udcab\u200c\ud83e\udd17\u200c\ud83d\ude24\u200c\ud83d\udcab\u200c\ud83d\udc8e\u200c\ud83e\udd27\u200c\ud83c\udfb5\u200c\ud83d\udce3\u200c\ud83d\udcfa\n\ud83d\udcfa\u200c\ud83e\udd27\u200c\ud83d\udc2f\u200c\ud83d\ude24\u200c\ud83d\udc98\u200c\ud83d\ude42\u200c\ud83d\udc3b\u200c\ud83c\udf37\u200c\ud83d\ude31\u200c\ud83d\ude1e\u200c\ud83c\udf1e\u200c\ud83d\ude39\n\ud83d\udc49\u200c\ud83e\udd2d\u200c\ud83d\udcaa\u200c\ud83d\udcaa\u200c\ud83d\ude80\u200c\ud83d\udcaa\u200c\ud83d\udc93\u200c\ud83e\udd8b\u200c\ud83d\udcb0\u200c\ud83d\udcb0\u200c\ud83d\ude31\u200c\ud83d\ude31\n\ud83d\ude0f\u200c\ud83c\udf4e\u200c\ud83d\ude22\u200c\ud83e\udd27\u200c\ud83c\udf3a\u200c\ud83c\udf3a\u200c\ud83c\udf53\u200c\ud83d\udc4c\u200c\ud83e\udd27\u200c\ud83d\udcaa\u200c\ud83c\udf40\u200c\ud83e\udd84\n\ud83e\udd84\u200c\u23f0\u200c\ud83d\ude1a\u200c\ud83d\udce2\u200c\ud83c\udf3b\u200c\ud83d\ude31\u200c\ud83c\udf08\u200c\ud83d\udcad\u200c\ud83d\udccc\u200c\ud83e\udd27\u200c\ud83d\udccc\u200c\ud83d\ude3b\n\ud83c\udf80\u200c\ud83d\udcab\u200c\ud83c\udf37\u200c\ud83d\ude24\u200c\ud83d\ude31\u200c\ud83e\udd2f\u200c\ud83e\udd74\u200c\ud83e\udd2f\u200c\ud83d\udcfa\u200c\ud83e\udd84\u200c\ud83e\udd74\u200c\ud83c\udf53\n\ud83d\ude43\u200c\ud83d\udc8b\u200c\ud83d\udc36\u200c\ud83e\udd17\u200c\ud83c\udf40\u200c\ud83d\udc2f\u200c\ud83d\ude22\u200c\ud83d\udc49\u200c\ud83d\ude39\u200c\ud83d\ude10\u200c\ud83d\udcab\u200c\ud83d\udc98\n\ud83d\udc0c\u200c\ud83c\udf4e\u200c\ud83d\ude03\u200c\ud83c\udf37\u200c\ud83d\ude03\u200c\ud83e\udd27\u200c\ud83c\udfb5\u200c\ud83d\udccc\u200c\ud83e\udd2f\u200c\ud83d\udc4c\u200c\ud83d\ude80\u200c\ud83d\ude04\n\ud83d\ude24\u200c\ud83e\udd2d\u200c\ud83c\udf08\u200c\ud83d\ude0f\u200c\ud83d\ude1a\u200c\ud83d\udcb0\u200c\ud83d\udc98\n```\n\n# Installation\n\nMojipack is on PyPI! So all you need to get started is to install it with pip:\n```shell\npip install mojipack\n```\n\n# Usage\n\nHere is how you create a mojipack encoded payload. The example uses msgpack for inner encoding. You could also use UTF-8\nencoded json if you don't want to install more packages.\n```python\nimport mojipack\nimport msgpack\n\ndata = msgpack.packb(\n {\n \"name\": \"Jane Doe\",\n \"age\": 21,\n \"city\": \"New York\",\n \"is_student\": False\n },\n use_bin_type=True\n)\n\noutput = mojipack.encode(data)\n\nprint(output)\n```\n\nDecoding is just as simple:\n```python\nimport mojipack\nimport msgpack\n\nMOJIPACK_MESSAGE = \"\ud83d\udce6\u200c\ud83d\udc96\u200c\ud83c\udf3a\u200c\ud83e\udd8b\u200c\ud83c\udf08\u200c\ud83e\udd70\u200c\ud83d\ude02\u200c\ud83d\udc26\u200c\ud83c\udf69\u200c ...\"\n\ndata = mojipack.decode(MOJIPACK_MESSAGE)\n\nprint(\n repr(\n msgpack.unpackb(data)\n )\n)\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Encode binary data into fun emoji strings!",
"version": "2.0.0",
"project_urls": {
"homepage": "https://gitlab.com/brinkervii/mojipack",
"repository": "https://gitlab.com/brinkervii/mojipack"
},
"split_keywords": [
"emoji",
"encoding"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "761ebe6de821757e0588397202e0226a7147c374ea33a5fe2f78fbc19341b56d",
"md5": "a2a0ca9890d40e538c1db56fba0a1afd",
"sha256": "4a7587ae240716c62176d994487bf4bf2a1a691dc9864e9f869d65b9e45687d0"
},
"downloads": -1,
"filename": "mojipack-2.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a2a0ca9890d40e538c1db56fba0a1afd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6301,
"upload_time": "2023-08-13T17:35:02",
"upload_time_iso_8601": "2023-08-13T17:35:02.767463Z",
"url": "https://files.pythonhosted.org/packages/76/1e/be6de821757e0588397202e0226a7147c374ea33a5fe2f78fbc19341b56d/mojipack-2.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "296504d4875a34b66b4b79e02143cca2467c465d4ddc3e472df7a1c88c74b38f",
"md5": "374a880e89f0d84035bf468b4c6043b6",
"sha256": "4d0d3f87209230e88cf4424411c83b0e328318a2c96f95c848a876d4ef028ca6"
},
"downloads": -1,
"filename": "mojipack-2.0.0.tar.gz",
"has_sig": false,
"md5_digest": "374a880e89f0d84035bf468b4c6043b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 15875,
"upload_time": "2023-08-13T17:35:04",
"upload_time_iso_8601": "2023-08-13T17:35:04.756326Z",
"url": "https://files.pythonhosted.org/packages/29/65/04d4875a34b66b4b79e02143cca2467c465d4ddc3e472df7a1c88c74b38f/mojipack-2.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-13 17:35:04",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "brinkervii",
"gitlab_project": "mojipack",
"lcname": "mojipack"
}