k3fmt
It provides with several string operation functions.
k3fmt is a component of pykit3 project: a python3 toolkit set.
Name
k3fmt
It provides with several string operation functions.
Status
This library is considered production ready.
Install
pip install k3fmt
Synopsis
import k3fmt
lines = [
'hello',
'world',
]
# add left padding to each line in a string
k3fmt.line_pad('\n'.join(lines), ' ' * 4)
# " hello"
# " world"
# format a multi-row line
items = ['name:',
['John',
'j is my nick'
],
'age:',
26,
'experience:',
['2000 THU',
'2006 sina',
'2010 other'
],
]
k3fmt.format_line(items, sep=' | ', aligns='llllll')
# outputs:
# name: | John | age: | 26 | experience: | 2000 THU
# | j is my nick | | | | 2006 sina
# | | | | | 2010 other
Author
Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Copyright and License
The MIT License (MIT)
Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Metadata
Release files for k3fmt 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| k3fmt-0.1.4.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| k3fmt-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.4 kB
Release files / k3fmt-0.1.4.tar.gz
| Download URL | k3fmt-0.1.4.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05e1c27626a21d9e27882a2718a71471faedc3b9031f1eb8323e4eb02127b03d
|
|
BLAKE2b-256 checksum How to use checksums |
492fce8103225687387c9f60e57d7601ac1d76745a3fc9b8a4ff604578993cf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / k3fmt-0.1.4-py3-none-any.whl
| Download URL | k3fmt-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bb56eb7e4296c7975ed321661b05b9ad35f65933442f2310dd23e5f029bd0dc
|
|
BLAKE2b-256 checksum How to use checksums |
2668e0116f1d38425da4bca6aebd845975d0b51c045a37a0761eacb75cf4c878
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|