Skip to content

Commit 58d04e8

Browse files
committed
pacakge specification
1 parent 723d67e commit 58d04e8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

anonympy/__init__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
'''
2+
Package for data anonymization of different data types
3+
such as tabular, text, images and sound.
4+
'''
5+
6+
__version__ = "0.1.1"
7+
8+
# Check if all dependencies have been installed
9+
10+
hard_dependencies = ("faker", "cape_privacy", "pandas", "numpy")
11+
missing_dependencies = []
12+
13+
for dependency in hard_dependencies:
14+
try:
15+
__import__(dependency)
16+
except ImportError as e:
17+
missing_dependencies.append(f"{dependency}: {e}")
18+
19+
if missing_dependencies:
20+
raise ImportError(
21+
"Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
22+
)
23+
del hard_dependencies, dependency, missing_dependencies
24+
25+
26+
from anonympy import pandas
27+
from anonympy import images
28+
from anonympy import sound
29+
from anonympy import text
30+
31+
__all__ = ["pandas", "tabular", "sound", "text"]

0 commit comments

Comments
 (0)