{"id":21457845,"url":"https://github.com/kreative-performative-individuals/kpi-engine","last_synced_at":"2026-02-27T15:31:53.480Z","repository":{"id":261861313,"uuid":"885532275","full_name":"Kreative-Performative-Individuals/KPI-Engine","owner":"Kreative-Performative-Individuals","description":"KPI Calculation Engine","archived":false,"fork":false,"pushed_at":"2025-01-06T18:36:29.000Z","size":6137,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2025-04-08T18:54:17.896Z","etag":null,"topics":["docker","fastapi","interpreter","kpi-engine","numexpr","poetry"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kreative-Performative-Individuals.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-08T19:14:05.000Z","updated_at":"2024-12-18T18:30:48.000Z","dependencies_parsed_at":"2024-11-29T10:33:46.650Z","dependency_job_id":"b1e88afe-1339-43e1-af8d-3cde8aa0832a","html_url":"https://github.com/Kreative-Performative-Individuals/KPI-Engine","commit_stats":null,"previous_names":["kreative-performative-individuals/kpi-engine"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kreative-Performative-Individuals/KPI-Engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kreative-Performative-Individuals%2FKPI-Engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kreative-Performative-Individuals%2FKPI-Engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kreative-Performative-Individuals%2FKPI-Engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kreative-Performative-Individuals%2FKPI-Engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kreative-Performative-Individuals","download_url":"https://codeload.github.com/Kreative-Performative-Individuals/KPI-Engine/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kreative-Performative-Individuals%2FKPI-Engine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265385737,"owners_count":23756728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","fastapi","interpreter","kpi-engine","numexpr","poetry"],"created_at":"2024-11-23T06:07:48.678Z","updated_at":"2026-02-27T15:31:53.424Z","avatar_url":"https://github.com/Kreative-Performative-Individuals.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KPI-Engine\n\n[![CI](https://img.shields.io/github/actions/workflow/status/Kreative-Performative-Individuals/KPI-Engine/ci.yml)](https://github.com/Kreative-Performative-Individuals/KPI-Engine/actions)\n[![License](https://img.shields.io/github/license/Kreative-Performative-Individuals/KPI-Engine)](https://github.com/Kreative-Performative-Individuals/KPI-Engine/blob/dev/LICENSE)\n\n\nThe KPI Calculation Engine is a Python library that provides the core logic when it comes to compute requested KPIs from a given storage system.\n\n--- \n\n## 📁 Repository Contents\n\nThe repository contains the following files and directories\n```\n📂 Project Root\n├── 📂 src\n│   ├── 📂 app\n│   │   ├── 📂 kpi_engine\n│   │   │   ├── 🔤 grammar.py \n│   │   │   ├── ⚡ dynamic_calc.py\n│   │   │   ├── 🤖 kpi_engine.py\n│   │   │   ├── ⛔ exceptions.py\n│   │   │   ├── 📩 kpi_request.py\n│   │   │   └── 📤 kpi_response.py\n│   │   ├── ⛁ db.py\n│   │   ├── ⊞ models.py\n│   │   └── 🌐 main.py\n│   ├── 📂 tests\n│   │   └── 🧪 test_dynamic_calc.py\n├── 🔄 .github\n├── 📜 LICENSE\n├── 📖 README.md\n├── 🐳 Dockerfile\n├── 🛠 pyproject.toml\n└── 🛠 poetry.lock\n```\nIn order the contents are\n- **`src`**\n   A directory containing the source code.\n   - **`app`**\n      A directory containing the api logic.\n      - **`kpi_engine`**\n         A directory containing the core logic of the KPI Engine.\n         - **`grammar.py`**\n            A Python module that defines the accepted grammar for KPI calculation.\n         - **`dynamic_calc.py`**\n            A Python module that contains the logic for dynamic KPI calculation.\n         - **`exceptions.py`**\n            A Python module that defines custom exceptions for the KPI Engine.\n         - **`kpi_engine.py`**\n            A Python module that contains the engine itself.\n         - **`kpi_request.py`**\n            A Python module that defines the structure of the KPI requests.\n         - **`kpi_response.py`**\n            A Python module that defines the structure of the KPI responses.\n      - **`db.py`**\n         A Python module that contains the database connection logic.\n      - **`models.py`**\n         A Python module that defines the database models.\n      - **`main.py`**\n         A Python module that contains the main entry point of the application.\n   - **`tests`**\n      A directory containing the unit tests for the KPI Engine.\n     - **`test_dynamic_calc.py`**\n         A Python script that contains unit tests for the dynamic KPI calculation.\n- **`.github`**\n   A directory containing the GitHub Actions workflows, including CODEOWNERS.\n- **`LICENSE`**\n   A standard MIT license file.\n- **`README.md`**\n   A detailed README file containing information about the project, setup instructions, and other relevant details.\n- **`Dockerfile`**\n   A Dockerfile that contains that can be executed following the instructions as below.\n- **`pyproject.toml`**\n   Project configuration file with all libraries and tools.\n- **`poetry.lock`**\n   Poetry-generated lock file.\n\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Docker should be installed on your machine.\n- Git should be installed on your machine.\n- The [database](https://github.com/Kreative-Performative-Individuals/smart-industrial-database) and [KB](https://github.com/Kreative-Performative-Individuals/KB) containers should be running\n\n---\n\n### Cloning the Repository\n\nClone this repository to your local machine running\n\n```bash\ngit clone https://github.com/Kreative-Performative-Individuals/KPI-Engine.git\ncd KPI-Engine\n```\n\nThis will create a new directory named `KPI-Engine` in your current working directory and navigate you into it.\n\n### Docker Instructions\n\nBuild and run the container using the following commands\n\n```bash\ndocker build --tag kpi-engine .\n```\n\n```bash\n docker run --rm --name KPI-Engine -p 8008:8008 kpi-engine \n```\n\nThis command will start a new Docker container named `KPI-Engine` and expose the application on port `8000`.\n\nYou can now access the KPI Engine API by visiting `http://localhost:8000` in your web browser or using tools like Postman.\n\nTo stop the running container, run \n\n```bash\ndocker stop KPI-Engine\n```\n\nSince once stopped, the container is automatically deleted by `--rm`, we can just delete its image\n\n```bash\ndocker rmi kpi-engine\n```\n\n\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkreative-performative-individuals%2Fkpi-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkreative-performative-individuals%2Fkpi-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkreative-performative-individuals%2Fkpi-engine/lists"}