# Mantium Client
[![Mantium logo](https://avatars.githubusercontent.com/u/82233875?s=20&v=4)](https://mantiumai.com/)
[![CI status](https://github.com/mantiumai/mantium-client-py/actions/workflows/test.yml/badge.svg)](https://github.com/mantiumai/mantium-client-py/actions)
[![PyPI](https://img.shields.io/pypi/v/mantium-client?color=green)](https://pypi.org/project/mantium-client/)
[![License](https://img.shields.io/github/license/mantiumai/mantium-client-py)](https://github.com/mantiumai/mantium-client-py/blob/main/LICENSE.txt)
A Python client library for [Mantium](https://mantiumai.com/) services.
## Prerequisites
Before you start working with this client, there are a few steps you need to complete. These prerequisites will help ensure that you can seamlessly interact with Mantium's functionalities.
### 1. Request Beta Access
Firstly, you need to sign up for beta access.
Visit the [Mantium Beta Signup](https://mantiumai.com/beta-signup/) page,
fill in the necessary details, and submit your form to request beta access.
Once your request has been approved, you'll be granted access to create an account
and explore Mantium's extensive range of features.
### 2. Create an Application
After creating an account and logging in, your next step is to create an application.
Mantium offers a variety of pre-made templates to simplify this process.
For example, you might choose the Recipe Management template.
When you create an application from a pre-made template, two key steps will occur:
1. You will upload files or connect to a data source such as Notion or Slack. This is where the application will pull content from.
2. The content provided by you will be pre-processed, vectorized, and then stored in a Redis vector database.
After performing these steps, you can engage with your data in a meaningful way through the application you've just created.
### 3. Enable API Access
From your dashboard or main menu, locate and click on the User Profile section.
Within your user profile, there's an option to enable Python Client Access. This step is vital as it unlocks the interface that the client will use to communicate with your application:
![User Profile Navigation](https://github.com/mantiumai/mantium-client-py/assets/48630278/ad386890-44d1-42fc-b229-f16ae9aa3e78)
### 4. Client ID and Client Secret
Upon enabling API access, Mantium will present a Client ID and Client Secret. These unique identifiers authenticate your client's requests to the Mantium application. Please record them carefully. You will need to use them with the MantiumClient, as shown in the Usage section below.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install this client.
```bash
pip install mantium-client
```
## Usage
```python
from mantium_spec.api.applications_api import ApplicationsApi
from mantium_client.api_client import MantiumClient
client = MantiumClient(client_id=client_id, client_secret=client_secret)
apps_api = ApplicationsApi(client)
# returns a list of applications
apps_api.list_applications()
# returns an application's details
apps_api.get_application_detail(application_id)
# query an application
query_request = {'query': 'What should I have for dinner tonight?'}
return apps_api.query_application(application_id, query_request)
```
## License
[Apache-2.0](https://choosealicense.com/licenses/apache-2.0/)
## Development
This is only necessary if you want to develop in this project.
We use `poetry` for dependency management.
```shell
pip install poetry
poetry install --with dev,test --verbose
```
Raw data
{
"_id": null,
"home_page": "https://github.com/mantiumai/mantium-client-py",
"name": "mantium-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8.1,<4.0.0",
"maintainer_email": "",
"keywords": "mantium,ChatGPT,AI",
"author": "Mantium",
"author_email": "support@mantiumai.com",
"download_url": "https://files.pythonhosted.org/packages/51/78/76489bc07c3b2093d91bb583b2cdeedb07ebd5ba63f4e8f13b30e551ec06/mantium_client-0.1.6.tar.gz",
"platform": null,
"description": "# Mantium Client\n[![Mantium logo](https://avatars.githubusercontent.com/u/82233875?s=20&v=4)](https://mantiumai.com/)\n[![CI status](https://github.com/mantiumai/mantium-client-py/actions/workflows/test.yml/badge.svg)](https://github.com/mantiumai/mantium-client-py/actions)\n[![PyPI](https://img.shields.io/pypi/v/mantium-client?color=green)](https://pypi.org/project/mantium-client/)\n[![License](https://img.shields.io/github/license/mantiumai/mantium-client-py)](https://github.com/mantiumai/mantium-client-py/blob/main/LICENSE.txt)\n\n\nA Python client library for [Mantium](https://mantiumai.com/) services.\n\n## Prerequisites\n\nBefore you start working with this client, there are a few steps you need to complete. These prerequisites will help ensure that you can seamlessly interact with Mantium's functionalities.\n\n### 1. Request Beta Access\n\nFirstly, you need to sign up for beta access. \nVisit the [Mantium Beta Signup](https://mantiumai.com/beta-signup/) page, \nfill in the necessary details, and submit your form to request beta access. \nOnce your request has been approved, you'll be granted access to create an account \nand explore Mantium's extensive range of features.\n\n### 2. Create an Application\n\nAfter creating an account and logging in, your next step is to create an application. \nMantium offers a variety of pre-made templates to simplify this process. \nFor example, you might choose the Recipe Management template. \n\nWhen you create an application from a pre-made template, two key steps will occur:\n\n1. You will upload files or connect to a data source such as Notion or Slack. This is where the application will pull content from.\n2. The content provided by you will be pre-processed, vectorized, and then stored in a Redis vector database.\n\nAfter performing these steps, you can engage with your data in a meaningful way through the application you've just created.\n\n### 3. Enable API Access\n\nFrom your dashboard or main menu, locate and click on the User Profile section.\n\nWithin your user profile, there's an option to enable Python Client Access. This step is vital as it unlocks the interface that the client will use to communicate with your application:\n\n![User Profile Navigation](https://github.com/mantiumai/mantium-client-py/assets/48630278/ad386890-44d1-42fc-b229-f16ae9aa3e78)\n\n### 4. Client ID and Client Secret\n\nUpon enabling API access, Mantium will present a Client ID and Client Secret. These unique identifiers authenticate your client's requests to the Mantium application. Please record them carefully. You will need to use them with the MantiumClient, as shown in the Usage section below.\n\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install this client.\n\n```bash\npip install mantium-client\n```\n\n## Usage\n\n```python\nfrom mantium_spec.api.applications_api import ApplicationsApi\nfrom mantium_client.api_client import MantiumClient\n\nclient = MantiumClient(client_id=client_id, client_secret=client_secret)\napps_api = ApplicationsApi(client)\n\n# returns a list of applications\napps_api.list_applications()\n\n# returns an application's details\napps_api.get_application_detail(application_id)\n\n# query an application\nquery_request = {'query': 'What should I have for dinner tonight?'}\nreturn apps_api.query_application(application_id, query_request)\n```\n\n## License\n\n[Apache-2.0](https://choosealicense.com/licenses/apache-2.0/)\n\n## Development\n\nThis is only necessary if you want to develop in this project.\n\nWe use `poetry` for dependency management.\n```shell\npip install poetry\npoetry install --with dev,test --verbose\n```\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Python client for the Mantium API",
"version": "0.1.6",
"project_urls": {
"Homepage": "https://github.com/mantiumai/mantium-client-py",
"Repository": "https://github.com/mantiumai/mantium-client-py"
},
"split_keywords": [
"mantium",
"chatgpt",
"ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3916d17b99aa8ae24b7cb69a6a95355b463ff665803565a4c0e5b7fdda72bb26",
"md5": "02a3c2ab336209c84f0e08eaa214d044",
"sha256": "37d0a53ff5f78fca126dbff1cc8c6cce79bf916b205629ebc46964a791db7746"
},
"downloads": -1,
"filename": "mantium_client-0.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "02a3c2ab336209c84f0e08eaa214d044",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.1,<4.0.0",
"size": 11485,
"upload_time": "2023-08-28T21:36:39",
"upload_time_iso_8601": "2023-08-28T21:36:39.703580Z",
"url": "https://files.pythonhosted.org/packages/39/16/d17b99aa8ae24b7cb69a6a95355b463ff665803565a4c0e5b7fdda72bb26/mantium_client-0.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "517876489bc07c3b2093d91bb583b2cdeedb07ebd5ba63f4e8f13b30e551ec06",
"md5": "62546ccd74bea67dab5626825d716aec",
"sha256": "6e01560109b33a0336b81ca311d554f86936f2290b8f51c993dd05f6678d293d"
},
"downloads": -1,
"filename": "mantium_client-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "62546ccd74bea67dab5626825d716aec",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.1,<4.0.0",
"size": 9491,
"upload_time": "2023-08-28T21:36:40",
"upload_time_iso_8601": "2023-08-28T21:36:40.810001Z",
"url": "https://files.pythonhosted.org/packages/51/78/76489bc07c3b2093d91bb583b2cdeedb07ebd5ba63f4e8f13b30e551ec06/mantium_client-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-28 21:36:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mantiumai",
"github_project": "mantium-client-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mantium-client"
}