44[ ![ GitHub Workflow Status] ( https://img.shields.io/github/actions/workflow/status/bybatkhuu/module.python-utils/2.build-publish.yml?logo=GitHub )] ( https://github.com/bybatkhuu/module.python-utils/actions/workflows/2.build-publish.yml )
55[ ![ GitHub release (latest SemVer)] ( https://img.shields.io/github/v/release/bybatkhuu/module.python-utils?logo=GitHub&color=blue )] ( https://github.com/bybatkhuu/module.python-utils/releases )
66
7- 'potato_utils' is collection of useful utils package for python.
7+ 'potato_utils' is collection of simple useful utils package for python.
88
99## ✨ Features
1010
11- - Python module/package
12- - Configuration
13- - Test
14- - Build
15- - Documentation
16- - Scripts
17- - Examples
18- - CI/CD
11+ - Python utilities
12+ - Datetime utilities
13+ - File I/O utilities
14+ - HTTP utilities
15+ - Security utilities
16+ - Sanitation utilities
17+ - Validation utilities
1918
2019---
2120
@@ -75,11 +74,7 @@ git clone git@github.com:bybatkhuu/module.python-utils.git && \
7574** OPTION A.** [ ** RECOMMENDED** ] Install from ** PyPi** :
7675
7776``` sh
78- # Install from staging TestPyPi:
79- pip install -i https://test.pypi.org/simple -U potato_utils
80-
81- # Or install from production PyPi:
82- # pip install -U potato_utils
77+ pip install -U potato_utils
8378```
8479
8580** OPTION B.** Install latest version directly from ** GitHub** repository:
@@ -101,7 +96,7 @@ pip install -e .
10196** OPTION D.** Install for ** DEVELOPMENT** environment:
10297
10398``` sh
104- pip install -r ./requirements/requirements. dev.txt
99+ pip install -e .[ dev]
105100```
106101
107102** OPTION E.** Install from ** pre-built release** files:
@@ -136,66 +131,12 @@ cp -r ./src/potato_utils /some/path/project/
136131[ ** ` examples/simple/main.py ` ** ] ( ./examples/simple/main.py ) :
137132
138133``` python
139- # Standard libraries
140- import sys
141- import logging
142-
143- # Internal modules
144- from potato_utils import MyClass
145-
146-
147- logger = logging.getLogger(__name__ )
148-
149-
150- def main () -> None :
151- logging.basicConfig(
152- stream = sys.stdout,
153- level = logging.INFO ,
154- datefmt = " %Y-%m-%d %H:%M:%S %z" ,
155- format = " [%(asctime)s | %(levelname)s | %(filename)s :%(lineno)d ]: %(message)s " ,
156- )
157-
158- # Pre-defined variables (for customizing and testing)
159- _items = [0.1 , 0.2 , 0.3 , 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 ]
160- _config = {
161- " min_length" : 4 ,
162- " max_length" : 10 ,
163- " min_value" : 0.0 ,
164- " max_value" : 1.0 ,
165- " threshold" : 0.7 ,
166- }
167-
168- # Main example code
169- logger.info(f " Items before cleaning: { _items} " )
170- _my_object = MyClass(items = _items, config = _config)
171- _items = _my_object()
172- logger.info(f " Items after cleaning: { _items} " )
173-
174- logger.info(" Done!\n " )
175- return
176-
177-
178- if __name__ == " __main__" :
179- main()
180134```
181135
182136👍
183137
184138---
185139
186- ## ⚙️ Configuration
187-
188- [ ** ` templates/configs/config.yml ` ** ] ( ./templates/configs/config.yml ) :
189-
190- ``` yaml
191- potato_utils :
192- min_length : 2
193- max_length : 100
194- min_value : 0.0
195- max_value : 1.0
196- threshold : 0.5
197- ` ` `
198-
199140### 🌎 Environment Variables
200141
201142[ ** ` .env.example ` ** ] ( ./.env.example ) :
@@ -214,7 +155,7 @@ To run tests, run the following command:
214155
215156``` sh
216157# Install python test dependencies:
217- pip install -r ./requirements/requirements. test.txt
158+ pip install .[ test]
218159
219160# Run tests:
220161python -m pytest -sv -o log_cli=true
0 commit comments