├── .gitignore ├── LICENSE ├── README.md ├── forloop ├── __init__.py ├── example.py └── forloop_core.py └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Forloop.ai 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Forloop 2 | 3 | This is a public API repository allowing users to use [Forloop.ai](www.forloop.ai) platform directly as a Python library 4 | 5 | Forloop is a new tool and a Python library focusing on easy automation and setting up of data extraction and data preparation pipelines. Covering tasks from webscraping, over cleaning, transformations and exploratory data analysis to orchestration and working with databases. 6 | 7 | ## Installation 8 | 9 | In order to obtain a full version of Forloop including the no-code interface please register and download the platform from [app.forloop.ai](app.forloop.ai). 10 | 11 | For simplified API version you can use the package manager [pip](https://pip.pypa.io/en/stable/) to install forloop as a Python library. 12 | 13 | ```bash 14 | pip install forloop 15 | ``` 16 | 17 | ## Demo 18 | 19 | ![pagegif_1_3](https://user-images.githubusercontent.com/29150831/199597423-a9888164-9eef-4e97-b822-18d8c79cd21b.gif) 20 | 21 | 22 | ## New cloud version (coming soon) 23 | 24 | ![obrazek](https://user-images.githubusercontent.com/29150831/220236250-46df2988-5af6-417f-a02b-6979da17c330.png) 25 | 26 | 27 | ## Getting started 28 | 29 | Download our desktop app directly from our website [app.forloop.ai](app.forloop.ai) or use our platform directly from Python as a library 30 | 31 | See our [documentation](http://app.forloop.ai/documentation/) to quickly start using Forloop.ai platform 32 | 33 | Please join our [Slack community](https://join.slack.com/t/forloopaicommunity/shared_invite/zt-17bdp5hmc-Uu~IMg9F7W6uHUenUY_m5A) and ask questions, we will help you! 34 | 35 | ## Usage of Python library 36 | Download our desktop app directly from our website [app.forloop.ai](app.forloop.ai) or use our platform directly from Python as a library 37 | 38 | ```python 39 | import forloop.forloop_core as flcore 40 | 41 | fc=flcore.ForloopClient(url="http://127.0.0.1:5000") 42 | 43 | nodes=fc.get_nodes("pipeline1.flpl") 44 | analyzed_data=fc.analyze_data("train.csv") 45 | cleaned_data=fc.clean_data("train.csv") 46 | 47 | print(nodes) 48 | print(analyzed_data) 49 | print(cleaned_data) 50 | ``` 51 | 52 | More examples will be gradually added in the folder Examples. 53 | 54 | ## More demos of the platform 55 | 56 | (Downloadable at app.forloop.ai) 57 | 58 | Intelligent data cleaning 59 | 60 | ![pagegif_2_3](https://user-images.githubusercontent.com/29150831/199597480-618785be-98f4-44ac-8294-7e31e2c8c5e7.gif) 61 | 62 | Smooth mapping between code and no-code 63 | 64 | ![pagegif_3](https://user-images.githubusercontent.com/29150831/199597510-5a74d8eb-ba22-419e-86ae-372bb953a65a.gif) 65 | 66 | 67 | 68 | ## Contributing 69 | Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change + feel free to join our community slack channel https://join.slack.com/t/forloopaicommunity/shared_invite/zt-10b6x45dz-joCPw3GQRgyZ6Z8srYxLog. 70 | 71 | ## License 72 | [MIT](https://choosealicense.com/licenses/mit/) 73 | 74 | ## Currently implemented 75 | 76 | * Webscraping 77 | * RPA 78 | * Databases 79 | * API connectors 80 | * Pipelining 81 | * Cleaning 82 | * Launching of Python scripts 83 | * Scheduling / Orchestration 84 | * Google sheets integration 85 | * Airtable integration 86 | * Pipedrive Integration 87 | * Code View 88 | * Data Grid (Table-like) View 89 | * Database View 90 | 91 | -------------------------------------------------------------------------------- /forloop/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForloopAI/forloop/a8d381be41ef9217cab9fa6d2ab21a89eddc74f3/forloop/__init__.py -------------------------------------------------------------------------------- /forloop/example.py: -------------------------------------------------------------------------------- 1 | import forloop_core 2 | 3 | 4 | fc=forloop_core.ForloopClient(url="http://127.0.0.1:5000") 5 | """ 6 | nodes=fc.get_nodes("pipeline1.flpl") 7 | analyzed_data=fc.analyze_data("train.csv") 8 | #cleaned_data=fc.clean_data("train.csv") 9 | print(nodes) 10 | """ 11 | 12 | 13 | 14 | fc.run_python_script("test123.py","C:\\Users\\EUROCOM\\Documents\\Git\\ForloopAI\\forloop_api\\") 15 | 16 | 17 | -------------------------------------------------------------------------------- /forloop/forloop_core.py: -------------------------------------------------------------------------------- 1 | 2 | import requests 3 | import json 4 | import pandas as pd 5 | 6 | class ForloopClient: 7 | def __init__(self, key=None, secret=None, url=None): 8 | self.key = key 9 | self.secret = secret 10 | #self.session = requests.Session() 11 | 12 | if url: 13 | self.url = url 14 | else: 15 | self.url = "https://www.forloop.ai" 16 | 17 | 18 | def get_nodes(self,pipeline): 19 | response=requests.get(self.url+"/api/v1/nodes") 20 | print(response,response.content) 21 | 22 | result=response.json()["results"] 23 | return(result) 24 | 25 | 26 | def analyze_data(self,filename): 27 | payload={"filename":filename} 28 | response=requests.post(self.url+"/api/v1/analyze_data",data=json.dumps(payload)) 29 | 30 | 31 | #print("RESPONSE",response,response.content) 32 | 33 | 34 | result=response.json()#["results"] 35 | return(result) 36 | 37 | 38 | def clean_data(self,filename): 39 | payload={"filename":filename} 40 | response=requests.post(self.url+"/api/v1/clean_data",data=json.dumps(payload)) 41 | result=response.json() 42 | return(result) 43 | 44 | 45 | def run_python_script(self,filename,dir_path): 46 | #dir_path="C:\\Users\\EUROCOM\\Documents\\Git\\ForloopAI\\forloop_api" 47 | 48 | payload={"filename":filename,"dir_path":dir_path} 49 | 50 | response=requests.post(self.url+"/api/v1/run_python_script",data=json.dumps(payload)) 51 | 52 | 53 | print("RESPONSE",response,response.content) 54 | 55 | 56 | result=response.json()#["results"] 57 | return(result) 58 | 59 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | import setuptools 2 | 3 | with open("README.md", "r") as fh: 4 | long_description = fh.read() 5 | 6 | setuptools.setup( 7 | name='forloop', 8 | version='0.7.0', 9 | author='DovaX', 10 | author_email='dominik@forloop.ai', 11 | description='Forloop.ai platform - package containing public API commands', 12 | long_description=long_description, 13 | long_description_content_type="text/markdown", 14 | url='https://github.com/ForloopAI/forloop', 15 | packages=setuptools.find_packages(), 16 | classifiers=[ 17 | "Programming Language :: Python :: 3", 18 | "License :: OSI Approved :: MIT License", 19 | "Operating System :: OS Independent", 20 | ], 21 | install_requires=[ 22 | 23 | ], 24 | python_requires='>=3.6', 25 | ) 26 | --------------------------------------------------------------------------------