A Yasuo Python package
Project description
Yasuo Functions for Python
This package provides a collection of utility functions that can be used to handle text and data in Python.
Installation
Install Yasuo Package
pip install yasuo
In your code, please import
from yasuo import *
List of Functions
- Converts a Vietnamese string with diacritics to a string without diacritics.
convert(text: str) -> str
- Converts a Vietnamese string with diacritics to a string without diacritics using the unidecode library.
remove_accents(text: str) -> str
- Converts a string to lowercase and removes diacritics.
normalized(s: str) -> str
- Removes extra spaces from a string and returns a new string with single spaces.
keep_single_spaces(s: str) -> str
- Splits a list into smaller chunks of length step.
create_chunks(src: list, step: int) -> list
- Recursively converts byte strings in a dictionary to Unicode strings.
reformat_dict(data: dict) -> dict
- Checks if a list has duplicate elements.
list_has_duplicates(mylist: list) -> bool
- Removes duplicates from a list.
remove_duplicate_from_list(a_list: list) -> list
- Checks if a string is a valid JSON.
is_json(str_input: str) -> bool
- Generates a random string of letters and digits.
random_string(length: int = 6) -> str
- Converts a snake_case string to camelCase.
camel_case(s: str) -> str
- Generates a URL-friendly string by removing all characters except letters, digits, and hyphens.
generate_url_key(a_string: str) -> str
- Flattens a 2D list into a 1D list.
flatten_list(a_list: list) -> list
- Returns the current time in UTC for a given local timezone.
get_utc_time(local_name: str, fmt: str = None) -> str
- Returns the difference between two dictionaries in a list of dictionaries. Each dictionary in the list contains the key, the old value, and the new value.
dict_diff(old_dict: dict, new_dict: dict) -> list
- Decapitalizes the first character in a string.
decapitalize(a_str: str) -> str
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yasuo-1.0.1.tar.gz
(4.9 kB
view hashes)
Built Distribution
yasuo-1.0.1-py3-none-any.whl
(5.3 kB
view hashes)