{"id":17928468,"url":"https://github.com/hartwork/surrogates","last_synced_at":"2025-09-18T12:30:51.161Z","repository":{"id":36381485,"uuid":"224004294","full_name":"hartwork/surrogates","owner":"hartwork","description":" :relieved: Encode and decode pairs of surrogate characters in Python 3","archived":false,"fork":false,"pushed_at":"2022-03-09T02:27:59.000Z","size":12,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T10:05:39.916Z","etag":null,"topics":["emoji","emoji-unicode","python","python3","surrogates","unicode"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/surrogates/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hartwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-25T17:26:29.000Z","updated_at":"2022-11-17T11:03:55.000Z","dependencies_parsed_at":"2022-08-08T14:30:35.379Z","dependency_job_id":null,"html_url":"https://github.com/hartwork/surrogates","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hartwork%2Fsurrogates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hartwork%2Fsurrogates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hartwork%2Fsurrogates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hartwork%2Fsurrogates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hartwork","download_url":"https://codeload.github.com/hartwork/surrogates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233478598,"owners_count":18682229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emoji","emoji-unicode","python","python3","surrogates","unicode"],"created_at":"2024-10-28T21:03:12.412Z","updated_at":"2025-09-18T12:30:45.777Z","avatar_url":"https://github.com/hartwork.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Surrogates\n\n`surrogates` is a small, tested Python 3 package\nto encode and decode pairs of\n[surrogate characters](https://en.wikipedia.org/wiki/Universal_Character_Set_characters#Surrogates)\nin Python strings.\nIt is licensed under [the MIT license](https://opensource.org/licenses/MIT).\n\n\n# Installation\n```console\n# pip3 install --user surrogates\n```\n\n\n# Usage\n\n```console\n# python3 -m IPython\n[..]\nIn [1]: import surrogates\n\nIn [2]: surrogates.encode('😘')\nOut[2]: '\\ud83d\\ude18'\n\nIn [3]: surrogates.decode('\\uD83D\\uDE18')\nOut[3]: '😘'\n\nIn [4]: hex(ord('😘'))\nOut[4]: '0x1f618'\n```\n\n\n# Develop \u0026 run tests\n\n```\ncd \"$(mktemp -d)\"\ngit clone https://github.com/hartwork/surrogates\ncd surrogates/\npython3 -m venv py3\nsource py3/bin/activate\n\n./setup.py test\n\npip3 install pre-commit\npre-commit install --install-hooks\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhartwork%2Fsurrogates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhartwork%2Fsurrogates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhartwork%2Fsurrogates/lists"}