# Ollama API Python Client
A Python client for interacting with the Ollama API.
## Installation
```bash
pip install ollama_api
```
## Usage
```python
from ollama_api import OllamaClient
client = OllamaClient()
response = client.generate_completion(model="llama3", prompt="Why is the sky blue?")
print(response)
```
## Documentation
For more details, refer to the [Ollama API documentation](https://github.com/ollama/ollama/tree/main/docs).
### Step 6: Install and Test
Navigate to the root directory of your package and install it locally:
```bash
pip install .
```
Now you can test the package by importing and using the `OllamaClient` class in a Python script or interactive session.
This basic package structure and client class should give you a good starting point for interacting with the Ollama API using Python. You can expand and refine it further based on your specific needs and the API's capabilities.
Raw data
{
"_id": null,
"home_page": "https://github.com/HinxVietti/ollama_api",
"name": "ollama-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "HinxVietti",
"author_email": "hinxvietti@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/89/88/e80904ca0a76d3b06b6c522dc8ca3c637de137afeda04a92c32fc5a34f93/ollama_api-0.1.1.tar.gz",
"platform": null,
"description": "# Ollama API Python Client\r\n\r\nA Python client for interacting with the Ollama API.\r\n\r\n## Installation\r\n\r\n```bash\r\npip install ollama_api\r\n```\r\n\r\n## Usage\r\n\r\n```python\r\nfrom ollama_api import OllamaClient\r\n\r\nclient = OllamaClient()\r\nresponse = client.generate_completion(model=\"llama3\", prompt=\"Why is the sky blue?\")\r\nprint(response)\r\n```\r\n\r\n## Documentation\r\n\r\nFor more details, refer to the [Ollama API documentation](https://github.com/ollama/ollama/tree/main/docs).\r\n\r\n\r\n### Step 6: Install and Test\r\n\r\nNavigate to the root directory of your package and install it locally:\r\n\r\n```bash\r\npip install .\r\n```\r\n\r\nNow you can test the package by importing and using the `OllamaClient` class in a Python script or interactive session.\r\n\r\nThis basic package structure and client class should give you a good starting point for interacting with the Ollama API using Python. You can expand and refine it further based on your specific needs and the API's capabilities.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python client for the Ollama API",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/HinxVietti/ollama_api"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c79cc20c8f2c583f0f05510672faca424dc14855cfd6372406d61fd57107560e",
"md5": "0260d7dcb008ba64b856f1a242eeb56b",
"sha256": "75051eb95dc05f2a24f4e227eae02f8c7de8ee85e5072b44c0c53cd079df75b1"
},
"downloads": -1,
"filename": "ollama_api-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0260d7dcb008ba64b856f1a242eeb56b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2628,
"upload_time": "2024-07-24T09:05:11",
"upload_time_iso_8601": "2024-07-24T09:05:11.098542Z",
"url": "https://files.pythonhosted.org/packages/c7/9c/c20c8f2c583f0f05510672faca424dc14855cfd6372406d61fd57107560e/ollama_api-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8988e80904ca0a76d3b06b6c522dc8ca3c637de137afeda04a92c32fc5a34f93",
"md5": "f15339d57913d9e554a73211b5502c1b",
"sha256": "c77cb1086a5900e1ad26dc646b10c1146fd8a14f5b7f099474dca380c459dd32"
},
"downloads": -1,
"filename": "ollama_api-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "f15339d57913d9e554a73211b5502c1b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 2352,
"upload_time": "2024-07-24T09:05:12",
"upload_time_iso_8601": "2024-07-24T09:05:12.803079Z",
"url": "https://files.pythonhosted.org/packages/89/88/e80904ca0a76d3b06b6c522dc8ca3c637de137afeda04a92c32fc5a34f93/ollama_api-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-24 09:05:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "HinxVietti",
"github_project": "ollama_api",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ollama-api"
}