nicepython 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,320 @@
1
+ Metadata-Version: 2.4
2
+ Name: nicepython
3
+ Version: 0.1.0
4
+ Summary: Advanced OOP file and directory management library with powerful search, logging and chainable file operations.
5
+ Author-email: amin13m <aminm13aminm@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/amin13m/nicepy
8
+ Project-URL: Repository, https://github.com/amin13m/nicepy
9
+ Project-URL: Issues, https://github.com/amin13m/nicepy/issues
10
+ Keywords: pathlib,filesystem,path,file,search,logging,oop
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ License-File: license
20
+ Dynamic: license-file
21
+
22
+ Tired of writing hundreds of lines with pathlib's verbose syntax? ๐Ÿคฏ
23
+
24
+ Meet NicePath.
25
+
26
+ A clean OOP path object with dozens of short, chainable methods and properties.
27
+
28
+ No try/except boilerplate.
29
+ Just .read(), .write(), .move_to() โ€ฆ and it works.
30
+
31
+ โœจ Smart search
32
+ ๐ŸŒณ Tree visualization
33
+ ๐Ÿ“ Automatic logging of hundreds of files with a single method
34
+
35
+ Less code. More clarity.
36
+
37
+ ------------------------------------------------------------
38
+
39
+ ๐Ÿš€ NicePy
40
+
41
+ Advanced OOP File & Directory Management Library for Python
42
+ Built on top of pathlib with logging, search engine, tree view and smart utilities.
43
+
44
+ ------------------------------------------------------------
45
+
46
+ โœจ Why NicePy?
47
+
48
+ NicePath is a powerful wrapper around Pythonโ€™s built-in pathlib, designed to make file management:
49
+
50
+ โœ” Cleaner
51
+ โœ” More readable
52
+ โœ” More powerful
53
+ โœ” Fully logged
54
+ โœ” Searchable
55
+ โœ” Tree-view ready
56
+
57
+ ------------------------------------------------------------
58
+
59
+ ๐Ÿ“ฆ Installation
60
+
61
+ ๐Ÿ”น Local Development Mode
62
+
63
+ pip install -e .
64
+
65
+ ๐Ÿ”น Future PyPI Installation
66
+
67
+ pip install nicepython
68
+
69
+ ------------------------------------------------------------
70
+
71
+ ๐Ÿš€ Quick Start
72
+
73
+ from nicepy import NicePath
74
+
75
+ # Create path
76
+ p = NicePath("example.txt")
77
+
78
+ # Write data
79
+ p.write("Hello NicePy!")
80
+
81
+ # Read data
82
+ print(p.read())
83
+
84
+ # Append
85
+ p.append("\nNew Line")
86
+
87
+ # Show tree
88
+ root = NicePath(".")
89
+ print(root.tree())
90
+
91
+ # Search files
92
+ for f in root.search(suffix=".py"):
93
+ print(f.path)
94
+
95
+ ------------------------------------------------------------
96
+
97
+ ๐ŸŒณ Tree Visualization
98
+
99
+ root = NicePath("my_project")
100
+ print(root.tree(ignore_hidden=False))
101
+
102
+ Example Output:
103
+
104
+ my_project
105
+ โ”œโ”€โ”€ main.py
106
+ โ”œโ”€โ”€ nicepy
107
+ โ”‚ โ”œโ”€โ”€ core.py
108
+ โ””โ”€โ”€ README.md
109
+
110
+ ------------------------------------------------------------
111
+
112
+ ๐Ÿ”Ž Advanced Search
113
+
114
+ root.search(
115
+ name_contains="core",
116
+ suffix=".py",
117
+ recursive=True,
118
+ ignore_hidden=True
119
+ )
120
+
121
+ Supported Filters:
122
+
123
+ - name_contains
124
+ - suffix
125
+ - stem
126
+ - regex
127
+ - only_files
128
+ - only_dirs
129
+ - recursive
130
+ - ignore_hidden
131
+
132
+ If nothing is found โ†’ returns [] (never raises error)
133
+
134
+ ------------------------------------------------------------
135
+
136
+ ๐Ÿงพ logAll โ€“ Full Project Logger
137
+
138
+ Generate:
139
+ - Full tree structure
140
+ - Content of matched files
141
+ - Save everything into a file
142
+
143
+ project = NicePath("my_project")
144
+ output = NicePath("log.txt")
145
+
146
+ project.logAll(
147
+ file_output=output,
148
+ search_suffix=".py"
149
+ )
150
+
151
+ Useful for:
152
+ - Project snapshot
153
+ - Debug logging
154
+ - Code export
155
+ - Archiving structure
156
+
157
+ ------------------------------------------------------------
158
+
159
+ ๐Ÿ“š Available Methods
160
+
161
+ write(data) โ†’ Write text to file
162
+ read() โ†’ Read file content
163
+ append(data) โ†’ Append to file
164
+ delete() โ†’ Remove file or directory
165
+ copy_to(dest) โ†’ Copy file/folder
166
+ move_to(dest) โ†’ Move file/folder
167
+ search(...) โ†’ Smart search engine
168
+ tree(...) โ†’ Visual tree display
169
+ logAll(...) โ†’ Full structured log export
170
+
171
+ Properties:
172
+ exists
173
+ is_file
174
+ is_dir
175
+ size
176
+ created_time
177
+ modified_time
178
+
179
+ ------------------------------------------------------------
180
+
181
+ โš– NicePy vs pathlib
182
+
183
+ Feature | pathlib | NicePy
184
+ ------------------------------------------------------------
185
+ Basic read/write | Yes | Yes
186
+ Append built-in | No | Yes
187
+ Tree view | No | Yes
188
+ Search engine | No | Yes
189
+ Regex search | No | Yes
190
+ Logging system | No | Yes
191
+ Full project log export | No | Yes
192
+ Unified OOP interface | Basic | Advanced
193
+ Custom exceptions | No | Yes
194
+
195
+ ------------------------------------------------------------
196
+
197
+ ## โš ๏ธ Safety Limits in NicePath
198
+
199
+ NicePath library includes powerful methods like logAll, tree, and search that can traverse large directories or read/write many files.
200
+
201
+ To prevent accidental overloads, these methods have default safety limits:
202
+
203
+ - logAll: limits the maximum number of files and total size it processes.
204
+ - Default max_files=500
205
+ - Default max_total_size=10_000_000 bytes (10 MB)
206
+ - tree and search:
207
+ - Can ignore virtual environments and library folders (ignore_venv=True by default)
208
+ - Can limit recursion depth or number of entries if needed.
209
+
210
+ Behavior when limits are reached:
211
+
212
+ - The operation does not crash.
213
+ - Partial results are written to the output file.
214
+ - A warning message is logged with logger.warning stating that safety limits were reached.
215
+
216
+ Customizing Safety:
217
+
218
+ You can override safety defaults in method calls:
219
+
220
+ `python
221
+ dir = NicePath("D:/Projects")
222
+ output_file = dir / "log.txt"
223
+
224
+ dir.logAll(
225
+ file_output=output_file,
226
+ search_suffix=".py",
227
+ max_files=1000, # increase limit
228
+ max_total_size=50_000_000, # 50 MB
229
+ ignore_venv=False # include virtual environments
230
+ )
231
+
232
+ ๐Ÿ›  Logging System
233
+
234
+ All critical operations are logged:
235
+
236
+ - Start
237
+ - Success
238
+ - Failure
239
+ - Error reason
240
+
241
+ Helps debugging and production stability.
242
+
243
+ ------------------------------------------------------------
244
+
245
+ ๐Ÿงช Testing
246
+
247
+ pytest -v
248
+
249
+ ------------------------------------------------------------
250
+
251
+ ๐Ÿ— Project Structure
252
+
253
+ nicepy_python
254
+ โ”œโ”€โ”€ pycache
255
+ โ”‚ โ”œโ”€โ”€ init.pythonc
256
+ โ”‚ โ””โ”€โ”€ main.cpython-314.pyc
257
+ โ”œโ”€โ”€ nicepy
258
+ โ”‚ โ”œโ”€โ”€ pycache
259
+ โ”‚ โ”‚ โ”œโ”€โ”€ init.pyc
260
+ โ”‚ โ”‚ โ””โ”€โ”€ logger.cpython-314.pyc
261
+ โ”‚ โ”œโ”€โ”€ nicepath
262
+ โ”‚ โ”‚ โ”œโ”€โ”€ pycache
263
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ init.pyc
264
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ core.cpython-314.pyc
265
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ exceptios.cpython-314.pyc
266
+ โ”‚ โ”‚ โ”œโ”€โ”€ init.py
267
+ โ”‚ โ”‚ โ”œโ”€โ”€ core.py
268
+ โ”‚ โ”‚ โ””โ”€โ”€ exceptios.py
269
+ โ”‚ โ”œโ”€โ”€ init.py
270
+ โ”‚ โ””โ”€โ”€ logger.py
271
+ โ”œโ”€โ”€ nicepy.egg-info
272
+ โ”‚ โ”œโ”€โ”€ dependency_links.txt
273
+ โ”‚ โ”œโ”€โ”€ PKG-INFO
274
+ โ”‚ โ”œโ”€โ”€ SOURCES.txt
275
+ โ”‚ โ””โ”€โ”€ top_level.txt
276
+ โ”œโ”€โ”€ tests
277
+ โ”‚ โ”œโ”€โ”€ pycache
278
+ โ”‚ โ”‚ โ”œโ”€โ”€ test_nicepath.cpython-314-pytest-9.0.2.pyc
279
+ โ”‚ โ”‚ โ””โ”€โ”€ test_nicepath.cpython-314.pyc
280
+ โ”‚ โ”œโ”€โ”€ newfolder
281
+ โ”‚ โ”‚ โ”œโ”€โ”€ ksc.txt
282
+ โ”‚ โ”‚ โ”œโ”€โ”€ tet.txt
283
+ โ”‚ โ”‚ โ””โ”€โ”€ text.txt
284
+ โ”‚ โ””โ”€โ”€ test_nicepath.py
285
+ โ”œโ”€โ”€ init.py
286
+ โ”œโ”€โ”€ main.py
287
+ โ”œโ”€โ”€ pyproject.toml
288
+ โ””โ”€โ”€ README.md
289
+
290
+ ------------------------------------------------------------
291
+
292
+ ๐Ÿ”ฎ Roadmap
293
+
294
+ [ ] PyPI release
295
+ [ ] Async support
296
+ [ ] Caching search engine
297
+ [ ] Watchdog integration
298
+ [ ] Colored tree output
299
+ [ ] CLI interface
300
+
301
+ ------------------------------------------------------------
302
+
303
+ ๐Ÿ‘ค Author
304
+
305
+ Amin
306
+ GitHub: https://github.com/amin13m
307
+
308
+ ------------------------------------------------------------
309
+
310
+ ๐Ÿ“œ License
311
+
312
+ MIT License
313
+
314
+ ------------------------------------------------------------
315
+
316
+ ๐Ÿ’Ž Philosophy
317
+
318
+ Clean code.
319
+ Predictable behavior.
320
+ Zero surprise file handling.
@@ -0,0 +1,299 @@
1
+ Tired of writing hundreds of lines with pathlib's verbose syntax? ๐Ÿคฏ
2
+
3
+ Meet NicePath.
4
+
5
+ A clean OOP path object with dozens of short, chainable methods and properties.
6
+
7
+ No try/except boilerplate.
8
+ Just .read(), .write(), .move_to() โ€ฆ and it works.
9
+
10
+ โœจ Smart search
11
+ ๐ŸŒณ Tree visualization
12
+ ๐Ÿ“ Automatic logging of hundreds of files with a single method
13
+
14
+ Less code. More clarity.
15
+
16
+ ------------------------------------------------------------
17
+
18
+ ๐Ÿš€ NicePy
19
+
20
+ Advanced OOP File & Directory Management Library for Python
21
+ Built on top of pathlib with logging, search engine, tree view and smart utilities.
22
+
23
+ ------------------------------------------------------------
24
+
25
+ โœจ Why NicePy?
26
+
27
+ NicePath is a powerful wrapper around Pythonโ€™s built-in pathlib, designed to make file management:
28
+
29
+ โœ” Cleaner
30
+ โœ” More readable
31
+ โœ” More powerful
32
+ โœ” Fully logged
33
+ โœ” Searchable
34
+ โœ” Tree-view ready
35
+
36
+ ------------------------------------------------------------
37
+
38
+ ๐Ÿ“ฆ Installation
39
+
40
+ ๐Ÿ”น Local Development Mode
41
+
42
+ pip install -e .
43
+
44
+ ๐Ÿ”น Future PyPI Installation
45
+
46
+ pip install nicepython
47
+
48
+ ------------------------------------------------------------
49
+
50
+ ๐Ÿš€ Quick Start
51
+
52
+ from nicepy import NicePath
53
+
54
+ # Create path
55
+ p = NicePath("example.txt")
56
+
57
+ # Write data
58
+ p.write("Hello NicePy!")
59
+
60
+ # Read data
61
+ print(p.read())
62
+
63
+ # Append
64
+ p.append("\nNew Line")
65
+
66
+ # Show tree
67
+ root = NicePath(".")
68
+ print(root.tree())
69
+
70
+ # Search files
71
+ for f in root.search(suffix=".py"):
72
+ print(f.path)
73
+
74
+ ------------------------------------------------------------
75
+
76
+ ๐ŸŒณ Tree Visualization
77
+
78
+ root = NicePath("my_project")
79
+ print(root.tree(ignore_hidden=False))
80
+
81
+ Example Output:
82
+
83
+ my_project
84
+ โ”œโ”€โ”€ main.py
85
+ โ”œโ”€โ”€ nicepy
86
+ โ”‚ โ”œโ”€โ”€ core.py
87
+ โ””โ”€โ”€ README.md
88
+
89
+ ------------------------------------------------------------
90
+
91
+ ๐Ÿ”Ž Advanced Search
92
+
93
+ root.search(
94
+ name_contains="core",
95
+ suffix=".py",
96
+ recursive=True,
97
+ ignore_hidden=True
98
+ )
99
+
100
+ Supported Filters:
101
+
102
+ - name_contains
103
+ - suffix
104
+ - stem
105
+ - regex
106
+ - only_files
107
+ - only_dirs
108
+ - recursive
109
+ - ignore_hidden
110
+
111
+ If nothing is found โ†’ returns [] (never raises error)
112
+
113
+ ------------------------------------------------------------
114
+
115
+ ๐Ÿงพ logAll โ€“ Full Project Logger
116
+
117
+ Generate:
118
+ - Full tree structure
119
+ - Content of matched files
120
+ - Save everything into a file
121
+
122
+ project = NicePath("my_project")
123
+ output = NicePath("log.txt")
124
+
125
+ project.logAll(
126
+ file_output=output,
127
+ search_suffix=".py"
128
+ )
129
+
130
+ Useful for:
131
+ - Project snapshot
132
+ - Debug logging
133
+ - Code export
134
+ - Archiving structure
135
+
136
+ ------------------------------------------------------------
137
+
138
+ ๐Ÿ“š Available Methods
139
+
140
+ write(data) โ†’ Write text to file
141
+ read() โ†’ Read file content
142
+ append(data) โ†’ Append to file
143
+ delete() โ†’ Remove file or directory
144
+ copy_to(dest) โ†’ Copy file/folder
145
+ move_to(dest) โ†’ Move file/folder
146
+ search(...) โ†’ Smart search engine
147
+ tree(...) โ†’ Visual tree display
148
+ logAll(...) โ†’ Full structured log export
149
+
150
+ Properties:
151
+ exists
152
+ is_file
153
+ is_dir
154
+ size
155
+ created_time
156
+ modified_time
157
+
158
+ ------------------------------------------------------------
159
+
160
+ โš– NicePy vs pathlib
161
+
162
+ Feature | pathlib | NicePy
163
+ ------------------------------------------------------------
164
+ Basic read/write | Yes | Yes
165
+ Append built-in | No | Yes
166
+ Tree view | No | Yes
167
+ Search engine | No | Yes
168
+ Regex search | No | Yes
169
+ Logging system | No | Yes
170
+ Full project log export | No | Yes
171
+ Unified OOP interface | Basic | Advanced
172
+ Custom exceptions | No | Yes
173
+
174
+ ------------------------------------------------------------
175
+
176
+ ## โš ๏ธ Safety Limits in NicePath
177
+
178
+ NicePath library includes powerful methods like logAll, tree, and search that can traverse large directories or read/write many files.
179
+
180
+ To prevent accidental overloads, these methods have default safety limits:
181
+
182
+ - logAll: limits the maximum number of files and total size it processes.
183
+ - Default max_files=500
184
+ - Default max_total_size=10_000_000 bytes (10 MB)
185
+ - tree and search:
186
+ - Can ignore virtual environments and library folders (ignore_venv=True by default)
187
+ - Can limit recursion depth or number of entries if needed.
188
+
189
+ Behavior when limits are reached:
190
+
191
+ - The operation does not crash.
192
+ - Partial results are written to the output file.
193
+ - A warning message is logged with logger.warning stating that safety limits were reached.
194
+
195
+ Customizing Safety:
196
+
197
+ You can override safety defaults in method calls:
198
+
199
+ `python
200
+ dir = NicePath("D:/Projects")
201
+ output_file = dir / "log.txt"
202
+
203
+ dir.logAll(
204
+ file_output=output_file,
205
+ search_suffix=".py",
206
+ max_files=1000, # increase limit
207
+ max_total_size=50_000_000, # 50 MB
208
+ ignore_venv=False # include virtual environments
209
+ )
210
+
211
+ ๐Ÿ›  Logging System
212
+
213
+ All critical operations are logged:
214
+
215
+ - Start
216
+ - Success
217
+ - Failure
218
+ - Error reason
219
+
220
+ Helps debugging and production stability.
221
+
222
+ ------------------------------------------------------------
223
+
224
+ ๐Ÿงช Testing
225
+
226
+ pytest -v
227
+
228
+ ------------------------------------------------------------
229
+
230
+ ๐Ÿ— Project Structure
231
+
232
+ nicepy_python
233
+ โ”œโ”€โ”€ pycache
234
+ โ”‚ โ”œโ”€โ”€ init.pythonc
235
+ โ”‚ โ””โ”€โ”€ main.cpython-314.pyc
236
+ โ”œโ”€โ”€ nicepy
237
+ โ”‚ โ”œโ”€โ”€ pycache
238
+ โ”‚ โ”‚ โ”œโ”€โ”€ init.pyc
239
+ โ”‚ โ”‚ โ””โ”€โ”€ logger.cpython-314.pyc
240
+ โ”‚ โ”œโ”€โ”€ nicepath
241
+ โ”‚ โ”‚ โ”œโ”€โ”€ pycache
242
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ init.pyc
243
+ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ core.cpython-314.pyc
244
+ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ exceptios.cpython-314.pyc
245
+ โ”‚ โ”‚ โ”œโ”€โ”€ init.py
246
+ โ”‚ โ”‚ โ”œโ”€โ”€ core.py
247
+ โ”‚ โ”‚ โ””โ”€โ”€ exceptios.py
248
+ โ”‚ โ”œโ”€โ”€ init.py
249
+ โ”‚ โ””โ”€โ”€ logger.py
250
+ โ”œโ”€โ”€ nicepy.egg-info
251
+ โ”‚ โ”œโ”€โ”€ dependency_links.txt
252
+ โ”‚ โ”œโ”€โ”€ PKG-INFO
253
+ โ”‚ โ”œโ”€โ”€ SOURCES.txt
254
+ โ”‚ โ””โ”€โ”€ top_level.txt
255
+ โ”œโ”€โ”€ tests
256
+ โ”‚ โ”œโ”€โ”€ pycache
257
+ โ”‚ โ”‚ โ”œโ”€โ”€ test_nicepath.cpython-314-pytest-9.0.2.pyc
258
+ โ”‚ โ”‚ โ””โ”€โ”€ test_nicepath.cpython-314.pyc
259
+ โ”‚ โ”œโ”€โ”€ newfolder
260
+ โ”‚ โ”‚ โ”œโ”€โ”€ ksc.txt
261
+ โ”‚ โ”‚ โ”œโ”€โ”€ tet.txt
262
+ โ”‚ โ”‚ โ””โ”€โ”€ text.txt
263
+ โ”‚ โ””โ”€โ”€ test_nicepath.py
264
+ โ”œโ”€โ”€ init.py
265
+ โ”œโ”€โ”€ main.py
266
+ โ”œโ”€โ”€ pyproject.toml
267
+ โ””โ”€โ”€ README.md
268
+
269
+ ------------------------------------------------------------
270
+
271
+ ๐Ÿ”ฎ Roadmap
272
+
273
+ [ ] PyPI release
274
+ [ ] Async support
275
+ [ ] Caching search engine
276
+ [ ] Watchdog integration
277
+ [ ] Colored tree output
278
+ [ ] CLI interface
279
+
280
+ ------------------------------------------------------------
281
+
282
+ ๐Ÿ‘ค Author
283
+
284
+ Amin
285
+ GitHub: https://github.com/amin13m
286
+
287
+ ------------------------------------------------------------
288
+
289
+ ๐Ÿ“œ License
290
+
291
+ MIT License
292
+
293
+ ------------------------------------------------------------
294
+
295
+ ๐Ÿ’Ž Philosophy
296
+
297
+ Clean code.
298
+ Predictable behavior.
299
+ Zero surprise file handling.
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 amin13m
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software.
@@ -0,0 +1,4 @@
1
+ from .nicepath.core import NicePath
2
+ from .nicepath.exceptios import NicePathError
3
+
4
+ all = ["NicePath", "NicePathError"]
@@ -0,0 +1,51 @@
1
+ import logging
2
+ from functools import wraps
3
+
4
+
5
+ logger = logging.getLogger("nicepy")
6
+
7
+ if not logger.handlers:
8
+ handler = logging.StreamHandler()
9
+ formatter = logging.Formatter(
10
+ "(%(filename)s-%(lineno)d)[%(levelname)s] %(name)s | %(message)s"
11
+ )
12
+ handler.setFormatter(formatter)
13
+ logger.addHandler(handler)
14
+
15
+ logger.setLevel(30)
16
+
17
+
18
+
19
+ from functools import wraps
20
+ from nicepy.logger import logger
21
+
22
+
23
+ def log_operation(func):
24
+ @wraps(func)
25
+ def wrapper(self ):
26
+ logger.debug(f"{func.__name__} started -> {self._path}")
27
+ try:
28
+ result = func(self)
29
+ logger.info(f"{func.__name__} success -> {self._path}")
30
+ return result
31
+ except Exception as e:
32
+ logger.exception(
33
+ f"{func.__name__} failed -> {self._path} | Reason: {e}"
34
+ )
35
+ raise
36
+ return wrapper
37
+
38
+
39
+ from nicepy.logger import logger
40
+
41
+ def log_start(instance, func_name):
42
+ path_info = getattr(instance, "_path", "unknown")
43
+ logger.debug(f"{func_name} started -> {path_info}")
44
+
45
+ def log_end(instance, func_name):
46
+ path_info = getattr(instance, "_path", "unknown")
47
+ logger.info(f"{func_name} finished -> {path_info}")
48
+
49
+ def log_error(instance, func_name, e):
50
+ path_info = getattr(instance, "_path", "unknown")
51
+ logger.exception(f"{func_name} failed -> {path_info} | Reason: {e}")
@@ -0,0 +1 @@
1
+ from .core import NicePath