datamaker-py 0.7.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.
Files changed (32) hide show
  1. datamaker_py-0.7.0/LICENSE +21 -0
  2. datamaker_py-0.7.0/PKG-INFO +79 -0
  3. datamaker_py-0.7.0/README.md +68 -0
  4. datamaker_py-0.7.0/pyproject.toml +17 -0
  5. datamaker_py-0.7.0/setup.cfg +4 -0
  6. datamaker_py-0.7.0/src/datamaker/__init__.py +2 -0
  7. datamaker_py-0.7.0/src/datamaker/core.py +11 -0
  8. datamaker_py-0.7.0/src/datamaker/error.py +2 -0
  9. datamaker_py-0.7.0/src/datamaker/main.py +886 -0
  10. datamaker_py-0.7.0/src/datamaker/routes/__init__.py +37 -0
  11. datamaker_py-0.7.0/src/datamaker/routes/api_keys.py +50 -0
  12. datamaker_py-0.7.0/src/datamaker/routes/base.py +40 -0
  13. datamaker_py-0.7.0/src/datamaker/routes/connections.py +87 -0
  14. datamaker_py-0.7.0/src/datamaker/routes/custom_types.py +100 -0
  15. datamaker_py-0.7.0/src/datamaker/routes/export_and_validation.py +25 -0
  16. datamaker_py-0.7.0/src/datamaker/routes/folders_and_utils.py +80 -0
  17. datamaker_py-0.7.0/src/datamaker/routes/generation.py +14 -0
  18. datamaker_py-0.7.0/src/datamaker/routes/projects.py +35 -0
  19. datamaker_py-0.7.0/src/datamaker/routes/scenario_files.py +453 -0
  20. datamaker_py-0.7.0/src/datamaker/routes/sets.py +177 -0
  21. datamaker_py-0.7.0/src/datamaker/routes/teams.py +62 -0
  22. datamaker_py-0.7.0/src/datamaker/routes/templates.py +69 -0
  23. datamaker_py-0.7.0/src/datamaker/routes/users.py +43 -0
  24. datamaker_py-0.7.0/src/datamaker/template.py +162 -0
  25. datamaker_py-0.7.0/src/datamaker_py.egg-info/PKG-INFO +79 -0
  26. datamaker_py-0.7.0/src/datamaker_py.egg-info/SOURCES.txt +30 -0
  27. datamaker_py-0.7.0/src/datamaker_py.egg-info/dependency_links.txt +1 -0
  28. datamaker_py-0.7.0/src/datamaker_py.egg-info/requires.txt +2 -0
  29. datamaker_py-0.7.0/src/datamaker_py.egg-info/top_level.txt +1 -0
  30. datamaker_py-0.7.0/tests/test_integration.py +433 -0
  31. datamaker_py-0.7.0/tests/test_main.py +295 -0
  32. datamaker_py-0.7.0/tests/test_routes.py +692 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Automators
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, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: datamaker-py
3
+ Version: 0.7.0
4
+ Summary: The official Python library for the Automators DataMaker API.
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: python-dotenv>=1.0.1
9
+ Requires-Dist: requests>=2.32.3
10
+ Dynamic: license-file
11
+
12
+ # DataMaker
13
+
14
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
15
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
16
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
17
+
18
+ The official Python library for the Automators DataMaker API.
19
+
20
+ ## Installation
21
+
22
+ You can install the package using pip:
23
+
24
+ ```sh
25
+ pip install datamaker-py
26
+ ```
27
+
28
+ ## Quick start
29
+
30
+ Basic example:
31
+
32
+ ```python
33
+ from datamaker import DataMaker, Template
34
+
35
+ # Create an instance of DataMaker
36
+ datamaker = DataMaker()
37
+
38
+
39
+ def main():
40
+ # Define the template
41
+ template = Template(
42
+ name="basic template",
43
+ quantity=2,
44
+ fields=[
45
+ {"name": "first_name", "type": "First Name"},
46
+ {"name": "last_name", "type": "Last Name"},
47
+ {
48
+ "name": "email",
49
+ "type": "Derived",
50
+ "options": {"value": "{{first_name}}.{{last_name}}@automators.com"},
51
+ },
52
+ ],
53
+ )
54
+
55
+ # Generate data using the template
56
+ result = datamaker.generate(template)
57
+ print(result)
58
+
59
+
60
+ if __name__ == "__main__":
61
+ main()
62
+
63
+ ```
64
+
65
+ ## Autocomplete Types
66
+
67
+ This SDK automatically generates TypeScript autocomplete definitions for use in the [datamaker application](https://github.com/automators/datamaker).
68
+
69
+ The artifact is generated automatically on every push to the `main` branch and can be fetched from:
70
+
71
+ ```
72
+ https://raw.githubusercontent.com/automators/datamaker-py/main/artifacts/autocomplete-types.ts
73
+ ```
74
+
75
+ See [`artifacts/README.md`](artifacts/README.md) for more details.
76
+
77
+ ## Development & Contibutions
78
+
79
+ See the [contributing.md](/CONTRIBUTING.md) guide for details on how to contribute to this project.
@@ -0,0 +1,68 @@
1
+ # DataMaker
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
4
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
5
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
6
+
7
+ The official Python library for the Automators DataMaker API.
8
+
9
+ ## Installation
10
+
11
+ You can install the package using pip:
12
+
13
+ ```sh
14
+ pip install datamaker-py
15
+ ```
16
+
17
+ ## Quick start
18
+
19
+ Basic example:
20
+
21
+ ```python
22
+ from datamaker import DataMaker, Template
23
+
24
+ # Create an instance of DataMaker
25
+ datamaker = DataMaker()
26
+
27
+
28
+ def main():
29
+ # Define the template
30
+ template = Template(
31
+ name="basic template",
32
+ quantity=2,
33
+ fields=[
34
+ {"name": "first_name", "type": "First Name"},
35
+ {"name": "last_name", "type": "Last Name"},
36
+ {
37
+ "name": "email",
38
+ "type": "Derived",
39
+ "options": {"value": "{{first_name}}.{{last_name}}@automators.com"},
40
+ },
41
+ ],
42
+ )
43
+
44
+ # Generate data using the template
45
+ result = datamaker.generate(template)
46
+ print(result)
47
+
48
+
49
+ if __name__ == "__main__":
50
+ main()
51
+
52
+ ```
53
+
54
+ ## Autocomplete Types
55
+
56
+ This SDK automatically generates TypeScript autocomplete definitions for use in the [datamaker application](https://github.com/automators/datamaker).
57
+
58
+ The artifact is generated automatically on every push to the `main` branch and can be fetched from:
59
+
60
+ ```
61
+ https://raw.githubusercontent.com/automators/datamaker-py/main/artifacts/autocomplete-types.ts
62
+ ```
63
+
64
+ See [`artifacts/README.md`](artifacts/README.md) for more details.
65
+
66
+ ## Development & Contibutions
67
+
68
+ See the [contributing.md](/CONTRIBUTING.md) guide for details on how to contribute to this project.
@@ -0,0 +1,17 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "datamaker-py"
7
+ version = "0.7.0"
8
+ description = "The official Python library for the Automators DataMaker API."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ dependencies = [
12
+ "python-dotenv>=1.0.1",
13
+ "requests>=2.32.3",
14
+ ]
15
+
16
+ [tool.setuptools.packages.find]
17
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ from .main import DataMaker # noqa
2
+ from .template import Template # noqa
@@ -0,0 +1,11 @@
1
+ from typing import Callable, Dict, Optional, Any
2
+ from requests import Response # Assuming you're using the 'requests' library for HTTP
3
+
4
+ Fetch = Callable[[str, Optional[dict]], Response]
5
+ HTTPMethod = str # Could further restrict to specific strings like 'get', 'post', etc.
6
+
7
+ RequestClient = Dict[str, Fetch]
8
+ Headers = Dict[str, Optional[str]]
9
+ DefaultQuery = Dict[str, Optional[str]]
10
+
11
+ Agent = Any
@@ -0,0 +1,2 @@
1
+ class DataMakerError(Exception):
2
+ pass