flowtask 5.8.4__cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.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.
- flowtask/__init__.py +93 -0
- flowtask/__main__.py +38 -0
- flowtask/bots/__init__.py +6 -0
- flowtask/bots/check.py +93 -0
- flowtask/bots/codebot.py +51 -0
- flowtask/components/ASPX.py +148 -0
- flowtask/components/AddDataset.py +352 -0
- flowtask/components/Amazon.py +523 -0
- flowtask/components/AutoTask.py +314 -0
- flowtask/components/Azure.py +80 -0
- flowtask/components/AzureUsers.py +106 -0
- flowtask/components/BaseAction.py +91 -0
- flowtask/components/BaseLoop.py +198 -0
- flowtask/components/BestBuy.py +800 -0
- flowtask/components/CSVToGCS.py +120 -0
- flowtask/components/CompanyScraper/__init__.py +1 -0
- flowtask/components/CompanyScraper/parsers/__init__.py +6 -0
- flowtask/components/CompanyScraper/parsers/base.py +102 -0
- flowtask/components/CompanyScraper/parsers/explorium.py +192 -0
- flowtask/components/CompanyScraper/parsers/leadiq.py +206 -0
- flowtask/components/CompanyScraper/parsers/rocket.py +133 -0
- flowtask/components/CompanyScraper/parsers/siccode.py +109 -0
- flowtask/components/CompanyScraper/parsers/visualvisitor.py +130 -0
- flowtask/components/CompanyScraper/parsers/zoominfo.py +118 -0
- flowtask/components/CompanyScraper/scrapper.py +1054 -0
- flowtask/components/CopyTo.py +177 -0
- flowtask/components/CopyToBigQuery.py +243 -0
- flowtask/components/CopyToMongoDB.py +291 -0
- flowtask/components/CopyToPg.py +609 -0
- flowtask/components/CopyToRethink.py +207 -0
- flowtask/components/CreateGCSBucket.py +102 -0
- flowtask/components/CreateReport/CreateReport.py +228 -0
- flowtask/components/CreateReport/__init__.py +9 -0
- flowtask/components/CreateReport/charts/__init__.py +15 -0
- flowtask/components/CreateReport/charts/bar.py +51 -0
- flowtask/components/CreateReport/charts/base.py +66 -0
- flowtask/components/CreateReport/charts/pie.py +64 -0
- flowtask/components/CreateReport/utils.py +9 -0
- flowtask/components/CustomerSatisfaction.py +196 -0
- flowtask/components/DataInput.py +200 -0
- flowtask/components/DateList.py +255 -0
- flowtask/components/DbClient.py +163 -0
- flowtask/components/DialPad.py +146 -0
- flowtask/components/DocumentDBQuery.py +200 -0
- flowtask/components/DownloadFrom.py +371 -0
- flowtask/components/DownloadFromD2L.py +113 -0
- flowtask/components/DownloadFromFTP.py +181 -0
- flowtask/components/DownloadFromIMAP.py +315 -0
- flowtask/components/DownloadFromS3.py +198 -0
- flowtask/components/DownloadFromSFTP.py +265 -0
- flowtask/components/DownloadFromSharepoint.py +110 -0
- flowtask/components/DownloadFromSmartSheet.py +114 -0
- flowtask/components/DownloadS3File.py +229 -0
- flowtask/components/Dummy.py +59 -0
- flowtask/components/DuplicatePhoto.py +411 -0
- flowtask/components/EmployeeEvaluation.py +237 -0
- flowtask/components/ExecuteSQL.py +323 -0
- flowtask/components/ExtractHTML.py +178 -0
- flowtask/components/FileBase.py +178 -0
- flowtask/components/FileCopy.py +181 -0
- flowtask/components/FileDelete.py +82 -0
- flowtask/components/FileExists.py +146 -0
- flowtask/components/FileIteratorDelete.py +112 -0
- flowtask/components/FileList.py +194 -0
- flowtask/components/FileOpen.py +75 -0
- flowtask/components/FileRead.py +120 -0
- flowtask/components/FileRename.py +106 -0
- flowtask/components/FilterIf.py +284 -0
- flowtask/components/FilterRows/FilterRows.py +200 -0
- flowtask/components/FilterRows/__init__.py +10 -0
- flowtask/components/FilterRows/functions.py +4 -0
- flowtask/components/GCSToBigQuery.py +103 -0
- flowtask/components/GoogleA4.py +150 -0
- flowtask/components/GoogleGeoCoding.py +344 -0
- flowtask/components/GooglePlaces.py +315 -0
- flowtask/components/GoogleSearch.py +539 -0
- flowtask/components/HTTPClient.py +268 -0
- flowtask/components/ICIMS.py +146 -0
- flowtask/components/IF.py +179 -0
- flowtask/components/IcimsFolderCopy.py +173 -0
- flowtask/components/ImageFeatures/__init__.py +5 -0
- flowtask/components/ImageFeatures/process.py +233 -0
- flowtask/components/IteratorBase.py +251 -0
- flowtask/components/LangchainLoader/__init__.py +5 -0
- flowtask/components/LangchainLoader/loader.py +194 -0
- flowtask/components/LangchainLoader/loaders/__init__.py +22 -0
- flowtask/components/LangchainLoader/loaders/abstract.py +362 -0
- flowtask/components/LangchainLoader/loaders/basepdf.py +50 -0
- flowtask/components/LangchainLoader/loaders/docx.py +91 -0
- flowtask/components/LangchainLoader/loaders/html.py +119 -0
- flowtask/components/LangchainLoader/loaders/pdfblocks.py +146 -0
- flowtask/components/LangchainLoader/loaders/pdfmark.py +79 -0
- flowtask/components/LangchainLoader/loaders/pdftables.py +135 -0
- flowtask/components/LangchainLoader/loaders/qa.py +67 -0
- flowtask/components/LangchainLoader/loaders/txt.py +55 -0
- flowtask/components/LeadIQ.py +650 -0
- flowtask/components/Loop.py +253 -0
- flowtask/components/Lowes.py +334 -0
- flowtask/components/MS365Usage.py +156 -0
- flowtask/components/MSTeamsMessages.py +320 -0
- flowtask/components/MarketClustering.py +1051 -0
- flowtask/components/MergeFiles.py +362 -0
- flowtask/components/MilvusOutput.py +87 -0
- flowtask/components/NearByStores.py +175 -0
- flowtask/components/NetworkNinja/__init__.py +6 -0
- flowtask/components/NetworkNinja/models/__init__.py +52 -0
- flowtask/components/NetworkNinja/models/abstract.py +177 -0
- flowtask/components/NetworkNinja/models/account.py +39 -0
- flowtask/components/NetworkNinja/models/client.py +19 -0
- flowtask/components/NetworkNinja/models/district.py +14 -0
- flowtask/components/NetworkNinja/models/events.py +101 -0
- flowtask/components/NetworkNinja/models/forms.py +499 -0
- flowtask/components/NetworkNinja/models/market.py +16 -0
- flowtask/components/NetworkNinja/models/organization.py +34 -0
- flowtask/components/NetworkNinja/models/photos.py +125 -0
- flowtask/components/NetworkNinja/models/project.py +44 -0
- flowtask/components/NetworkNinja/models/region.py +28 -0
- flowtask/components/NetworkNinja/models/store.py +203 -0
- flowtask/components/NetworkNinja/models/user.py +151 -0
- flowtask/components/NetworkNinja/router.py +854 -0
- flowtask/components/Odoo.py +175 -0
- flowtask/components/OdooInjector.py +192 -0
- flowtask/components/OpenFromXML.py +126 -0
- flowtask/components/OpenWeather.py +41 -0
- flowtask/components/OpenWithBase.py +616 -0
- flowtask/components/OpenWithPandas.py +715 -0
- flowtask/components/PGPDecrypt.py +199 -0
- flowtask/components/PandasIterator.py +187 -0
- flowtask/components/PandasToFile.py +189 -0
- flowtask/components/Paradox.py +339 -0
- flowtask/components/ParamIterator.py +117 -0
- flowtask/components/ParseHTML.py +84 -0
- flowtask/components/PlacerStores.py +249 -0
- flowtask/components/Pokemon.py +507 -0
- flowtask/components/PositiveBot.py +62 -0
- flowtask/components/PowerPointSlide.py +400 -0
- flowtask/components/PrintMessage.py +127 -0
- flowtask/components/ProductCompetitors/__init__.py +5 -0
- flowtask/components/ProductCompetitors/parsers/__init__.py +7 -0
- flowtask/components/ProductCompetitors/parsers/base.py +72 -0
- flowtask/components/ProductCompetitors/parsers/bestbuy.py +86 -0
- flowtask/components/ProductCompetitors/parsers/lowes.py +103 -0
- flowtask/components/ProductCompetitors/scrapper.py +155 -0
- flowtask/components/ProductCompliant.py +169 -0
- flowtask/components/ProductInfo/__init__.py +1 -0
- flowtask/components/ProductInfo/parsers/__init__.py +5 -0
- flowtask/components/ProductInfo/parsers/base.py +83 -0
- flowtask/components/ProductInfo/parsers/brother.py +97 -0
- flowtask/components/ProductInfo/parsers/canon.py +167 -0
- flowtask/components/ProductInfo/parsers/epson.py +118 -0
- flowtask/components/ProductInfo/parsers/hp.py +131 -0
- flowtask/components/ProductInfo/parsers/samsung.py +97 -0
- flowtask/components/ProductInfo/scraper.py +319 -0
- flowtask/components/ProductPricing.py +118 -0
- flowtask/components/QS.py +261 -0
- flowtask/components/QSBase.py +201 -0
- flowtask/components/QueryIterator.py +273 -0
- flowtask/components/QueryToInsert.py +327 -0
- flowtask/components/QueryToPandas.py +432 -0
- flowtask/components/RESTClient.py +195 -0
- flowtask/components/RethinkDBQuery.py +189 -0
- flowtask/components/Rsync.py +74 -0
- flowtask/components/RunSSH.py +59 -0
- flowtask/components/RunShell.py +71 -0
- flowtask/components/SalesForce.py +20 -0
- flowtask/components/SaveImageBank/__init__.py +257 -0
- flowtask/components/SchedulingVisits.py +592 -0
- flowtask/components/ScrapPage.py +216 -0
- flowtask/components/ScrapSearch.py +79 -0
- flowtask/components/SendNotify.py +257 -0
- flowtask/components/SentimentAnalysis.py +694 -0
- flowtask/components/ServiceScrapper/__init__.py +5 -0
- flowtask/components/ServiceScrapper/parsers/__init__.py +1 -0
- flowtask/components/ServiceScrapper/parsers/base.py +94 -0
- flowtask/components/ServiceScrapper/parsers/costco.py +93 -0
- flowtask/components/ServiceScrapper/scrapper.py +199 -0
- flowtask/components/SetVariables.py +156 -0
- flowtask/components/SubTask.py +182 -0
- flowtask/components/SuiteCRM.py +48 -0
- flowtask/components/Switch.py +175 -0
- flowtask/components/TableBase.py +148 -0
- flowtask/components/TableDelete.py +312 -0
- flowtask/components/TableInput.py +143 -0
- flowtask/components/TableOutput/TableOutput.py +384 -0
- flowtask/components/TableOutput/__init__.py +3 -0
- flowtask/components/TableSchema.py +534 -0
- flowtask/components/Target.py +223 -0
- flowtask/components/ThumbnailGenerator.py +156 -0
- flowtask/components/ToPandas.py +67 -0
- flowtask/components/TransformRows/TransformRows.py +507 -0
- flowtask/components/TransformRows/__init__.py +9 -0
- flowtask/components/TransformRows/functions.py +559 -0
- flowtask/components/TransposeRows.py +176 -0
- flowtask/components/UPCDatabase.py +86 -0
- flowtask/components/UnGzip.py +171 -0
- flowtask/components/Uncompress.py +172 -0
- flowtask/components/UniqueRows.py +126 -0
- flowtask/components/Unzip.py +107 -0
- flowtask/components/UpdateOperationalVars.py +147 -0
- flowtask/components/UploadTo.py +299 -0
- flowtask/components/UploadToS3.py +136 -0
- flowtask/components/UploadToSFTP.py +160 -0
- flowtask/components/UploadToSharepoint.py +205 -0
- flowtask/components/UserFunc.py +122 -0
- flowtask/components/VivaTracker.py +140 -0
- flowtask/components/WSDLClient.py +123 -0
- flowtask/components/Wait.py +18 -0
- flowtask/components/Walmart.py +199 -0
- flowtask/components/Workplace.py +134 -0
- flowtask/components/XMLToPandas.py +267 -0
- flowtask/components/Zammad/__init__.py +41 -0
- flowtask/components/Zammad/models.py +0 -0
- flowtask/components/ZoomInfoScraper.py +409 -0
- flowtask/components/__init__.py +104 -0
- flowtask/components/abstract.py +18 -0
- flowtask/components/flow.py +530 -0
- flowtask/components/google.py +335 -0
- flowtask/components/group.py +221 -0
- flowtask/components/py.typed +0 -0
- flowtask/components/reviewscrap.py +132 -0
- flowtask/components/tAutoincrement.py +117 -0
- flowtask/components/tConcat.py +109 -0
- flowtask/components/tExplode.py +119 -0
- flowtask/components/tFilter.py +184 -0
- flowtask/components/tGroup.py +236 -0
- flowtask/components/tJoin.py +270 -0
- flowtask/components/tMap/__init__.py +9 -0
- flowtask/components/tMap/functions.py +54 -0
- flowtask/components/tMap/tMap.py +450 -0
- flowtask/components/tMelt.py +112 -0
- flowtask/components/tMerge.py +114 -0
- flowtask/components/tOrder.py +93 -0
- flowtask/components/tPandas.py +94 -0
- flowtask/components/tPivot.py +71 -0
- flowtask/components/tPluckCols.py +76 -0
- flowtask/components/tUnnest.py +82 -0
- flowtask/components/user.py +401 -0
- flowtask/conf.py +457 -0
- flowtask/download.py +102 -0
- flowtask/events/__init__.py +11 -0
- flowtask/events/events/__init__.py +20 -0
- flowtask/events/events/abstract.py +95 -0
- flowtask/events/events/alerts/__init__.py +362 -0
- flowtask/events/events/alerts/colfunctions.py +131 -0
- flowtask/events/events/alerts/functions.py +158 -0
- flowtask/events/events/dummy.py +12 -0
- flowtask/events/events/exec.py +124 -0
- flowtask/events/events/file/__init__.py +7 -0
- flowtask/events/events/file/base.py +51 -0
- flowtask/events/events/file/copy.py +23 -0
- flowtask/events/events/file/delete.py +16 -0
- flowtask/events/events/interfaces/__init__.py +9 -0
- flowtask/events/events/interfaces/client.py +67 -0
- flowtask/events/events/interfaces/credentials.py +28 -0
- flowtask/events/events/interfaces/notifications.py +58 -0
- flowtask/events/events/jira.py +122 -0
- flowtask/events/events/log.py +26 -0
- flowtask/events/events/logerr.py +52 -0
- flowtask/events/events/notify.py +59 -0
- flowtask/events/events/notify_event.py +160 -0
- flowtask/events/events/publish.py +54 -0
- flowtask/events/events/sendfile.py +104 -0
- flowtask/events/events/task.py +97 -0
- flowtask/events/events/teams.py +98 -0
- flowtask/events/events/webhook.py +58 -0
- flowtask/events/manager.py +287 -0
- flowtask/exceptions.c +39393 -0
- flowtask/exceptions.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/extensions/__init__.py +3 -0
- flowtask/extensions/abstract.py +82 -0
- flowtask/extensions/logging/__init__.py +65 -0
- flowtask/hooks/__init__.py +9 -0
- flowtask/hooks/actions/__init__.py +22 -0
- flowtask/hooks/actions/abstract.py +66 -0
- flowtask/hooks/actions/dummy.py +23 -0
- flowtask/hooks/actions/jira.py +74 -0
- flowtask/hooks/actions/rest.py +320 -0
- flowtask/hooks/actions/sampledata.py +37 -0
- flowtask/hooks/actions/sensor.py +23 -0
- flowtask/hooks/actions/task.py +9 -0
- flowtask/hooks/actions/ticket.py +37 -0
- flowtask/hooks/actions/zammad.py +55 -0
- flowtask/hooks/hook.py +62 -0
- flowtask/hooks/models.py +17 -0
- flowtask/hooks/service.py +187 -0
- flowtask/hooks/step.py +91 -0
- flowtask/hooks/types/__init__.py +23 -0
- flowtask/hooks/types/base.py +129 -0
- flowtask/hooks/types/brokers/__init__.py +11 -0
- flowtask/hooks/types/brokers/base.py +54 -0
- flowtask/hooks/types/brokers/mqtt.py +35 -0
- flowtask/hooks/types/brokers/rabbitmq.py +82 -0
- flowtask/hooks/types/brokers/redis.py +83 -0
- flowtask/hooks/types/brokers/sqs.py +44 -0
- flowtask/hooks/types/fs.py +232 -0
- flowtask/hooks/types/http.py +49 -0
- flowtask/hooks/types/imap.py +200 -0
- flowtask/hooks/types/jira.py +279 -0
- flowtask/hooks/types/mail.py +205 -0
- flowtask/hooks/types/postgres.py +98 -0
- flowtask/hooks/types/responses/__init__.py +8 -0
- flowtask/hooks/types/responses/base.py +5 -0
- flowtask/hooks/types/sharepoint.py +288 -0
- flowtask/hooks/types/ssh.py +141 -0
- flowtask/hooks/types/tagged.py +59 -0
- flowtask/hooks/types/upload.py +85 -0
- flowtask/hooks/types/watch.py +71 -0
- flowtask/hooks/types/web.py +36 -0
- flowtask/interfaces/AzureClient.py +137 -0
- flowtask/interfaces/AzureGraph.py +839 -0
- flowtask/interfaces/Boto3Client.py +326 -0
- flowtask/interfaces/DropboxClient.py +173 -0
- flowtask/interfaces/ExcelHandler.py +94 -0
- flowtask/interfaces/FTPClient.py +131 -0
- flowtask/interfaces/GoogleCalendar.py +201 -0
- flowtask/interfaces/GoogleClient.py +133 -0
- flowtask/interfaces/GoogleDrive.py +127 -0
- flowtask/interfaces/GoogleGCS.py +89 -0
- flowtask/interfaces/GoogleGeocoding.py +93 -0
- flowtask/interfaces/GoogleLang.py +114 -0
- flowtask/interfaces/GooglePub.py +61 -0
- flowtask/interfaces/GoogleSheet.py +68 -0
- flowtask/interfaces/IMAPClient.py +137 -0
- flowtask/interfaces/O365Calendar.py +113 -0
- flowtask/interfaces/O365Client.py +220 -0
- flowtask/interfaces/OneDrive.py +284 -0
- flowtask/interfaces/Outlook.py +155 -0
- flowtask/interfaces/ParrotBot.py +130 -0
- flowtask/interfaces/SSHClient.py +378 -0
- flowtask/interfaces/Sharepoint.py +496 -0
- flowtask/interfaces/__init__.py +36 -0
- flowtask/interfaces/azureauth.py +119 -0
- flowtask/interfaces/cache.py +201 -0
- flowtask/interfaces/client.py +82 -0
- flowtask/interfaces/compress.py +525 -0
- flowtask/interfaces/credentials.py +124 -0
- flowtask/interfaces/d2l.py +239 -0
- flowtask/interfaces/databases/__init__.py +5 -0
- flowtask/interfaces/databases/db.py +223 -0
- flowtask/interfaces/databases/documentdb.py +55 -0
- flowtask/interfaces/databases/rethink.py +39 -0
- flowtask/interfaces/dataframes/__init__.py +11 -0
- flowtask/interfaces/dataframes/abstract.py +21 -0
- flowtask/interfaces/dataframes/arrow.py +71 -0
- flowtask/interfaces/dataframes/dt.py +69 -0
- flowtask/interfaces/dataframes/pandas.py +167 -0
- flowtask/interfaces/dataframes/polars.py +60 -0
- flowtask/interfaces/db.py +263 -0
- flowtask/interfaces/env.py +46 -0
- flowtask/interfaces/func.py +137 -0
- flowtask/interfaces/http.py +1780 -0
- flowtask/interfaces/locale.py +40 -0
- flowtask/interfaces/log.py +75 -0
- flowtask/interfaces/mask.py +143 -0
- flowtask/interfaces/notification.py +154 -0
- flowtask/interfaces/playwright.py +339 -0
- flowtask/interfaces/powerpoint.py +368 -0
- flowtask/interfaces/py.typed +0 -0
- flowtask/interfaces/qs.py +376 -0
- flowtask/interfaces/result.py +87 -0
- flowtask/interfaces/selenium_service.py +779 -0
- flowtask/interfaces/smartsheet.py +154 -0
- flowtask/interfaces/stat.py +39 -0
- flowtask/interfaces/task.py +96 -0
- flowtask/interfaces/template.py +118 -0
- flowtask/interfaces/vectorstores/__init__.py +1 -0
- flowtask/interfaces/vectorstores/abstract.py +133 -0
- flowtask/interfaces/vectorstores/milvus.py +669 -0
- flowtask/interfaces/zammad.py +107 -0
- flowtask/models.py +193 -0
- flowtask/parsers/__init__.py +15 -0
- flowtask/parsers/_yaml.c +11978 -0
- flowtask/parsers/_yaml.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/parsers/argparser.py +235 -0
- flowtask/parsers/base.c +15155 -0
- flowtask/parsers/base.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/parsers/json.c +11968 -0
- flowtask/parsers/json.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/parsers/maps.py +49 -0
- flowtask/parsers/toml.c +11968 -0
- flowtask/parsers/toml.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/plugins/__init__.py +16 -0
- flowtask/plugins/components/__init__.py +0 -0
- flowtask/plugins/handler/__init__.py +45 -0
- flowtask/plugins/importer.py +31 -0
- flowtask/plugins/sources/__init__.py +0 -0
- flowtask/runner.py +283 -0
- flowtask/scheduler/__init__.py +9 -0
- flowtask/scheduler/functions.py +493 -0
- flowtask/scheduler/handlers/__init__.py +8 -0
- flowtask/scheduler/handlers/manager.py +504 -0
- flowtask/scheduler/handlers/models.py +58 -0
- flowtask/scheduler/handlers/service.py +72 -0
- flowtask/scheduler/notifications.py +65 -0
- flowtask/scheduler/scheduler.py +993 -0
- flowtask/services/__init__.py +0 -0
- flowtask/services/bots/__init__.py +0 -0
- flowtask/services/bots/telegram.py +264 -0
- flowtask/services/files/__init__.py +11 -0
- flowtask/services/files/manager.py +522 -0
- flowtask/services/files/model.py +37 -0
- flowtask/services/files/service.py +767 -0
- flowtask/services/jira/__init__.py +3 -0
- flowtask/services/jira/jira_actions.py +191 -0
- flowtask/services/tasks/__init__.py +13 -0
- flowtask/services/tasks/launcher.py +213 -0
- flowtask/services/tasks/manager.py +323 -0
- flowtask/services/tasks/service.py +275 -0
- flowtask/services/tasks/task_manager.py +376 -0
- flowtask/services/tasks/tasks.py +155 -0
- flowtask/storages/__init__.py +16 -0
- flowtask/storages/exceptions.py +12 -0
- flowtask/storages/files/__init__.py +8 -0
- flowtask/storages/files/abstract.py +29 -0
- flowtask/storages/files/filesystem.py +66 -0
- flowtask/storages/tasks/__init__.py +19 -0
- flowtask/storages/tasks/abstract.py +26 -0
- flowtask/storages/tasks/database.py +33 -0
- flowtask/storages/tasks/filesystem.py +108 -0
- flowtask/storages/tasks/github.py +119 -0
- flowtask/storages/tasks/memory.py +45 -0
- flowtask/storages/tasks/row.py +25 -0
- flowtask/tasks/__init__.py +0 -0
- flowtask/tasks/abstract.py +526 -0
- flowtask/tasks/command.py +118 -0
- flowtask/tasks/pile.py +486 -0
- flowtask/tasks/py.typed +0 -0
- flowtask/tasks/task.py +778 -0
- flowtask/template/__init__.py +161 -0
- flowtask/tests.py +257 -0
- flowtask/types/__init__.py +8 -0
- flowtask/types/typedefs.c +11347 -0
- flowtask/types/typedefs.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/utils/__init__.py +24 -0
- flowtask/utils/constants.py +117 -0
- flowtask/utils/encoders.py +21 -0
- flowtask/utils/executor.py +112 -0
- flowtask/utils/functions.cpp +14280 -0
- flowtask/utils/functions.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/utils/json.cpp +13349 -0
- flowtask/utils/json.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/utils/mail.py +63 -0
- flowtask/utils/parseqs.c +13324 -0
- flowtask/utils/parserqs.cpython-312-x86_64-linux-gnu.so +0 -0
- flowtask/utils/stats.py +308 -0
- flowtask/utils/transformations.py +74 -0
- flowtask/utils/uv.py +12 -0
- flowtask/utils/validators.py +97 -0
- flowtask/version.py +11 -0
- flowtask-5.8.4.dist-info/LICENSE +201 -0
- flowtask-5.8.4.dist-info/METADATA +209 -0
- flowtask-5.8.4.dist-info/RECORD +470 -0
- flowtask-5.8.4.dist-info/WHEEL +6 -0
- flowtask-5.8.4.dist-info/entry_points.txt +3 -0
- flowtask-5.8.4.dist-info/top_level.txt +2 -0
- plugins/components/CreateQR.py +39 -0
- plugins/components/TestComponent.py +28 -0
- plugins/components/Use1.py +13 -0
- plugins/components/Workplace.py +117 -0
- plugins/components/__init__.py +3 -0
- plugins/sources/__init__.py +0 -0
- plugins/sources/get_populartimes.py +78 -0
- plugins/sources/google.py +150 -0
- plugins/sources/hubspot.py +679 -0
- plugins/sources/icims.py +679 -0
- plugins/sources/mobileinsight.py +501 -0
- plugins/sources/newrelic.py +262 -0
- plugins/sources/uap.py +268 -0
- plugins/sources/venu.py +244 -0
- plugins/sources/vocinity.py +314 -0
flowtask/conf.py
ADDED
@@ -0,0 +1,457 @@
|
|
1
|
+
# Import Config Class
|
2
|
+
import sys
|
3
|
+
from pathlib import Path
|
4
|
+
from typing import Any
|
5
|
+
from navconfig import config, BASE_DIR, DEBUG
|
6
|
+
from navconfig.logging import logging, logger
|
7
|
+
from querysource.conf import CACHE_HOST, CACHE_PORT
|
8
|
+
from .utils.functions import get_worker_list
|
9
|
+
from .exceptions import FlowTaskError
|
10
|
+
from .storages import FileTaskStorage
|
11
|
+
from .storages.files import FileStore
|
12
|
+
|
13
|
+
|
14
|
+
# Disable Debug Logging of external tools
|
15
|
+
logging.getLogger('faker.factory').setLevel(logging.INFO)
|
16
|
+
logging.getLogger('numba.core').setLevel(logging.INFO)
|
17
|
+
logging.getLogger('h5py').setLevel(logging.INFO)
|
18
|
+
|
19
|
+
|
20
|
+
# Environment
|
21
|
+
ENVIRONMENT = config.get("ENVIRONMENT", fallback="development")
|
22
|
+
|
23
|
+
## environment name:
|
24
|
+
ENV = config.get("ENV", fallback="dev")
|
25
|
+
|
26
|
+
DEFAULT_ENCODING = config.get("DEFAULT_ENCODING", fallback="ascii")
|
27
|
+
|
28
|
+
PRODUCTION = config.getboolean("PRODUCTION", fallback=(not DEBUG))
|
29
|
+
LOCAL_DEVELOPMENT = DEBUG is True and sys.argv[0] == "run.py"
|
30
|
+
|
31
|
+
APP_DIR = BASE_DIR.joinpath("flowtask")
|
32
|
+
|
33
|
+
# DB Default (database used for interaction (rw))
|
34
|
+
DBHOST = config.get("DBHOST", fallback="localhost")
|
35
|
+
DBUSER = config.get("DBUSER")
|
36
|
+
DBPWD = config.get("DBPWD")
|
37
|
+
DBNAME = config.get("DBNAME", fallback="navigator")
|
38
|
+
DBPORT = config.get("DBPORT", fallback=5432)
|
39
|
+
if not DBUSER:
|
40
|
+
raise RuntimeError("Missing PostgreSQL Default Settings.")
|
41
|
+
# database for changes (admin)
|
42
|
+
default_dsn = f"postgres://{DBUSER}:{DBPWD}@{DBHOST}:{DBPORT}/{DBNAME}"
|
43
|
+
default_pg = f"postgres://{DBUSER}:{DBPWD}@{DBHOST}:{DBPORT}/{DBNAME}"
|
44
|
+
|
45
|
+
### InfluxDB configuration:
|
46
|
+
## INFLUXDB
|
47
|
+
USE_INFLUX = config.getboolean("USE_INFLUX", fallback=True)
|
48
|
+
INFLUX_DRIVER = config.get("INFLUX_DRIVER", fallback="influx")
|
49
|
+
INFLUX_HOST = config.get("INFLUX_HOST", fallback="127.0.0.1")
|
50
|
+
INFLUX_PORT = config.get("INFLUX_PORT", fallback="8086")
|
51
|
+
INFLUX_USER = config.get("INFLUX_USER")
|
52
|
+
INFLUX_PWD = config.get("INFLUX_PWD")
|
53
|
+
INFLUX_DATABASE = config.get("INFLUX_DATABASE", fallback="navigator")
|
54
|
+
INFLUX_TASKS_STARTED = config.get("INFLUX_TASKS_STARTED", fallback="started_tasks")
|
55
|
+
INFLUX_ORG = config.get("INFLUX_ORG", fallback="navigator")
|
56
|
+
INFLUX_TOKEN = config.get("INFLUX_TOKEN")
|
57
|
+
if USE_INFLUX is True and not INFLUX_TOKEN:
|
58
|
+
raise FlowTaskError("Missing InfluxDB Settings and Influx DB is enabled.")
|
59
|
+
|
60
|
+
# Database Connections:
|
61
|
+
# RETHINKDB
|
62
|
+
RT_DRIVER = config.get('RT_DRIVER', fallback='rethink')
|
63
|
+
RT_HOST = config.get('RT_HOST', fallback='localhost')
|
64
|
+
RT_PORT = config.get('RT_PORT', fallback=28015)
|
65
|
+
RT_DATABASE = config.get('RT_DATABASE', fallback='navigator')
|
66
|
+
RT_USER = config.get('RT_USER')
|
67
|
+
RT_PASSWORD = config.get('RT_PWD')
|
68
|
+
|
69
|
+
|
70
|
+
### Plugins Folder:
|
71
|
+
PLUGINS_FOLDER = BASE_DIR.joinpath("plugins")
|
72
|
+
|
73
|
+
# TEMPLATE SYSTEM
|
74
|
+
TEMPLATE_DIR = config.get("TEMPLATE_DIR", fallback=BASE_DIR.joinpath("templates"))
|
75
|
+
|
76
|
+
## Scheduler Configuration
|
77
|
+
# Schedule System
|
78
|
+
SCHEDULER = config.getboolean("SCHEDULER", fallback=True)
|
79
|
+
# Jobs Activation
|
80
|
+
ENABLE_JOBS = config.getboolean("ENABLE_JOBS", fallback=True)
|
81
|
+
|
82
|
+
SCHEDULER_MAX_INSTANCES = config.get("MAX_INSTANCES", fallback=2)
|
83
|
+
SCHEDULER_GRACE_TIME = config.get("GRACE_TIME", fallback=900)
|
84
|
+
|
85
|
+
SCHEDULER_SERVICE_GROUPS = config.getlist(
|
86
|
+
"SCHEDULER_SERVICE_GROUPS", fallback=["admin", "superuser"]
|
87
|
+
)
|
88
|
+
|
89
|
+
SCHEDULER_ADMIN_GROUPS = config.getlist(
|
90
|
+
"SCHEDULER_ADMIN_GROUPS", fallback=["admin", "superuser"]
|
91
|
+
)
|
92
|
+
|
93
|
+
# Timezone (For parsedate)
|
94
|
+
TIMEZONE = config.get("timezone", section="l18n", fallback="UTC")
|
95
|
+
USE_TIMEZONE = config.getboolean("USE_TIMEZONE", fallback=True)
|
96
|
+
|
97
|
+
DEFAULT_TIMEZONE = config.get(
|
98
|
+
"default_timezone", section="l18n", fallback="America/New_York"
|
99
|
+
)
|
100
|
+
SYSTEM_LOCALE = config.get("locale", section="l18n", fallback="en_US.UTF-8")
|
101
|
+
|
102
|
+
"""
|
103
|
+
Worker Configuration
|
104
|
+
"""
|
105
|
+
WORKER_DEFAULT_HOST = config.get("WORKER_DEFAULT_HOST", fallback="0.0.0.0")
|
106
|
+
WORKER_DEFAULT_PORT = config.get("WORKER_DEFAULT_PORT", fallback=8888)
|
107
|
+
WORKER_DEFAULT_QTY = config.get("WORKER_DEFAULT_QTY", fallback=4)
|
108
|
+
WORKER_QUEUE_SIZE = config.get("WORKER_QUEUE_SIZE", fallback=4)
|
109
|
+
WORKER_REDIS_DB = config.get("WORKER_REDIS_DB", fallback=2)
|
110
|
+
WORKER_REDIS = f"redis://{CACHE_HOST}:{CACHE_PORT}/{WORKER_REDIS_DB}"
|
111
|
+
REDIS_CACHE_DB = config.get("REDIS_CACHE_DB", fallback=1)
|
112
|
+
REDIS_URL = f"redis://{CACHE_HOST}:{CACHE_PORT}/{REDIS_CACHE_DB}"
|
113
|
+
|
114
|
+
workers = config.get("WORKER_LIST")
|
115
|
+
if workers:
|
116
|
+
WORKER_LIST = get_worker_list([e.strip() for e in list(workers.split(","))])
|
117
|
+
else:
|
118
|
+
WORKER_LIST = None
|
119
|
+
|
120
|
+
workers_high = config.get("WORKER_HIGH_LIST", fallback="127.0.0.1:8899")
|
121
|
+
if workers_high:
|
122
|
+
WORKER_HIGH_LIST = get_worker_list(
|
123
|
+
[e.strip() for e in list(workers_high.split(","))]
|
124
|
+
)
|
125
|
+
else:
|
126
|
+
WORKER_HIGH_LIST = None
|
127
|
+
|
128
|
+
# Make sure that the worker list is not empty
|
129
|
+
WORKERS_LIST = {
|
130
|
+
"low": WORKER_LIST,
|
131
|
+
"high": WORKER_HIGH_LIST,
|
132
|
+
"default": WORKER_LIST,
|
133
|
+
}
|
134
|
+
|
135
|
+
SCHEDULER_WORKER_TIMEOUT = config.getint("SCHEDULER_WORKER_TIMEOUT", fallback=60)
|
136
|
+
SCHEDULER_RETRY_ENQUEUE = config.getint("SCHEDULER_RETRY_ENQUEUE", fallback=10)
|
137
|
+
SCHEDULER_MAX_RETRY_ENQUEUE = config.getint("SCHEDULER_MAX_RETRY_ENQUEUE", fallback=60)
|
138
|
+
|
139
|
+
## HTTPClioent
|
140
|
+
HTTPCLIENT_MAX_SEMAPHORE = config.getint("HTTPCLIENT_MAX_SEMAPHORE", fallback=5)
|
141
|
+
HTTPCLIENT_MAX_WORKERS = config.getint("HTTPCLIENT_MAX_WORKERS", fallback=1)
|
142
|
+
|
143
|
+
### Memcache
|
144
|
+
MEMCACHE_HOST = config.get("MEMCACHE_HOST", "localhost")
|
145
|
+
MEMCACHE_PORT = config.get("MEMCACHE_PORT", fallback=11211)
|
146
|
+
|
147
|
+
### Redash System
|
148
|
+
REDASH_HOST = config.get("REDASH_HOST")
|
149
|
+
REDASH_API_KEY = config.get("REDASH_API_KEY")
|
150
|
+
|
151
|
+
"""
|
152
|
+
Notification System
|
153
|
+
"""
|
154
|
+
### Notification System
|
155
|
+
SHOW_VERSION = config.getboolean("SHOW_VERSION", fallback=True)
|
156
|
+
NOTIFY_ON_SUCCESS = config.get("DI_EVENT_ON_SUCCESS", fallback="dummy")
|
157
|
+
NOTIFY_ON_ERROR = config.get("DI_EVENT_ON_ERROR", fallback="dummy")
|
158
|
+
NOTIFY_ON_FAILURE = config.get("DI_EVENT_ON_FAILURE", fallback="dummy")
|
159
|
+
NOTIFY_ON_WARNING = config.get("DI_EVENT_ON_WARNING", fallback="dummy")
|
160
|
+
|
161
|
+
SEND_NOTIFICATIONS = bool(config.get("SEND_NOTIFICATIONS", fallback=True))
|
162
|
+
DEFAULT_RECIPIENT = {
|
163
|
+
"name": "Jesus Lara",
|
164
|
+
"account": {"address": "jesuslarag@gmail.com", "number": "+00000000"},
|
165
|
+
}
|
166
|
+
SCHEDULER_DEFAULT_NOTIFY = config.get("SCHEDULER_DEFAULT_NOTIFY", fallback="telegram")
|
167
|
+
TELEGRAM_BOT_TOKEN = config.get("TELEGRAM_BOT_TOKEN")
|
168
|
+
TELEGRAM_CHAT_ID = config.get("TELEGRAM_CHAT_ID")
|
169
|
+
TELEGRAM_JIRA_BOT_TOKEN = config.get("TELEGRAM_JIRA_BOT_TOKEN")
|
170
|
+
|
171
|
+
EVENT_CHAT_BOT = config.get("EVENT_CHAT_BOT", fallback=TELEGRAM_BOT_TOKEN)
|
172
|
+
EVENT_CHAT_ID = config.get("EVENT_CHAT_ID", fallback=TELEGRAM_CHAT_ID)
|
173
|
+
|
174
|
+
# Notify on Slack
|
175
|
+
SLACK_DEFAULT_CHANNEL = config.get("SLACK_DEFAULT_CHANNEL")
|
176
|
+
SLACK_DEFAULT_CHANNEL_NAME = config.get("SLACK_DEFAULT_CHANNEL_NAME")
|
177
|
+
|
178
|
+
# Notify on MS Teams
|
179
|
+
MS_TEAMS_TENANT_ID = config.get("MS_TEAMS_TENANT_ID", fallback="common")
|
180
|
+
MS_TEAMS_CLIENT_ID = config.get("MS_TEAMS_CLIENT_ID")
|
181
|
+
MS_TEAMS_CLIENT_SECRET = config.get("MS_TEAMS_CLIENT_SECRET")
|
182
|
+
MS_TEAMS_DEFAULT_TEAMS_ID = config.get("MS_TEAMS_DEFAULT_TEAMS_ID")
|
183
|
+
MS_TEAMS_DEFAULT_CHANNEL_ID = config.get("MS_TEAMS_DEFAULT_CHANNEL_ID")
|
184
|
+
MS_TEAMS_DEFAULT_CHANNEL_NAME = config.get("MS_TEAMS_DEFAULT_CHANNEL_NAME", fallback="Navigator")
|
185
|
+
MS_TEAMS_DEFAULT_WEBHOOK = config.get("MS_TEAMS_DEFAULT_WEBHOOK")
|
186
|
+
DEFAULT_TEAMS_USER = config.get("DEFAULT_TEAMS_USER")
|
187
|
+
|
188
|
+
"""
|
189
|
+
Task Execution System
|
190
|
+
"""
|
191
|
+
|
192
|
+
|
193
|
+
# this is the backend for saving task executions
|
194
|
+
USE_TASK_EVENT = config.getboolean("USE_TASK_EVENT", fallback=True)
|
195
|
+
# this is the backend for saving task executions
|
196
|
+
TASK_EXEC_BACKEND = config.get("TASK_EXEC_BACKEND", fallback="influx")
|
197
|
+
TASK_EVENT_TABLE = config.get("TASK_EVENT_TABLE", fallback="task_execution")
|
198
|
+
TASK_EXEC_TABLE = config.get("TASK_EXEC_TABLE", fallback="task_activity")
|
199
|
+
|
200
|
+
TASK_EXEC_CREDENTIALS = {
|
201
|
+
"host": INFLUX_HOST,
|
202
|
+
"port": INFLUX_PORT,
|
203
|
+
"bucket": INFLUX_DATABASE,
|
204
|
+
"org": INFLUX_ORG,
|
205
|
+
"token": INFLUX_TOKEN,
|
206
|
+
}
|
207
|
+
|
208
|
+
# Pub/Sub Channel:
|
209
|
+
PUBSUB_REDIS_DB = config.get("PUBSUB_REDIS_DB", fallback=5)
|
210
|
+
PUBSUB_REDIS = f"redis://{CACHE_HOST}:{CACHE_PORT}/{PUBSUB_REDIS_DB}"
|
211
|
+
ERROR_CHANNEL = config.get("ERROR_CHANNEL", fallback="FLOWTASK:FAILED:TASKS")
|
212
|
+
ALLOW_RESCHEDULE = config.getboolean("ALLOW_RESCHEDULE", fallback=False)
|
213
|
+
SCHEDULER_STARTUP_JOB = config.getboolean("SCHEDULER_STARTUP_JOBS", fallback=False)
|
214
|
+
|
215
|
+
"""
|
216
|
+
Email Configuration
|
217
|
+
"""
|
218
|
+
# email:
|
219
|
+
EMAIL_USERNAME = config.get("EMAIL_USERNAME")
|
220
|
+
EMAIL_PASSWORD = config.get("EMAIL_PASSWORD")
|
221
|
+
EMAIL_PORT = config.get("EMAIL_PORT", fallback=587)
|
222
|
+
EMAIL_HOST = config.get("EMAIL_HOST")
|
223
|
+
IMAP_RETRY_SELECT = config.getint("IMAP_RETRY_SELECT", fallback=3)
|
224
|
+
|
225
|
+
"""
|
226
|
+
Sendgrid Config
|
227
|
+
"""
|
228
|
+
SENDGRID_USERNAME = config.get("sendgrid_user")
|
229
|
+
SENDGRID_PASSWORD = config.get("sendgrid_password")
|
230
|
+
SENDGRID_PORT = config.get("sendgrid_port", fallback=587)
|
231
|
+
SENDGRID_HOST = config.get("sendgrid_host")
|
232
|
+
|
233
|
+
|
234
|
+
"""
|
235
|
+
MS Teams
|
236
|
+
"""
|
237
|
+
MS_TEAMS_NAVIGATOR_CHANNEL = config.get(
|
238
|
+
"MS_TEAMS_NAVIGATOR_CHANNEL", fallback="Navigator"
|
239
|
+
)
|
240
|
+
MS_TEAMS_NAVIGATOR_CHANNEL_ID = config.get("MS_TEAMS_NAVIGATOR_CHANNEL_ID")
|
241
|
+
|
242
|
+
"""
|
243
|
+
Resource Usage
|
244
|
+
"""
|
245
|
+
QUERY_API = config.getboolean("QUERY_API", fallback=True)
|
246
|
+
WEBSOCKETS = config.getboolean("WEBSOCKETS", fallback=True)
|
247
|
+
VARIABLES = config.getboolean("VARIABLES", fallback=True)
|
248
|
+
API_TIMEOUT = 36000 # 10 minutes
|
249
|
+
SEMAPHORE_LIMIT = config.get("SEMAPHORE_LIMIT", fallback=4096)
|
250
|
+
# upgrade no-files
|
251
|
+
NOFILES = config.get("ULIMIT_NOFILES", fallback=16384)
|
252
|
+
|
253
|
+
|
254
|
+
#################################################
|
255
|
+
### MarketPlace infraestructure:
|
256
|
+
|
257
|
+
MARKETPLACE_DIR = config.get("MARKETPLACE_DIR")
|
258
|
+
USE_SSL = config.getboolean("SSL", section="ssl", fallback=False)
|
259
|
+
if not MARKETPLACE_DIR:
|
260
|
+
MARKETPLACE_DIR = BASE_DIR.joinpath("docs", "plugins", "components")
|
261
|
+
|
262
|
+
## Sign-in infraestructure
|
263
|
+
MARKETPLACE_PUBLIC_KEY = BASE_DIR.joinpath("docs", "ssl", "public_key.pem")
|
264
|
+
MARKETPLACE_CERTIFICATE = BASE_DIR.joinpath("docs", "ssl", "certificate.pem")
|
265
|
+
MARKETPLACE_PRIVATE_KEY = BASE_DIR.joinpath("docs", "ssl", "private_key.pem")
|
266
|
+
|
267
|
+
|
268
|
+
murl = "http://nav-api.dev.local:5000/api/v1/marketplace/"
|
269
|
+
MARKETPLACE_URL = config.get("MARKETPLACE_URL", fallback=murl)
|
270
|
+
|
271
|
+
## PGP component:
|
272
|
+
# PGP Credentials
|
273
|
+
PGP_KEY_PATH = config.get("PGP_KEY_PATH")
|
274
|
+
PGP_PASSPHRASE = config.get("PGP_PASSPHRASE")
|
275
|
+
|
276
|
+
# JIRA:
|
277
|
+
JIRA_SECRET_TOKEN = config.get('JIRA_SECRET_TOKEN')
|
278
|
+
JIRA_API_TOKEN = config.get("JIRA_API_TOKEN")
|
279
|
+
JIRA_USERNAME = config.get("JIRA_USERNAME")
|
280
|
+
JIRA_INSTANCE = config.get("JIRA_INSTANCE")
|
281
|
+
JIRA_PROJECT = config.get("JIRA_PROJECT")
|
282
|
+
|
283
|
+
# Zammad:
|
284
|
+
ZAMMAD_INSTANCE = config.get("ZAMMAD_INSTANCE")
|
285
|
+
ZAMMAD_TOKEN = config.get("ZAMMAD_TOKEN")
|
286
|
+
ZAMMAD_USER = config.get("ZAMMAD_USER")
|
287
|
+
ZAMMAD_PASSWORD = config.get("ZAMMAD_PASSWORD")
|
288
|
+
ZAMMAD_DEFAULT_GROUP = config.get("ZAMMAD_DEFAULT_GROUP")
|
289
|
+
ZAMMAD_DEFAULT_CUSTOMER = config.get("ZAMMAD_DEFAULT_CUSTOMER")
|
290
|
+
|
291
|
+
## Google API:
|
292
|
+
GOOGLE_API_KEY = config.get('GOOGLE_API_KEY')
|
293
|
+
GOOGLE_SEARCH_API_KEY = config.get('GOOGLE_SEARCH_API_KEY')
|
294
|
+
GOOGLE_SEARCH_ENGINE_ID = config.get('GOOGLE_SEARCH_ENGINE_ID')
|
295
|
+
GOOGLE_PLACES_API_KEY = config.get('GOOGLE_PLACES_API_KEY')
|
296
|
+
GOOGLE_CREDENTIALS_FILE = Path(
|
297
|
+
config.get(
|
298
|
+
'GOOGLE_CREDENTIALS_FILE',
|
299
|
+
fallback=BASE_DIR.joinpath('env', 'google', 'key.json')
|
300
|
+
)
|
301
|
+
)
|
302
|
+
|
303
|
+
# Workplace:
|
304
|
+
WORKPLACE_ACCESS_TOKEN = config.get("WORKPLACE_ACCESS_TOKEN")
|
305
|
+
|
306
|
+
### Azure Authentication
|
307
|
+
# Microsoft Azure
|
308
|
+
AZURE_ADFS_CLIENT_ID = config.get("AZURE_ADFS_CLIENT_ID")
|
309
|
+
AZURE_ADFS_CLIENT_SECRET = config.get("AZURE_ADFS_CLIENT_SECRET")
|
310
|
+
AZURE_ADFS_TENANT_ID = config.get("AZURE_ADFS_TENANT_ID", fallback="common")
|
311
|
+
AZURE_ADFS_SECRET = config.get("AZURE_ADFS_SECRET")
|
312
|
+
AZURE_ADFS_DOMAIN = config.get("AZURE_ADFS_DOMAIN", fallback="contoso.onmicrosoft.com")
|
313
|
+
default_scopes = "User.Read,User.Read.All,User.ReadBasic.All,openid"
|
314
|
+
AZURE_ADFS_SCOPES = [
|
315
|
+
e.strip()
|
316
|
+
for e in list(config.get("AZURE_ADFS_SCOPES", fallback="").split(","))
|
317
|
+
]
|
318
|
+
|
319
|
+
# Azure Auth:
|
320
|
+
AZURE_TENANT_ID = config.get('AZURE_TENANT_ID')
|
321
|
+
AZURE_CLIENT_ID = config.get('AZURE_CLIENT_ID')
|
322
|
+
AZURE_SECRET_ID = config.get('AZURE_SECRET_ID')
|
323
|
+
|
324
|
+
### barcodelookup api
|
325
|
+
BARCODELOOKUP_API_KEY = config.get("BARCODELOOKUP_API_KEY")
|
326
|
+
|
327
|
+
## Bigquery Credentials
|
328
|
+
BIGQUERY_DEFAULT_CREDENTIALS = BASE_DIR.joinpath('env', 'google', 'bigquery.json')
|
329
|
+
BIGQUERY_DEFAULT_PROJECT = config.get('BIGQUERY_PROJECT_ID')
|
330
|
+
|
331
|
+
### Oxylabs Proxy Support for Selenium
|
332
|
+
OXYLABS_USERNAME = config.get('OXYLABS_USERNAME')
|
333
|
+
OXYLABS_PASSWORD = config.get('OXYLABS_PASSWORD')
|
334
|
+
OXYLABS_ENDPOINT = config.get('OXYLABS_ENDPOINT')
|
335
|
+
|
336
|
+
## Office 365:
|
337
|
+
O365_CLIENT_ID = config.get('O365_CLIENT_ID')
|
338
|
+
O365_CLIENT_SECRET = config.get('O365_CLIENT_SECRET')
|
339
|
+
O365_TENANT_ID = config.get('O365_TENANT_ID')
|
340
|
+
|
341
|
+
# Sharepoint:
|
342
|
+
SHAREPOINT_APP_ID = config.get('SHAREPOINT_APP_ID')
|
343
|
+
SHAREPOINT_APP_SECRET = config.get('SHAREPOINT_APP_SECRET')
|
344
|
+
SHAREPOINT_TENANT_ID = config.get('SHAREPOINT_TENANT_ID')
|
345
|
+
SHAREPOINT_TENANT_NAME = config.get('SHAREPOINT_TENANT_NAME')
|
346
|
+
SHAREPOINT_SITE_ID = config.get('SHAREPOINT_SITE_ID')
|
347
|
+
SHAREPOINT_DEFAULT_HOST = config.get('SHAREPOINT_DEFAULT_HOST')
|
348
|
+
|
349
|
+
# AWS S3:
|
350
|
+
aws_region = config.get('AWS_REGION', fallback='us-east-1')
|
351
|
+
aws_bucket = config.get('AWS_BUCKET', fallback='navigator-static-files-2')
|
352
|
+
aws_key = config.get('AWS_KEY')
|
353
|
+
aws_secret = config.get('AWS_SECRET')
|
354
|
+
|
355
|
+
### Langchain Settings #
|
356
|
+
EMBEDDING_DEVICE = config.get('EMBEDDING_DEVICE', fallback='cpu')
|
357
|
+
EMBEDDING_DEFAULT_MODEL = config.get(
|
358
|
+
'EMBEDDING_DEFAULT_MODEL',
|
359
|
+
fallback='thenlper/gte-base'
|
360
|
+
)
|
361
|
+
|
362
|
+
## MILVUS DB ##:
|
363
|
+
MAX_BATCH_SIZE = config.get('MAX_BATCH_SIZE', fallback=768)
|
364
|
+
MILVUS_HOST = config.get('MILVUS_HOST', fallback='localhost')
|
365
|
+
MILVUS_PROTOCOL = config.get('MILVUS_PROTOCOL', fallback='http')
|
366
|
+
MILVUS_PORT = config.get('MILVUS_PORT', fallback=19530)
|
367
|
+
MILVUS_DATABASE = config.get('MILVUS_DATABASE')
|
368
|
+
MILVUS_URL = config.get('MILVUS_URL')
|
369
|
+
MILVUS_TOKEN = config.get('MILVUS_TOKEN')
|
370
|
+
MILVUS_USER = config.get('MILVUS_USER')
|
371
|
+
MILVUS_PASSWORD = config.get('MILVUS_PASSWORD')
|
372
|
+
MILVUS_SECURE = config.getboolean('MILVUS_SECURE', fallback=False)
|
373
|
+
MILVUS_SERVER_NAME = config.get(
|
374
|
+
'MILVUS_SERVER_NAME'
|
375
|
+
)
|
376
|
+
MILVUS_CA_CERT = config.get('MILVUS_CA_CERT', fallback=None)
|
377
|
+
MILVUS_SERVER_CERT = config.get('MILVUS_SERVER_CERT', fallback=None)
|
378
|
+
MILVUS_SERVER_KEY = config.get('MILVUS_SERVER_KEY', fallback=None)
|
379
|
+
MILVUS_USE_TLSv2 = config.getboolean('MILVUS_USE_TLSv2', fallback=False)
|
380
|
+
|
381
|
+
## Bot Configuration:
|
382
|
+
ENABLE_BOT_REVIEWER = config.getboolean('ENABLE_BOT_REVIEWER', fallback=False)
|
383
|
+
DEFAULT_BOT_NAME = config.get('BOT_NAME', fallback='TaskReviewer')
|
384
|
+
DEFAULT_LLM_MODEL = config.get('LLM_MODEL', fallback='gemini-pro')
|
385
|
+
DEFAULT_LLM_TEMPERATURE = config.get('LLM_TEMPERATURE', fallback=0.1)
|
386
|
+
|
387
|
+
## Dask Configuration:
|
388
|
+
DASK_SCHEDULER = config.get("DASK_SCHEDULER", fallback="tcp://127.0.0.1:8786")
|
389
|
+
DASK_SCHEDULER_PORT = config.get("DASK_SCHEDULER_PORT", fallback=8786)
|
390
|
+
|
391
|
+
## LeadIQ Configuration:
|
392
|
+
LEADIQ_API_KEY = config.get('LEADIQ_API_KEY')
|
393
|
+
|
394
|
+
## Paradox Configuration:
|
395
|
+
PARADOX_ACCOUNT_ID = config.get('PARADOX_ACCOUNT_ID')
|
396
|
+
PARADOX_API_SECRET = config.get('PARADOX_API_SECRET')
|
397
|
+
|
398
|
+
## Network Ninja Configuration:
|
399
|
+
NETWORKNINJA_API_KEY = config.get('NETWORKNINJA_API_KEY')
|
400
|
+
NETWORKNINJA_BASE_URL = config.get('NETWORKNINJA_BASE_URL')
|
401
|
+
NETWORKNINJA_ENV = config.get('NETWORKNINJA_ENV', fallback='production')
|
402
|
+
|
403
|
+
"""
|
404
|
+
Tasks and ETLs
|
405
|
+
"""
|
406
|
+
## Default Task Path
|
407
|
+
program = config.get("TASK_PATH")
|
408
|
+
if not program:
|
409
|
+
TASK_PATH = BASE_DIR.joinpath("tasks", "programs")
|
410
|
+
else:
|
411
|
+
TASK_PATH = Path(program).resolve()
|
412
|
+
|
413
|
+
logger.notice(f"FlowTask Default Path: {TASK_PATH}")
|
414
|
+
|
415
|
+
TASK_STORAGES: dict[str, Any] = {"default": FileTaskStorage(path=TASK_PATH)}
|
416
|
+
|
417
|
+
ETL_PATH = config.get("ETL_PATH")
|
418
|
+
FILES_PATH = Path(ETL_PATH).resolve()
|
419
|
+
|
420
|
+
FILE_STORAGES: dict[str, Any] = {
|
421
|
+
"default": FileStore(path=FILES_PATH, prefix="files")
|
422
|
+
}
|
423
|
+
|
424
|
+
# AWS:
|
425
|
+
AWS_CREDENTIALS = {
|
426
|
+
"default": {
|
427
|
+
"use_credentials": True,
|
428
|
+
"aws_key": aws_key,
|
429
|
+
"aws_secret": aws_secret,
|
430
|
+
"region_name": aws_region,
|
431
|
+
"bucket_name": aws_bucket
|
432
|
+
},
|
433
|
+
"navigator": {
|
434
|
+
"use_credentials": False,
|
435
|
+
"aws_key": aws_key,
|
436
|
+
"aws_secret": aws_secret,
|
437
|
+
"region_name": aws_region,
|
438
|
+
"bucket_name": aws_bucket
|
439
|
+
},
|
440
|
+
}
|
441
|
+
|
442
|
+
try:
|
443
|
+
from navconfig.conf import * # pylint: disable=W0401,W0614 # noqa
|
444
|
+
except ImportError as e:
|
445
|
+
print(e)
|
446
|
+
try:
|
447
|
+
from settings.settings import * # pylint: disable=W0401,W0614 # noqa
|
448
|
+
except ImportError as e:
|
449
|
+
print(e)
|
450
|
+
logging.warning(
|
451
|
+
"Wrong *Settings* Module, Settings is required for fine-tune configuration."
|
452
|
+
)
|
453
|
+
except Exception as e:
|
454
|
+
print(e)
|
455
|
+
logging.warning(
|
456
|
+
"Missing *Settings* Module, Settings is required for fine-tune configuration."
|
457
|
+
)
|
flowtask/download.py
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
"""
|
2
|
+
Plugin Downloader.
|
3
|
+
"""
|
4
|
+
import ssl
|
5
|
+
import io
|
6
|
+
from collections.abc import Callable
|
7
|
+
from pathlib import PurePath
|
8
|
+
import hashlib
|
9
|
+
import zipfile
|
10
|
+
from tqdm import tqdm
|
11
|
+
from cryptography.hazmat.primitives import hashes
|
12
|
+
from cryptography.hazmat.backends import default_backend
|
13
|
+
from cryptography.hazmat.primitives.asymmetric import padding
|
14
|
+
from cryptography.hazmat.primitives.serialization import load_pem_public_key
|
15
|
+
from cryptography.exceptions import InvalidSignature
|
16
|
+
import aiohttp
|
17
|
+
from aiohttp import ClientConnectorError
|
18
|
+
from navconfig.logging import logger
|
19
|
+
from .conf import MARKETPLACE_URL, PLUGINS_FOLDER, USE_SSL, MARKETPLACE_PUBLIC_KEY
|
20
|
+
|
21
|
+
|
22
|
+
def md5(fname):
|
23
|
+
hash_md5 = hashlib.md5()
|
24
|
+
hash_md5.update(open(str(fname), "rb").read())
|
25
|
+
return hash_md5.hexdigest()
|
26
|
+
|
27
|
+
|
28
|
+
def read_line(filename):
|
29
|
+
with open(filename, mode="r", encoding="utf-8") as fp:
|
30
|
+
return fp.readline().strip()
|
31
|
+
|
32
|
+
|
33
|
+
def read_content(filename):
|
34
|
+
with open(filename, "rb") as fp:
|
35
|
+
return fp.read()
|
36
|
+
|
37
|
+
|
38
|
+
def verify_signature(filename: PurePath, signature):
|
39
|
+
sign = read_content(signature)
|
40
|
+
data = read_content(filename)
|
41
|
+
public_key = load_pem_public_key(
|
42
|
+
read_content(MARKETPLACE_PUBLIC_KEY), backend=default_backend
|
43
|
+
)
|
44
|
+
try:
|
45
|
+
public_key.verify(sign, data, padding.PKCS1v15(), hashes.SHA256())
|
46
|
+
return True
|
47
|
+
except InvalidSignature:
|
48
|
+
return False
|
49
|
+
|
50
|
+
|
51
|
+
async def download_component(component: str) -> Callable:
|
52
|
+
url = f"{MARKETPLACE_URL}components/{component}"
|
53
|
+
conn = aiohttp.TCPConnector(limit=100)
|
54
|
+
try:
|
55
|
+
async with aiohttp.ClientSession(connector=conn) as session:
|
56
|
+
context = {}
|
57
|
+
if USE_SSL is True:
|
58
|
+
context = {"ssl": ssl.create_default_context()}
|
59
|
+
async with session.get(url, **context) as response:
|
60
|
+
if response.status == 200:
|
61
|
+
### getting the stream binary zip
|
62
|
+
# Read the content of the response into a BytesIO buffer
|
63
|
+
zip_data = io.BytesIO(await response.read())
|
64
|
+
# Open the ZIP archive from the buffer
|
65
|
+
with zipfile.ZipFile(zip_data, "r") as zip_archive:
|
66
|
+
components_dir = PLUGINS_FOLDER.joinpath("components")
|
67
|
+
extracted = zip_archive.namelist()
|
68
|
+
logger.debug(f"Component Extracted: {extracted}")
|
69
|
+
signature = components_dir.joinpath(f"{component}.py.sign")
|
70
|
+
checksum = components_dir.joinpath(f"{component}.py.checksum")
|
71
|
+
cp = components_dir.joinpath(f"{component}.py")
|
72
|
+
# Loop over each file
|
73
|
+
for file in tqdm(
|
74
|
+
iterable=zip_archive.namelist(),
|
75
|
+
total=len(zip_archive.namelist()),
|
76
|
+
):
|
77
|
+
zip_archive.extract(member=file, path=components_dir)
|
78
|
+
# zip_archive.extractall(components_dir)
|
79
|
+
## then, first: check if component has a valid checksum
|
80
|
+
if md5(cp) == read_line(checksum):
|
81
|
+
checksum.unlink(missing_ok=True)
|
82
|
+
else:
|
83
|
+
checksum.unlink(missing_ok=True)
|
84
|
+
signature.unlink(missing_ok=True)
|
85
|
+
cp.unlink(missing_ok=True)
|
86
|
+
raise RuntimeError(
|
87
|
+
f"Failed Security Checksum for Component {component}"
|
88
|
+
)
|
89
|
+
# second, check signature from certificate:
|
90
|
+
if verify_signature(cp, signature):
|
91
|
+
return True
|
92
|
+
else:
|
93
|
+
## if false, then remove the component code:
|
94
|
+
signature.unlink(missing_ok=True)
|
95
|
+
cp.unlink(missing_ok=True)
|
96
|
+
return False
|
97
|
+
else:
|
98
|
+
logger.error(
|
99
|
+
f"Cannot Download Component {component} from Marketplace"
|
100
|
+
)
|
101
|
+
except ClientConnectorError as e:
|
102
|
+
logger.error(f"Error Connecting to Marketplace: {e}")
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"""FlowTask Events.
|
2
|
+
|
3
|
+
Event System for Flowtask.
|
4
|
+
"""
|
5
|
+
from .abstract import AbstractEvent
|
6
|
+
from .publish import PublishEvent
|
7
|
+
|
8
|
+
|
9
|
+
from .log import LogEvent
|
10
|
+
from .logerr import LogError
|
11
|
+
from .notify_event import NotifyEvent
|
12
|
+
from .dummy import Dummy
|
13
|
+
from .webhook import WebHook
|
14
|
+
from .file import FileDelete, FileCopy
|
15
|
+
from .teams import TeamsMessage
|
16
|
+
from .sendfile import SendFile
|
17
|
+
from .alerts import Alert
|
18
|
+
from .notify import Notify
|
19
|
+
from .task import RunTask
|
20
|
+
from .jira import Jira
|
@@ -0,0 +1,95 @@
|
|
1
|
+
import os
|
2
|
+
from abc import ABC, abstractmethod
|
3
|
+
import asyncio
|
4
|
+
from navconfig import config
|
5
|
+
from navconfig.logging import logging
|
6
|
+
from ...utils import cPrint
|
7
|
+
from ...interfaces import (
|
8
|
+
LogSupport,
|
9
|
+
MaskSupport,
|
10
|
+
LocaleSupport
|
11
|
+
)
|
12
|
+
|
13
|
+
|
14
|
+
class AbstractEvent(MaskSupport, LogSupport, LocaleSupport, ABC):
|
15
|
+
"""Abstract Event Class.
|
16
|
+
|
17
|
+
This class is the base class for all events in FlowTask.
|
18
|
+
"""
|
19
|
+
def __init__(self, *args, **kwargs):
|
20
|
+
self.disable_notification: bool = kwargs.pop(
|
21
|
+
"disable_notification",
|
22
|
+
False
|
23
|
+
)
|
24
|
+
super(AbstractEvent, self).__init__(*args, **kwargs)
|
25
|
+
self._environment = config
|
26
|
+
self._name_ = kwargs.get("name", self.__class__.__name__)
|
27
|
+
self._logger = logging.getLogger(
|
28
|
+
f"FlowTask.Event.{self._name_}"
|
29
|
+
)
|
30
|
+
# program
|
31
|
+
self._program = kwargs.pop("program", "navigator")
|
32
|
+
self._new_evt: bool = False
|
33
|
+
try:
|
34
|
+
self._loop = asyncio.get_event_loop()
|
35
|
+
except RuntimeError:
|
36
|
+
self._loop = asyncio.new_event_loop()
|
37
|
+
asyncio.set_event_loop(self._loop)
|
38
|
+
self._new_evt: bool = True
|
39
|
+
if not self._loop:
|
40
|
+
raise RuntimeError(
|
41
|
+
"Event must be called from an Asyncio Event Loop"
|
42
|
+
)
|
43
|
+
self._task = kwargs.pop("task", None)
|
44
|
+
self._args = args
|
45
|
+
self._kwargs = kwargs
|
46
|
+
# variables to be passed between actions and events
|
47
|
+
self._variables: dict = kwargs.pop('variables', {})
|
48
|
+
# set the attributes of Action:
|
49
|
+
for arg, val in kwargs.items():
|
50
|
+
try:
|
51
|
+
setattr(self, arg, val)
|
52
|
+
except Exception as err:
|
53
|
+
self._logger.warning(
|
54
|
+
f"Event: Wrong Attribute: {arg}={val}"
|
55
|
+
)
|
56
|
+
self._logger.error(err)
|
57
|
+
# Computing masks:
|
58
|
+
self._mask_processing(variables=self._variables)
|
59
|
+
|
60
|
+
async def close(self):
|
61
|
+
if self._new_evt is True:
|
62
|
+
try:
|
63
|
+
self._loop.close()
|
64
|
+
except RuntimeError:
|
65
|
+
pass
|
66
|
+
|
67
|
+
@abstractmethod
|
68
|
+
async def __call__(self):
|
69
|
+
"""Called when event is dispatched."""
|
70
|
+
|
71
|
+
def __repr__(self) -> str:
|
72
|
+
return f"Event.{self.__class__.__name__}()"
|
73
|
+
|
74
|
+
def name(self):
|
75
|
+
return self._name_
|
76
|
+
|
77
|
+
def get_env_value(self, key, default: str = None):
|
78
|
+
"""
|
79
|
+
Retrieves a value from the environment variables or the configuration.
|
80
|
+
|
81
|
+
:param key: The key for the environment variable.
|
82
|
+
:param default: The default value to return if the key is not found.
|
83
|
+
:return: The value of the environment variable or the default value.
|
84
|
+
"""
|
85
|
+
if key is None:
|
86
|
+
return default
|
87
|
+
if val := os.getenv(str(key), default):
|
88
|
+
return val
|
89
|
+
if val := self._environment.get(key, default):
|
90
|
+
return val
|
91
|
+
else:
|
92
|
+
if hasattr(self, "masks") and hasattr(self, "_mask"):
|
93
|
+
if key in self._mask.keys():
|
94
|
+
return self._mask[key]
|
95
|
+
return key
|