py-text
A suite text tools for python
Installation
The lastest stable is py-text-1.2.tar.gz
python setup.py install
Getting Start
awk demo for py-text:
from text import awk
data = ['root:x:0:0:root:/root:/bin/bash',
'daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin',
'bin:x:2:2:bin:/bin:/usr/sbin/nologin']
resut = awk.awk(data, None, ':', [0,4,5])
print result
[['root', 'root', '/root'], ['daemon', 'daemon', '/usr/sbin'], ['bin', 'bin', '/bin']]
string_utils demo for py-text:
from text import string_util
print 'substring_before : ' + string_utils.substring_before('one world one dream', 'one dream').strip() + '\n'
print 'abbreviate : ' + string_utils.abbreviate('abcdef', 3, 3) + '\n'
print 'count_matches : ' + string_utils.count_matches('one world one dream', 'one') + '\n'
substring_before : one world
abbreviate : abc***
count_matches : 2
regex_utils demo for py-text:
from text import regex_util
print 'check_line : ' + regex_utils.check_line('.*(\d+.\d+.\d+.\d+)', 'MyIP is 192.168.199.4') + '\n'
print 'parse_line : ' + str(regex_utils.parse_line('name=(\S+), type=(\S+)', 'name=ASA5505, type=Firewall)) + '\n'
check_line : True
parse_line : ['ASA5505', 'Firewall']
Documentation
Full documentation is hosted on [HERE](). Sources are available in the docs/ directory.
License
py-text is licensed under the Apache License, Version 2.0. See LICENSE for full license text
Metadata
Release files for py-text 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py-text-1.2.tar.gz | 19.7 kB | Without provenance | Details for py-text-1.2.tar.gz |
Release files / py-text-1.2.tar.gz
| Download URL | py-text-1.2.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
095081d88d4621aa08d8911b175aa05e8d00f854db73949d5854053b8195d299
|
|
BLAKE2b-256 checksum How to use checksums |
59b64445a396726255b1f4ac522ad09adbef1a9b3efaff458d46b6690a75440b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for py-text 1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.