Skip to main content

Python bindings for decancer.

Project description

decancer_py

Python bindings for decancer.

Installation

You can get started with decancer_py by installing from PyPI:

pip install -U decancer-py

Usage

decancer_py can be used to turn sketchy text strings into their more basic counterparts.

Two functions are exported from decancer_py:

  • parse - Parse a jank string to a normal string.
  • contains - Check if some string contains some other string.

The contains API is altered a bit from the decancer crate.

The result from parse will always be in ALL LOWERCASE.

By default contains will attempt to parse the string and then see if the string is contained. Pass parse=False to skip the parsing step.

To be clear, using "s" in "string" is going to be more performant than calling contains due to the overhead of the FFI. The main use case is if you want to check if some regular string is in some jank string.

from decancer_py import parse


parsed = parse("𝔂EE𝓣")
assert parsed == "yeet"
from decancer_py import contains


assert contains("yeet", "ye")
assert contains("𝔂EE𝓣", "ye")
assert not contains("𝔂EE𝓣", "ye", parse=False)

License

decancer_py is licensed under the MIT License.

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

decancer_py-0.1.0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distributions

decancer_py-0.1.0-cp310-none-win_amd64.whl (123.7 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

decancer_py-0.1.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (182.8 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

decancer_py-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (181.2 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

decancer_py-0.1.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (192.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ x86-64

decancer_py-0.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (211.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ i686

decancer_py-0.1.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (341.6 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

decancer_py-0.1.0-cp39-none-win_amd64.whl (123.8 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

decancer_py-0.1.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (182.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARMv7l

decancer_py-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (181.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

decancer_py-0.1.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (192.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ x86-64

decancer_py-0.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (211.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

decancer_py-0.1.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (341.4 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

decancer_py-0.1.0-cp38-none-win_amd64.whl (123.7 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

decancer_py-0.1.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (182.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARMv7l

decancer_py-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (181.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

decancer_py-0.1.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (192.6 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ x86-64

decancer_py-0.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (212.2 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.5+ i686

decancer_py-0.1.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (341.9 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

decancer_py-0.1.0-cp37-none-win_amd64.whl (123.6 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

decancer_py-0.1.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (183.0 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARMv7l

decancer_py-0.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (181.3 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

decancer_py-0.1.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (192.6 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ x86-64

decancer_py-0.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (212.2 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.5+ i686

decancer_py-0.1.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (341.9 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

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