Getting Startedο
Installationο
Tukuy can be installed using pip:
pip install tukuy
Basic Usageο
Tukuy provides a flexible and powerful way to transform data with a simple, intuitive API. Hereβs a quick example to get you started:
from tukuy import TukuyTransformer
# Create a transformer instance
TUKUY = TukuyTransformer()
# Basic text transformation
text = " Hello World! "
result = TUKUY.transform(text, [
"strip",
"lowercase",
{"function": "truncate", "length": 5}
])
print(result) # "hello..."
Transformation Chainsο
Tukuy allows you to chain multiple transformations together:
# Chain multiple transformations in a single call
html = "<div>Hello <b>World</b>!</div>"
result = TUKUY.transform(html, [
"strip_html_tags",
"lowercase"
])
print(result) # "hello world!"
# Date transformation
date_str = "2023-01-01"
age = TUKUY.transform(date_str, [
{"function": "age_calc"}
])
print(age) # Age in years
Validationο
Tukuy provides built-in validation for various data types:
# Email validation
email = "test@example.com"
valid = TUKUY.transform(email, ["email_validator"])
print(valid) # "test@example.com" or None if invalid
# URL validation
url = "https://example.com"
valid = TUKUY.transform(url, ["url_validator"])
print(valid) # "https://example.com" or None if invalid
Next Stepsο
Explore the User Guide for more detailed instructions
Check out the Examples for practical use cases
Browse the <no title> for API reference