datatailr 0.1.3__py3-none-any.whl → 0.1.5__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.

Potentially problematic release.


This version of datatailr might be problematic. Click here for more details.

datatailr/__init__.py CHANGED
@@ -24,6 +24,7 @@ from datatailr.wrapper import (
24
24
  dt__System,
25
25
  dt__Tag,
26
26
  dt__User,
27
+ mock_cli_tool,
27
28
  )
28
29
  from datatailr.group import Group
29
30
  from datatailr.user import User
@@ -34,6 +35,11 @@ from datatailr.dt_json import dt_json
34
35
  from datatailr.utils import Environment, is_dt_installed
35
36
  from datatailr.version import __version__
36
37
 
38
+ system = dt__System()
39
+ if isinstance(system, mock_cli_tool):
40
+ __provider__ = "not installed"
41
+ else:
42
+ __provider__ = system.provider()
37
43
 
38
44
  __all__ = [
39
45
  "ACL",
@@ -43,6 +49,7 @@ __all__ = [
43
49
  "Image",
44
50
  "User",
45
51
  "__version__",
52
+ "__provider__",
46
53
  "dt__Blob",
47
54
  "dt__Dns",
48
55
  "dt__Email",
@@ -20,11 +20,18 @@ from typing import Callable, Optional, Tuple, Union
20
20
 
21
21
  from datatailr import ACL, Environment, User, dt__Job, is_dt_installed
22
22
  from datatailr.build.image import Image
23
+ from datatailr.errors import BatchJobError
23
24
  from datatailr.logging import DatatailrLogger
24
25
 
25
26
  logger = DatatailrLogger(os.path.abspath(__file__)).get_logger()
26
27
 
27
28
 
29
+ class RepoValidationError(BatchJobError):
30
+ def __init__(self, message: str):
31
+ super().__init__(message)
32
+ self.message = message
33
+
34
+
28
35
  class JobType(Enum):
29
36
  """
30
37
  Enum representing different types of DataTailr jobs.
@@ -220,7 +227,7 @@ class Job:
220
227
  if is_dt_installed():
221
228
  check_result = self.verify_repo_is_ready()
222
229
  if not check_result[0]:
223
- return False, check_result[1]
230
+ raise RepoValidationError(check_result[1])
224
231
  logger.info(
225
232
  f"Running job '{self.name}' in environment '{self.environment}' as '{self.run_as}'"
226
233
  )
@@ -288,11 +288,10 @@ class Batch(Job):
288
288
  return json.dumps(self.to_dict(), indent=4)
289
289
 
290
290
  def __repr__(self):
291
- jobs_repr = ", ".join(repr(job) for job in self.__jobs)
292
291
  return (
293
292
  f"Batch(name={self.name}, environment={self.environment}, "
294
293
  f"run_as={self.run_as}, resources={self.resources}, "
295
- f"acl={self.acl}, jobs=[{jobs_repr}])"
294
+ f"acl={self.acl}, {len(self.__jobs)} jobs)"
296
295
  )
297
296
 
298
297
  def set_autorun(self, auto_run):
@@ -0,0 +1,75 @@
1
+ Metadata-Version: 2.4
2
+ Name: datatailr
3
+ Version: 0.1.5
4
+ Summary: Ready-to-Use Platform That Drives Business Insights
5
+ Author-email: Datatailr <info@datatailr.com>
6
+ License-Expression: MIT
7
+ Project-URL: homepage, https://www.datatailr.com/
8
+ Project-URL: documentation, https://docs.datatailr.com/
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3 :: Only
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Environment :: Console
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Provides-Extra: dev
23
+ Requires-Dist: ruff; extra == "dev"
24
+ Requires-Dist: pre-commit; extra == "dev"
25
+ Requires-Dist: mypy; extra == "dev"
26
+ Requires-Dist: types-setuptools; extra == "dev"
27
+ Requires-Dist: toml; extra == "dev"
28
+ Requires-Dist: coverage; extra == "dev"
29
+ Dynamic: license-file
30
+
31
+ [![Datatailr Logo](https://framerusercontent.com/images/6CmFcG0o2ryoa5cMuDsvwESVWA.svg)](https://www.datatailr.com/)
32
+
33
+ ___
34
+ **Datatailr: empowers your team to streamline analytics and data workflows
35
+ from idea to production without infrastructure hurdles.**
36
+
37
+ ## What is Datatailr?
38
+
39
+ Datatailr is a platform that simplifies the process of building and deploying data applications.
40
+
41
+ It makes it easier to run and maintain large-scale data processing and analytics workloads.
42
+
43
+ ## What is this package?
44
+ This is the Python package for Datatailr, which allows you to interact with the Datatailr platform.
45
+
46
+ It provides the tools to build, deploy, and manage batch jobs, data pipelines, services and analytics applications.
47
+
48
+ Datatailr manages the underlying infrastructure so your applications can be deployed in an easy, secure and scalable way.
49
+
50
+ ## Installation
51
+
52
+ ### Installing the `dt` command line tool
53
+ Before you can use the Datatailr Python package, you need to install the `dt` command line tool.
54
+ **[INSTALLATION INSTRUCTIONS FOR DATATAILR GO HERE]**
55
+
56
+ ### Installing the Python package
57
+ You can install the Datatailr Python package using pip:
58
+ ```bash
59
+ pip install datatailr
60
+ ```
61
+
62
+ ### Testing the installation
63
+ ```python
64
+ import datatailr
65
+
66
+ print(datatailr.__version__)
67
+ print(datatailr.__provider__)
68
+ ```
69
+
70
+
71
+ ## Quickstart
72
+
73
+
74
+ ___
75
+ Visit [our website](https://www.datatailr.com/) for more!
@@ -1,4 +1,4 @@
1
- datatailr/__init__.py,sha256=Z_lrDoLOnfiVlVcp5a-jCmjCNsA3Ypne0Lkv6tOTxjA,1390
1
+ datatailr/__init__.py,sha256=god5oEAyJEGbEsxGZOwD6llaBkDNzKjCl8j2tOkiGgQ,1567
2
2
  datatailr/acl.py,sha256=gLuzw6FLFYLVoyXOS_oHMfd5uGKKzlDqR1WBdN_AGwQ,2862
3
3
  datatailr/blob.py,sha256=VImsbKBaYP6oG2Wiy4oPr6zxtUibEHpfI8p8nE1wj14,3195
4
4
  datatailr/dt_json.py,sha256=oos6hwC4UxT4TEbbXNSozQGhwnc_bfpo-Y2rj24ks9A,1422
@@ -14,16 +14,16 @@ datatailr/build/image.py,sha256=P2MiGxpzuZ6hOm9JubkLoOq-RdzKYnXbKJHiryIbJeA,3103
14
14
  datatailr/sbin/run_job.py,sha256=B3H3UI3zpll7zVm7lZLsfPtnRlA6jjk8s_D_w89pvC4,2175
15
15
  datatailr/scheduler/__init__.py,sha256=YtCnv9vuX-EPGr3WBXvXJIlLsZ94mW1dBzI6h7Yjcu0,1009
16
16
  datatailr/scheduler/arguments_cache.py,sha256=-JnAWXfHMSSkYJx8iYt9JgvdPgR-1Z8DcN5Kvcx9Amo,4574
17
- datatailr/scheduler/base.py,sha256=trsW3ETK0X00qoYYRHQrkfxoHEWhwgTrsJFVrhu6saY,7623
18
- datatailr/scheduler/batch.py,sha256=9K7Z_SIIyseXeCnochxGdyhOCijyRwty0ekdqVAcMIc,10838
17
+ datatailr/scheduler/base.py,sha256=IRduJjhng4Uuv3Y9vDqUNTbs636AgH2ZISWRbIP6LqQ,7826
18
+ datatailr/scheduler/batch.py,sha256=BlZq609thXM0skZiPZjGHLO9WozOq8T3SiErpFPU4Zg,10779
19
19
  datatailr/scheduler/batch_decorator.py,sha256=o6DAEODwsfYx9uYwjnaJZ9iUmqbFH2wMh-jz_L5bgNo,4598
20
20
  datatailr/scheduler/constants.py,sha256=ISG5uMnVPbGbjaaulU0xdmSggnd-DMr9ed0WTAZSUmU,604
21
21
  datatailr/scheduler/utils.py,sha256=YHtAc5sCwfgiClr5G6R3hfAjdlrFdnNW2l-3XwPZLXM,1070
22
- datatailr-0.1.3.dist-info/licenses/LICENSE,sha256=ikKP4_O-UD_b8FuNdKmbzTb6odd0JX085ZW_FAPN3VI,1066
22
+ datatailr-0.1.5.dist-info/licenses/LICENSE,sha256=ikKP4_O-UD_b8FuNdKmbzTb6odd0JX085ZW_FAPN3VI,1066
23
23
  test_module/__init__.py,sha256=OF9XaL3RKdbWD5Ug4L-ufLqbykSt_rTK6gqZr4uBJ8g,576
24
24
  test_module/test_submodule.py,sha256=O07fFbzJEy5rf1vdlYzPvs8v0IxHFg-CaYMqaHkskbc,1294
25
- datatailr-0.1.3.dist-info/METADATA,sha256=uHin-LMcQVIJUq_4sUItV42XganjZX58z5tVD5Wpup4,774
26
- datatailr-0.1.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- datatailr-0.1.3.dist-info/entry_points.txt,sha256=4lNE9VXvztJdIQsODI308v9FRzkVgmMu-VKGEceNxJs,59
28
- datatailr-0.1.3.dist-info/top_level.txt,sha256=UZOKaWS1kZGGwV7hP476-EcSUJBNspxVSSp9WqtORzk,22
29
- datatailr-0.1.3.dist-info/RECORD,,
25
+ datatailr-0.1.5.dist-info/METADATA,sha256=uaE8S33ZpLXxhAZHjpjzQLDjteygHhNHXYMmheg4VY8,2511
26
+ datatailr-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ datatailr-0.1.5.dist-info/entry_points.txt,sha256=4lNE9VXvztJdIQsODI308v9FRzkVgmMu-VKGEceNxJs,59
28
+ datatailr-0.1.5.dist-info/top_level.txt,sha256=UZOKaWS1kZGGwV7hP476-EcSUJBNspxVSSp9WqtORzk,22
29
+ datatailr-0.1.5.dist-info/RECORD,,
@@ -1,24 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: datatailr
3
- Version: 0.1.3
4
- Summary: The datatailr package
5
- Author-email: Datatailr <pypi@datatailr.com>
6
- License-Expression: MIT
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: Operating System :: OS Independent
9
- Requires-Python: >=3.7
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
- Provides-Extra: dev
13
- Requires-Dist: ruff; extra == "dev"
14
- Requires-Dist: pre-commit; extra == "dev"
15
- Requires-Dist: mypy; extra == "dev"
16
- Requires-Dist: types-setuptools; extra == "dev"
17
- Requires-Dist: toml; extra == "dev"
18
- Dynamic: license-file
19
-
20
- # datatailr
21
-
22
- Datatailr empowers your team to streamline analytics and data workflows from idea to production without infrastructure hurdles.
23
-
24
- Visit [our website](https://www.datatailr.com/) for more!