Skip to main content

Python convenient utilities for personal usage

Project description

markkk

Convenient Python utilities for personal usage

Install

pip install markkk

Usage

sub-module: check_text_encoding

  • is_ascii
  • check_non_ascii_index
  • is_ascii_only_file
  • check_file_by_line
  • ensure_no_zh_punctuation
  • replace_punc_for_file

Example:

from markkk.pyutils import *

replace_punc_for_file("test.txt")
is_ascii("。") # this returns false

Development

Install package using local version

clone this repo

git clone https://github.com/MarkHershey/python-utils.git

go to project root

cd python-utils

create virtual env for this project

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools  wheel
pip install -r requirements.txt

install this package in editable mode

pip install -e .[dev]

Run Unittest

at project root

tox

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

markkk-0.0.7.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

markkk-0.0.7-py3-none-any.whl (4.4 kB view hashes)

Uploaded Python 3

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