Flowfile 0.3.6__py3-none-any.whl → 0.3.7__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 Flowfile might be problematic. Click here for more details.
- flowfile/__init__.py +27 -6
- flowfile/api.py +1 -0
- flowfile/web/__init__.py +2 -2
- flowfile/web/static/assets/{CloudConnectionManager-d004942f.js → CloudConnectionManager-c20a740f.js} +3 -4
- flowfile/web/static/assets/{CloudStorageReader-eccf9fc2.js → CloudStorageReader-960b400a.js} +7 -7
- flowfile/web/static/assets/{CloudStorageWriter-b1ba6bba.js → CloudStorageWriter-e3decbdd.js} +7 -7
- flowfile/web/static/assets/{CrossJoin-68981877.js → CrossJoin-d67e2405.js} +8 -8
- flowfile/web/static/assets/{DatabaseConnectionSettings-0b06649c.js → DatabaseConnectionSettings-a81e0f7e.js} +2 -2
- flowfile/web/static/assets/{DatabaseManager-8349a426.js → DatabaseManager-9ea35e84.js} +2 -2
- flowfile/web/static/assets/{DatabaseReader-905344f8.js → DatabaseReader-9578bfa5.js} +9 -9
- flowfile/web/static/assets/{DatabaseWriter-9f5b8638.js → DatabaseWriter-19531098.js} +9 -9
- flowfile/web/static/assets/{ExploreData-131a6d53.js → ExploreData-40476474.js} +47141 -43697
- flowfile/web/static/assets/{ExternalSource-e3549dcc.js → ExternalSource-2297ef96.js} +6 -6
- flowfile/web/static/assets/{Filter-6e0730ae.js → Filter-f211c03a.js} +8 -8
- flowfile/web/static/assets/{Formula-02f033e6.js → Formula-4207ea31.js} +8 -8
- flowfile/web/static/assets/{FuzzyMatch-54c14036.js → FuzzyMatch-bf120df0.js} +9 -9
- flowfile/web/static/assets/{GraphSolver-08a3f499.js → GraphSolver-5bb7497a.js} +5 -5
- flowfile/web/static/assets/{GroupBy-2ae38139.js → GroupBy-92c81b65.js} +6 -6
- flowfile/web/static/assets/{Join-493b9772.js → Join-4e49a274.js} +9 -9
- flowfile/web/static/assets/{ManualInput-4373d163.js → ManualInput-90998ae8.js} +5 -5
- flowfile/web/static/assets/{Output-b534f3c7.js → Output-81e3e917.js} +4 -4
- flowfile/web/static/assets/{Pivot-2968ff65.js → Pivot-a3419842.js} +6 -6
- flowfile/web/static/assets/{PolarsCode-65136536.js → PolarsCode-72710deb.js} +6 -6
- flowfile/web/static/assets/{Read-c56339ed.js → Read-c4059daf.js} +6 -6
- flowfile/web/static/assets/{RecordCount-1c641a5e.js → RecordCount-c2b5e095.js} +5 -5
- flowfile/web/static/assets/{RecordId-df308b8f.js → RecordId-10baf191.js} +6 -6
- flowfile/web/static/assets/{Sample-293e8a64.js → Sample-3ed9a0ae.js} +5 -5
- flowfile/web/static/assets/{SecretManager-03911655.js → SecretManager-0d49c0e8.js} +2 -2
- flowfile/web/static/assets/{Select-3058a13d.js → Select-8a02a0b3.js} +8 -8
- flowfile/web/static/assets/{SettingsSection-fbf4fb39.js → SettingsSection-4c0f45f5.js} +1 -1
- flowfile/web/static/assets/{Sort-a29bbaf7.js → Sort-f55c9f9d.js} +6 -6
- flowfile/web/static/assets/{TextToRows-c7d7760e.js → TextToRows-5dbc2145.js} +8 -8
- flowfile/web/static/assets/{UnavailableFields-118f1d20.js → UnavailableFields-a1768e52.js} +2 -2
- flowfile/web/static/assets/{Union-f0589571.js → Union-f2aefdc9.js} +5 -5
- flowfile/web/static/assets/{Unique-7329a207.js → Unique-46b250da.js} +8 -8
- flowfile/web/static/assets/{Unpivot-30b0be15.js → Unpivot-25ac84cc.js} +5 -5
- flowfile/web/static/assets/{api-fb67319c.js → api-6ef0dcef.js} +1 -1
- flowfile/web/static/assets/{api-602fb95c.js → api-a0abbdc7.js} +1 -1
- flowfile/web/static/assets/{designer-94a6bf4d.js → designer-13eabd83.js} +4 -4
- flowfile/web/static/assets/{documentation-a224831e.js → documentation-b87e7f6f.js} +1 -1
- flowfile/web/static/assets/{dropDown-c2d2aa97.js → dropDown-13564764.js} +1 -1
- flowfile/web/static/assets/{fullEditor-921ac5fd.js → fullEditor-fd2cd6f9.js} +2 -2
- flowfile/web/static/assets/{genericNodeSettings-7013cc94.js → genericNodeSettings-71e11604.js} +3 -3
- flowfile/web/static/assets/{index-3a75211d.js → index-f6c15e76.js} +46 -22
- flowfile/web/static/assets/{nodeTitle-a63d4680.js → nodeTitle-988d9efe.js} +3 -3
- flowfile/web/static/assets/{secretApi-763aec6e.js → secretApi-dd636aa2.js} +1 -1
- flowfile/web/static/assets/{selectDynamic-08464729.js → selectDynamic-af36165e.js} +3 -3
- flowfile/web/static/assets/{vue-codemirror.esm-f15a5f87.js → vue-codemirror.esm-2847001e.js} +1 -1
- flowfile/web/static/assets/{vue-content-loader.es-93bd09d7.js → vue-content-loader.es-0371da73.js} +1 -1
- flowfile/web/static/index.html +1 -1
- {flowfile-0.3.6.dist-info → flowfile-0.3.7.dist-info}/METADATA +2 -2
- {flowfile-0.3.6.dist-info → flowfile-0.3.7.dist-info}/RECORD +96 -94
- flowfile_core/__init__.py +1 -0
- flowfile_core/auth/jwt.py +39 -0
- flowfile_core/configs/node_store/nodes.py +1 -0
- flowfile_core/configs/settings.py +6 -5
- flowfile_core/flowfile/code_generator/code_generator.py +71 -0
- flowfile_core/flowfile/flow_data_engine/cloud_storage_reader.py +1 -1
- flowfile_core/flowfile/flow_data_engine/flow_data_engine.py +597 -309
- flowfile_core/flowfile/flow_data_engine/polars_code_parser.py +3 -1
- flowfile_core/flowfile/flow_graph.py +619 -191
- flowfile_core/flowfile/flow_graph_utils.py +2 -2
- flowfile_core/flowfile/flow_node/flow_node.py +500 -89
- flowfile_core/flowfile/flow_node/models.py +125 -20
- flowfile_core/flowfile/handler.py +2 -33
- flowfile_core/flowfile/manage/open_flowfile.py +1 -2
- flowfile_core/flowfile/util/calculate_layout.py +0 -2
- flowfile_core/flowfile/utils.py +36 -5
- flowfile_core/main.py +32 -13
- flowfile_core/routes/cloud_connections.py +7 -11
- flowfile_core/routes/logs.py +2 -6
- flowfile_core/routes/public.py +1 -0
- flowfile_core/routes/routes.py +127 -51
- flowfile_core/routes/secrets.py +72 -14
- flowfile_core/schemas/__init__.py +8 -0
- flowfile_core/schemas/input_schema.py +92 -64
- flowfile_core/schemas/output_model.py +19 -3
- flowfile_core/schemas/schemas.py +144 -11
- flowfile_core/schemas/transform_schema.py +82 -17
- flowfile_frame/__init__.py +9 -1
- flowfile_frame/cloud_storage/__init__.py +0 -0
- flowfile_frame/cloud_storage/frame_helpers.py +39 -0
- flowfile_frame/cloud_storage/secret_manager.py +73 -0
- flowfile_frame/expr.py +28 -1
- flowfile_frame/expr.pyi +76 -61
- flowfile_frame/flow_frame.py +232 -110
- flowfile_frame/flow_frame.pyi +140 -91
- flowfile_frame/flow_frame_methods.py +150 -12
- flowfile_frame/group_frame.py +3 -0
- flowfile_frame/utils.py +25 -3
- test_utils/s3/data_generator.py +1 -0
- test_utils/s3/demo_data_generator.py +186 -0
- test_utils/s3/fixtures.py +6 -1
- flowfile_core/schemas/defaults.py +0 -9
- flowfile_core/schemas/models.py +0 -193
- {flowfile-0.3.6.dist-info → flowfile-0.3.7.dist-info}/LICENSE +0 -0
- {flowfile-0.3.6.dist-info → flowfile-0.3.7.dist-info}/WHEEL +0 -0
- {flowfile-0.3.6.dist-info → flowfile-0.3.7.dist-info}/entry_points.txt +0 -0
flowfile_core/schemas/models.py
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
from pydantic import BaseModel
|
|
2
|
-
from typing import List, Any, Callable
|
|
3
|
-
from datetime import datetime
|
|
4
|
-
from dataclasses import dataclass, field
|
|
5
|
-
import os
|
|
6
|
-
import mimetypes
|
|
7
|
-
from copy import deepcopy
|
|
8
|
-
from flowfile_core.configs.settings import FILE_LOCATION
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class DirItem:
|
|
12
|
-
name: str
|
|
13
|
-
full_path: str
|
|
14
|
-
path: str
|
|
15
|
-
type: str
|
|
16
|
-
stats: os.stat = None
|
|
17
|
-
creation_date: datetime = None
|
|
18
|
-
access_date: datetime = None
|
|
19
|
-
modification_date: datetime = None
|
|
20
|
-
source_path: str = None
|
|
21
|
-
|
|
22
|
-
def __init__(self, name: str, path: str,
|
|
23
|
-
stats: os.stat = None,
|
|
24
|
-
creation_date: datetime = None,
|
|
25
|
-
modification_date: datetime = None,
|
|
26
|
-
access_date: datetime = None, *args, **kwargs):
|
|
27
|
-
self.full_path = os.path.relpath(path)
|
|
28
|
-
if name == FILE_LOCATION:
|
|
29
|
-
self.name = self.full_path
|
|
30
|
-
self.source_path = self.full_path
|
|
31
|
-
else:
|
|
32
|
-
self.name = name
|
|
33
|
-
self.source_path = os.sep.join(os.path.split(self.full_path)[:-1])
|
|
34
|
-
self.path = self.full_path
|
|
35
|
-
self.stats = os.stat(self.full_path) if stats is None else stats
|
|
36
|
-
self.creation_date = datetime.fromtimestamp(self.stats.st_ctime) if creation_date is None else creation_date
|
|
37
|
-
self.modification_date = datetime.fromtimestamp(self.stats.st_mtime) if modification_date is None else modification_date
|
|
38
|
-
self.access_date = datetime.fromtimestamp(self.stats.st_atime) if access_date is None else access_date
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@dataclass
|
|
42
|
-
class DirFile(DirItem):
|
|
43
|
-
ext: str
|
|
44
|
-
file_size: int
|
|
45
|
-
size: int
|
|
46
|
-
mimetype: str = None
|
|
47
|
-
|
|
48
|
-
def __init__(self, name: str, path: str):
|
|
49
|
-
ext = os.path.splitext(name)[-1]
|
|
50
|
-
if ext == '':
|
|
51
|
-
ext = 'unk'
|
|
52
|
-
self.ext = ext
|
|
53
|
-
self.type = 'file'
|
|
54
|
-
self.mimetype = mimetypes.guess_type(path)[0]
|
|
55
|
-
super().__init__(name, path)
|
|
56
|
-
self.file_size = self.stats.st_size
|
|
57
|
-
self.size = self.file_size_in_kb
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@property
|
|
61
|
-
def file_size_in_kb(self) -> int:
|
|
62
|
-
return int(self.file_size/1024)
|
|
63
|
-
|
|
64
|
-
def json_repr(self):
|
|
65
|
-
self_dict = deepcopy(self.__dict__)
|
|
66
|
-
self_dict.pop('stats')
|
|
67
|
-
return self_dict
|
|
68
|
-
|
|
69
|
-
@dataclass
|
|
70
|
-
class DirLocation(DirItem):
|
|
71
|
-
all_items: List[str] = field(default_factory=list)
|
|
72
|
-
number_of_items: int = -1
|
|
73
|
-
files: List[DirFile] = field(default_factory=list)
|
|
74
|
-
directories: List["DirLocation"] = field(default_factory=list)
|
|
75
|
-
__size: int = -1
|
|
76
|
-
|
|
77
|
-
def __init__(self, name: str, path: str = None):
|
|
78
|
-
path = '.' + os.path.sep + name if path is None else path
|
|
79
|
-
self.all_items = os.listdir(path)
|
|
80
|
-
self.files = []
|
|
81
|
-
self.directories = []
|
|
82
|
-
self.type = 'dir'
|
|
83
|
-
super().__init__(name, path)
|
|
84
|
-
self.create_structure()
|
|
85
|
-
self.number_of_items = len(self.all_items)
|
|
86
|
-
|
|
87
|
-
def as_dict(self):
|
|
88
|
-
return {**self.__dict__,**{'size':self.size}}
|
|
89
|
-
|
|
90
|
-
def get_dirs(self):
|
|
91
|
-
return self.directories
|
|
92
|
-
|
|
93
|
-
@property
|
|
94
|
-
def size(self) -> int:
|
|
95
|
-
if self.__size<0:
|
|
96
|
-
size = 0
|
|
97
|
-
for file in self.files:
|
|
98
|
-
size += file.size
|
|
99
|
-
for d in self.directories:
|
|
100
|
-
size += d.size
|
|
101
|
-
self.__size = size
|
|
102
|
-
return self.__size
|
|
103
|
-
|
|
104
|
-
def create_structure(self):
|
|
105
|
-
for item_name in self.all_items:
|
|
106
|
-
|
|
107
|
-
ref = os.path.join(self.full_path, item_name)
|
|
108
|
-
if os.path.isdir(ref):
|
|
109
|
-
self.directories.append(self.__class__(item_name,ref))
|
|
110
|
-
elif os.path.isfile(ref):
|
|
111
|
-
self.files.append(DirFile(item_name,ref))
|
|
112
|
-
|
|
113
|
-
def json_repr(self):
|
|
114
|
-
self_dict = deepcopy(self.__dict__)
|
|
115
|
-
self_dict.pop('stats')
|
|
116
|
-
files: List[DirFile] = self_dict.pop('files')
|
|
117
|
-
directories: List[DirLocation] = self_dict.pop('directories')
|
|
118
|
-
self_dict.pop('all_items')
|
|
119
|
-
self_dict['files'] = [f.json_repr() for f in files]
|
|
120
|
-
self_dict['directories'] = [d.json_repr() for d in directories]
|
|
121
|
-
return self_dict
|
|
122
|
-
|
|
123
|
-
class Country(BaseModel):
|
|
124
|
-
id: int
|
|
125
|
-
name: str
|
|
126
|
-
abbreviation: str
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
class Address(BaseModel):
|
|
130
|
-
street: str = None
|
|
131
|
-
house_number: int = None
|
|
132
|
-
house_number_addition: str = None
|
|
133
|
-
city: str = None
|
|
134
|
-
zipcode: str = None
|
|
135
|
-
country: Country = None
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
class Team(Address):
|
|
139
|
-
id: int
|
|
140
|
-
name: str
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
class User(Address):
|
|
144
|
-
user_name: str
|
|
145
|
-
hashed_password: str
|
|
146
|
-
user_id: int
|
|
147
|
-
team: Team
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
class ExampleValues(BaseModel):
|
|
151
|
-
pass
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
class SourceStats(BaseModel):
|
|
155
|
-
id: int
|
|
156
|
-
created_by: User
|
|
157
|
-
created_date: datetime = datetime.now()
|
|
158
|
-
updated_by: User
|
|
159
|
-
updated_date: datetime = datetime.now()
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
class Source(SourceStats):
|
|
163
|
-
name: str
|
|
164
|
-
team: Team
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
class Table(SourceStats):
|
|
168
|
-
name: str
|
|
169
|
-
table_type: str = None
|
|
170
|
-
table_fields: List['TableField'] = None
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
class TableField(BaseModel):
|
|
174
|
-
id: int
|
|
175
|
-
source: Source
|
|
176
|
-
name: str
|
|
177
|
-
python_type: type
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
class FieldMapper(SourceStats):
|
|
181
|
-
mapping_type: str = None # direct, formula, default value
|
|
182
|
-
input_fields: List[TableField] = None
|
|
183
|
-
output_fields: List[TableField]
|
|
184
|
-
source_table: Table
|
|
185
|
-
target_table: Table
|
|
186
|
-
formula: Callable = None
|
|
187
|
-
default_value: Any = None
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
class TableMapper(SourceStats):
|
|
191
|
-
source_table: Table
|
|
192
|
-
target_table: Table
|
|
193
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|