witt-strutil 0.1.0__cp313-abi3-manylinux_2_34_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
witt_strutil/__init__.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
from polars import Expr
|
|
7
|
+
from polars.plugins import register_plugin_function
|
|
8
|
+
|
|
9
|
+
from witt_strutil._internal import __version__ as __version__
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from witt_strutil.typing import IntoExprColumn
|
|
13
|
+
|
|
14
|
+
LIB = Path(__file__).parent
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def pig_latinnify(expression: IntoExprColumn) -> Expr:
|
|
18
|
+
return register_plugin_function(plugin_path = LIB,
|
|
19
|
+
function_name = 'pig_latinnify',
|
|
20
|
+
args = [expression],
|
|
21
|
+
is_elementwise = True)
|
|
22
|
+
|
|
23
|
+
def split_by_chars(expression: IntoExprColumn, characters: str) -> Expr:
|
|
24
|
+
return register_plugin_function(plugin_path = LIB,
|
|
25
|
+
function_name = 'split_by_chars',
|
|
26
|
+
args = [expression],
|
|
27
|
+
kwargs = {'characters': characters},
|
|
28
|
+
is_elementwise = True)
|
|
29
|
+
|
|
30
|
+
def to_sentence_case(expression: IntoExprColumn) -> Expr:
|
|
31
|
+
return register_plugin_function(plugin_path = LIB,
|
|
32
|
+
function_name = 'to_sentence_case',
|
|
33
|
+
args = [expression],
|
|
34
|
+
is_elementwise = True)
|
|
35
|
+
|
|
36
|
+
def to_sponge_case(expression: IntoExprColumn) -> Expr:
|
|
37
|
+
return register_plugin_function(plugin_path = LIB,
|
|
38
|
+
function_name = 'to_sponge_case',
|
|
39
|
+
args = [expression],
|
|
40
|
+
is_elementwise = True)
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__: str
|
witt_strutil/typing.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Union
|
|
2
|
+
|
|
3
|
+
if TYPE_CHECKING:
|
|
4
|
+
import sys
|
|
5
|
+
import polars as pl
|
|
6
|
+
|
|
7
|
+
if sys.version_info >= (3, 10):
|
|
8
|
+
from typing import TypeAlias
|
|
9
|
+
else:
|
|
10
|
+
from typing_extensions import TypeAlias
|
|
11
|
+
from polars.datatypes import DataType, DataTypeClass
|
|
12
|
+
|
|
13
|
+
IntoExprColumn: TypeAlias = Union[pl.Expr, str, pl.Series]
|
|
14
|
+
PolarsDataType: TypeAlias = Union[DataType, DataTypeClass]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: witt-strutil
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
|
+
Requires-Python: >=3.13
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
witt_strutil-0.1.0.dist-info/METADATA,sha256=Ma1XTyzSvBNt5FJ6fE9aS6awrR0IAzzZGCxQbDq-dfA,262
|
|
2
|
+
witt_strutil-0.1.0.dist-info/WHEEL,sha256=WxAu1dAPXjFx5bLD_Iqx2mZ_Wwda1Hlbwi2H5iUcBTQ,107
|
|
3
|
+
witt_strutil/__init__.py,sha256=W1m-7DefDnPgLdsXXNzADy6QiBglvNfAEDl2VeyyxTQ,1681
|
|
4
|
+
witt_strutil/_internal.abi3.so,sha256=31vYbaA1PCqF47PhqcuZ_5uErjApt2Qv3wgeoNy7eYE,22054336
|
|
5
|
+
witt_strutil/_internal.pyi,sha256=tamVWOG4TE5RF4aAU_Uoxh3pVdT7xUAyNCR_CIstnbY,16
|
|
6
|
+
witt_strutil/typing.py,sha256=fB4PnbRz4yJiDx4OYUI7tEPeBCoGmTJdXjIBDG3iVOo,413
|
|
7
|
+
witt_strutil-0.1.0.dist-info/RECORD,,
|