smartdirs 0.0.1__py3-none-any.whl
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.
smartdirs/__init__.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from attrs import define
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@define
|
|
8
|
+
class SmartDirs:
|
|
9
|
+
|
|
10
|
+
package: Path
|
|
11
|
+
"""
|
|
12
|
+
Path to the local or site-dirs python package
|
|
13
|
+
|
|
14
|
+
Tip: Send the importer's `__file__` global here!
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
name: str
|
|
18
|
+
"""
|
|
19
|
+
Application name for directories
|
|
20
|
+
|
|
21
|
+
Tip: Send the importer's `__package__` global
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
author: str
|
|
25
|
+
"""Author or vendor name for directories"""
|
|
26
|
+
|
|
27
|
+
version: Optional[str] = None
|
|
28
|
+
|
|
29
|
+
def __attrs_post_init__(self):
|
|
30
|
+
self.package = Path(self.package)
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def resources(self) -> Path:
|
|
34
|
+
"""Path to the resources directory"""
|
|
35
|
+
return self.package.joinpath("resources")
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
smartdirs/__init__.py,sha256=TU5DOy8Wz35Ef9YUGRipUsnpbB08hl2KAg-t2hxp9Aw,686
|
|
2
|
+
smartdirs-0.0.1.dist-info/METADATA,sha256=UFafDJdvuqWIVQOghsH8T19I5PGdQ1NUuBicp3al8lo,183
|
|
3
|
+
smartdirs-0.0.1.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
4
|
+
smartdirs-0.0.1.dist-info/RECORD,,
|