Skip to main content

Surrogates

surrogates is a small, tested Python 3 package to encode and decode pairs of surrogate characters in Python strings. It is licensed under the MIT license.

Installation

# pip3 install --user surrogates

Usage

# python3 -m IPython
[..]
In [1]: import surrogates

In [2]: surrogates.encode('😘')
Out[2]: '\ud83d\ude18'

In [3]: surrogates.decode('\uD83D\uDE18')
Out[3]: '😘'

In [4]: hex(ord('😘'))
Out[4]: '0x1f618'

Develop & run tests

cd "$(mktemp -d)"
git clone https://github.com/hartwork/surrogates
cd surrogates/
python3 -m venv py3
source py3/bin/activate
./setup.py test

Metadata

Release files for surrogates 1.0.2

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

Source distribution (sdist)

Source distribution for surrogates 1.0.2
File Size Uploaded Provenance Actions
surrogates-1.0.2.tar.gz 4.1 kB Without provenance Details for surrogates-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for surrogates 1.0.2
File Interpreter ABI Platform Actions
surrogates-1.0.2-py3-none-any.whl Python 3 none any Details for surrogates-1.0.2-py3-none-any.whl

Total release size: 9.0 kB

Release files / surrogates-1.0.2.tar.gz

Download URL surrogates-1.0.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1d8437a20b63f2af11bc94da187ff299a1d8d9708d11a5d3ab04cba66248e81c
BLAKE2b-256 checksum
How to use checksums
626c78ee3d95ec9364f46ea5365d68e4e34a2ebde3d9ddba58cfab5140514e02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.23.3 CPython/3.6.9

Release files / surrogates-1.0.2-py3-none-any.whl

Download URL surrogates-1.0.2-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f9e5e3bd49c2d437a0e70858e73df0e470c42d156d8f59de45efc680f1e92f0
BLAKE2b-256 checksum
How to use checksums
2470f4849e93aa4d2da4045a639ae5af43abe7171c4f79d9bb7556ca8326b44b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.23.3 CPython/3.6.9

Security for surrogates 1.0.2

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