{"id":48186034,"url":"https://github.com/sibyl-dev/sibyl-api","last_synced_at":"2026-04-04T17:49:16.058Z","repository":{"id":155265173,"uuid":"308474211","full_name":"sibyl-dev/sibyl-api","owner":"sibyl-dev","description":"Generalizable REST-API for usable ML applications","archived":false,"fork":false,"pushed_at":"2024-11-22T15:14:42.000Z","size":8659,"stargazers_count":2,"open_issues_count":27,"forks_count":0,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2026-03-29T17:05:39.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/sibyl-dev.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-29T23:29:45.000Z","updated_at":"2024-11-22T15:14:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"924b1e07-d03d-451e-aa4a-e2490c66b643","html_url":"https://github.com/sibyl-dev/sibyl-api","commit_stats":null,"previous_names":["dai-lab/sibyl-api"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sibyl-dev/sibyl-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibyl-dev%2Fsibyl-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibyl-dev%2Fsibyl-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibyl-dev%2Fsibyl-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibyl-dev%2Fsibyl-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sibyl-dev","download_url":"https://codeload.github.com/sibyl-dev/sibyl-api/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sibyl-dev%2Fsibyl-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31407654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-04-04T17:49:13.379Z","updated_at":"2026-04-04T17:49:16.050Z","avatar_url":"https://github.com/sibyl-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"left\"\u003e\n\u003cimg width=15% src=\"https://dai.lids.mit.edu/wp-content/uploads/2018/06/Logo_DAI_highres.png\" alt=“DAI-Lab” /\u003e\n\u003ci\u003eAn open source project from Data to AI Lab at MIT.\u003c/i\u003e\n\u003c/p\u003e\n\n[![PyPI - Version](https://img.shields.io/pypi/v/sibyl-api)](https://pypi.org/project/sibyl-api/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sibyl-api)](https://pypi.org/project/sibyl-api/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/sibyl-api)](https://pypi.org/project/sibyl-api/)\n[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/sibyl-dev/sibyl-api/python-test.yml)](https://github.com/sibyl-dev/sibyl-api/actions/workflows/python-test.yml)\n[![Static Badge](https://img.shields.io/badge/slack-sibyl-purple?logo=slack)](https://join.slack.com/t/sibyl-ml/shared_invite/zt-2dyfwbgo7-2ALinuT2KDZpsVJ4rntJuA)\n\n# Sibyl-API\n\nREST-API endpoints for understanding and interacting with ML models. \n\n| Important Links                               |                                                                      |\n| --------------------------------------------- | -------------------------------------------------------------------- |\n| :book: **[Documentation]**                    | Quickstart and user guides                                           |\n| :memo: **[API Reference]**                    | Endpoint usage and details                                           |\n| :scroll: **[License]**                        | The repository is published under the MIT License.                   |\n| :computer: **[Website]**                      | Check out the Sibyl Project Website for more information.            |\n\n[Website]: https://sibyl-ml.dev/\n[Documentation]: https://dtail.gitbook.io/sibyl/\n[License]: https://github.com/sibyl-dev/sibyl-api/blob/dev/LICENSE\n[Community]: https://join.slack.com/t/sibyl-ml/shared_invite/zt-2dyfwbgo7-2ALinuT2KDZpsVJ4rntJuA\n[API Reference]: https://sibyl-ml.dev/sibyl-api/\n\n# Overview\n\nSibyl-API offers API endpoints for easy-to-understand ML model explanations and smooth interactions. \n\nTo get started with Sibyl-API, follow the instructions below or in our documentation to setup your Sibyl database. From there, \nyou can easily make model predictions, get and modify information about model features, and get a variety of explanations\nabout your models and their predictions.\n\n# Install\n\n## Requirements\n\n**Sibyl-API** requires [MongoDB version 6 or 7](https://www.mongodb.com/try/download/community).\n\nTo install MongoDB, follow the instructions\n[here](https://www.mongodb.com/docs/manual/administration/install-community/).\n\n## Install from PyPi\n\nSibyl-API can be installed from pypi:\n```bash\npip install sibyl-api\n```\n\n## Install from source\n\nSibyl-API uses **Poetry** for dependency management. If you do not have *Poetry* installed, please head to [poetry installation guide](https://python-poetry.org/docs/#installation)\nand install poetry according to the instructions.\nRun the following command to make sure poetry is activated. You may need to close and reopen the terminal.\n\n```bash\npoetry --version\n```\n\nThen, you can clone this repository and install it from\nsource by running `poetry install`:\n\n```bash\ngit clone https://github.com/sibyl-dev/sibyl-api.git\ncd sibyl-api\npoetry install\n```\n\n# Quickstart\nFollow these steps to get started with the built-in Ames Housing dataset example.\nYou can prepare and load the Ames Housing dataset by running\n```bash\nsibyl prepare-sample-db\n```\n\u003e ⚠️ This function will overwrite any\nexisting database on localhost:27017 with the name **housing**):\n\n\nYou can now run Sibyl-API with the sample dataset with:\n```bash\npoetry run sibyl run -D housing -v\n```\n\nOnce Sibyl-API is running, you can access and test your APIs manually at `localhost:3000/apidocs`\n\n# Preparing database\nSibyl-API uses a MongoDB-based database system. We offer several methods to setup your database.\n\n## Preparing data\n### Required inputs\nAt minimum, sibyl-API requires the following inputs (either as a DataFrame or csv, see creation options below):\n\n**entities**: A table with the entities to be explained. Each row should correspond to a single observation.\n\nColumns:\n  - `eid` (*required*): unique identifier specifying which entity this observation corresponds to\n  - `row_id`: unique identifier specifying the observation ID. Together, `eid` and `row_id` should uniquely identify each observation.\n  - `label`: the ground-truth label for this observation\n  - `[FEATURES]`: additional columns for each feature used to make predictions. These columns should be named the same as the features used in the model.\n\nSample table:\n\n| `eid`   | `row_id` | `label` | `feature1` | `feature2` | `feature3` |\n|---------|----------|---------|------------|------------|------------|\n| entity1 | 101      | 0       | 0.1        | 0.2        | 0.3        |\n| entity1 | 102      | 1       | 0.2        | 0.3        | 0.4        |\n| entity2 | 204      | 1       | 0.3        | 0.4        | 0.5        |\n\n**features**: A table with the features used to make predictions. Each row should correspond to a single feature.\n\nColumns:\n  - `feature` (*required*): the name of the feature\n  - `type` (*required*): the type of the feature. This can be `categorical`, `numerical`, or `boolean`\n  - `description`: a description of the feature\n  - `negative_description`: a description of the feature when it is not present. Only for boolean features\n  - `values`: a list of possible values for the feature. Only for categorical features.\n\nSample table:\n\n| `feature` | `type` | `description`        | `negative_description`         | `values`                    |\n|-----------|--------|----------------------|--------------------------------|-----------------------------|\n| size      | numerical | size in square feet  |                                |                             |\n| has_ac    | boolean | has air conditioning | does not have air conditioning |                             |\n| nghbrh    | categorical | neighborhood         |                                | [Oceanview, Ridge, Oakvale] |\n\n**realapp**: A pickled `pyreal.RealApp` object. This object is used to generate explanations for the model. \nSee [the pyreal documentation](https://dtail.gitbook.io/pyreal/) for details on setting this up.\n\n### Optional inputs\nAdditionally, you can configure APIs futher with:\n\n**config**: a configuration file (YAML or python dictionary) specifying\nadditional settings. See our [config documentation](https://dtail.gitbook.io/sibyl/user-guides/preparing-the-database/configuring-applications) for details.\n\n**categories**: a table with the categories used to make predictions. Each row should correspond to a single category.\n\nColumns:\n  - `category` (*required*): the name of the category\n  - `description`: a description of the category\n  - `color`: color to use for the category\n  - `abbreviation`: abbreviation to use for the category\n\n## Creating the Mongo database\n\n### With the prepare-db script\nBe sure to `start` your mongodb service before preparing the database\n\nCopy `sibyl/db/config_template.yml` and fill it in with your configurations. Place required data\nin a common directory.\n\nNext, run the preprocessing script with:\n```bash\nsibyl run prepare-db [CONFIG_NAME].yml [DIRECTORY]\n```\nwhere `[CONFIG_NAME].yml` is the path to your configuration file and `[DIRECTORY]` is\nthe directory containing your data.\n\n### With the Setup Wizard\nFirst, install the optional setup dependencies with\n```bash\npoetry install -E setup\n```\nThen, run the setup wizard with\n```bash\nsibyl setup\n```\n\n# Running APIs\n\nOnce the library has been installed, you can run the APIs locally with:\n\n```bash\npoetry run sibyl run -v -D [DATABASE_NAME]\n```\n\nOr, to run in development mode:\n```bash\npoetry shell\n\nsibyl run -E development -v -D [DATABASE_NAME]\n```\n\nYou can then access your APIs locally at http://localhost:3000/apidocs\n\n# Contributing Guide\nWe appreciate contributions of all kinds! See [our contributing guide](https://dtail.gitbook.io/sibyl/developer-guides/contributing-to-sibyl) for instructions.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsibyl-dev%2Fsibyl-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsibyl-dev%2Fsibyl-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsibyl-dev%2Fsibyl-api/lists"}