|
1 |
| -Python String Utils Documentation |
2 |
| -================================= |
| 1 | +Python String Utils: Overview |
| 2 | +----------------------------- |
| 3 | + |
| 4 | +This is a handy library to validate, manipulate and generate strings, which is: |
| 5 | + |
| 6 | +- Simple and "pythonic" |
| 7 | +- Fully documented and with examples! |
| 8 | +- 100% code coverage! |
| 9 | +- Tested against all officially supported Python versions: 3.5, 3.6, 3.7, 3.8. |
| 10 | +- Fast (mostly based on compiled regex) |
| 11 | +- Free from external dependencies |
| 12 | +- PEP8 complaint |
| 13 | + |
3 | 14 |
|
4 | 15 | Installing
|
5 | 16 | ----------
|
6 | 17 |
|
7 | 18 | >>> pip install python-string-utils
|
8 | 19 |
|
9 | 20 |
|
| 21 | +Library structure |
| 22 | +----------------- |
| 23 | + |
| 24 | +The library basically consists in the python package `string_utils`, containing the following modules: |
| 25 | + |
| 26 | +- `validation.py` (contains string check api) |
| 27 | +- `manipulation.py` (contains string transformation api) |
| 28 | +- `generation.py` (contains string generation api) |
| 29 | +- `errors.py` (contains library-specific errors) |
| 30 | +- `_regex.py` (contains compiled regex **FOR INTERNAL USAGE ONLY**) |
| 31 | + |
| 32 | +Plus a secondary package `tests` which includes several submodules. |
| 33 | +Specifically one for each test suite and named according to the api to test (eg. tests for `is_ip()` |
| 34 | +will be in `test_is_ip.py` and so on). |
| 35 | + |
| 36 | +All the public API are importable directly from the main package `string_utils`, so this: |
| 37 | + |
| 38 | +>>> from string_utils.validation import is_ip |
| 39 | + |
| 40 | +can be simplified as: |
| 41 | + |
| 42 | +>>> from string_utils import is_ip |
| 43 | + |
| 44 | + |
10 | 45 | Modules
|
11 | 46 | -------
|
12 | 47 |
|
|
0 commit comments