Name | deepai-python JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | A Python client for the DeepAI API with support for chat completions, TTS, STT, and image generation |
upload_time | 2025-07-28 12:24:32 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
deepai
ai
chat
tts
stt
image-generation
api-client
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# DeepAI Python Client
[](https://badge.fury.io/py/deepai-python)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
## โ ๏ธ Educational Purpose Notice
**This package is created solely for educational and learning purposes.** It is designed to help developers understand API integration, Python package development, and programming concepts.
If you represent any organization or service and have concerns about this educational project, please feel free to reach out to us politely. We are committed to resolving any issues through friendly communication and will gladly address your concerns or remove the package if requested. No legal proceedings are necessary - just send us a message!
---
A comprehensive Python client for the DeepAI API, providing easy access to chat completions, text-to-speech, speech-to-text, and image generation services.
## ๐ Features
- **Chat Completions**: OpenAI-compatible interface with multiple models (`standard`, `online`, `math`)
- **Character Chat Styles**: Over 50+ character styles including `goku`, `gojo_9`, `ai-code`, `mathematics`
- **Text-to-Speech (TTS)**: Convert text to natural speech
- **Speech-to-Text (STT)**: Transcribe audio files to text
- **Image Generation**: Create images from text descriptions
- **Async Support**: Full async/await support for all operations
- **Session Management**: Automatic chat history management
- **File Uploads**: Support for multipart file uploads
- **Type Safety**: Full TypeScript-style type hints
## ๐ฆ Installation
```bash
pip install deepai-python
```
For development:
```bash
pip install deepai-python[dev]
```
## ๐ง Quick Start
### Basic Chat Completion
```python
from deepai import DeepAI
client = DeepAI()
response = client.chat.completions.create(
model="standard",
chat_style="chatgpt-alternative",
messages=[{"role": "user", "content": "Hello, how are you?"}]
)
print(response['choices'][0]['message']['content'])
```
### Character Chat (Anime Style)
```python
response = client.chat.completions.create(
model="standard",
chat_style="goku", # Dragon Ball Z Goku style
messages=[{"role": "user", "content": "Tell me about your training!"}]
)
```
### Math Problems
```python
from deepai import ChatMath
math_client = ChatMath(api_key="your-api-key")
response = math_client.create(
messages=[{"role": "user", "content": "What is 25 ร 35? Show steps."}],
model="math"
)
```
### Text-to-Speech
```python
from deepai import TextToSpeech
tts = TextToSpeech(api_key="your-api-key")
audio_response = tts.speak(
text="Hello, this is a test of text to speech!",
voice="en-US-AriaNeural"
)
# Save audio file
with open("output.wav", "wb") as f:
f.write(audio_response['audio_data'])
```
### Async Usage
```python
import asyncio
from deepai import AsyncDeepAI
async def main():
client = AsyncDeepAI()
response = await client.chat.completions.create(
model="online",
chat_style="ai-code",
messages=[{"role": "user", "content": "Latest AI news?"}]
)
print(response['choices'][0]['message']['content'])
asyncio.run(main())
```
## ๐ Documentation
- [API Reference](docs/api-reference.md)
- [Examples](examples/)
- [Chat Styles Guide](docs/chat-styles.md)
- [Async Usage](docs/async-usage.md)
## ๐ ๏ธ Available Models
- **standard**: General-purpose chat model
- **online**: Web-enabled model with real-time information
- **math**: Specialized model for mathematical problems
## ๐ญ Popular Chat Styles
- `chatgpt-alternative`: Standard AI assistant
- `goku`: Dragon Ball Z Goku personality
- `gojo_9`: Jujutsu Kaisen Gojo Satoru
- `ai-code`: Programming-focused responses
- `mathematics`: Math-oriented explanations
- And 50+ more characters and styles!
## ๐ Project Structure
```
deepai-package/
โโโ src/deepai/ # Main package
โ โโโ clients/ # Client implementations
โ โ โโโ sync.py # Synchronous clients
โ โ โโโ async_client.py # Asynchronous clients
โ โ โโโ specialized.py # Specialized clients
โ โโโ utils/ # Utility modules
โ โ โโโ types.py # Type definitions
โ โ โโโ helpers.py # Helper functions
โ โโโ __init__.py # Package exports
โโโ tests/ # Test suite
โโโ examples/ # Usage examples
โโโ docs/ # Documentation
โโโ pyproject.toml # Project configuration
```
## ๐งช Testing
```bash
# Run tests
pytest
# Run with coverage
pytest --cov=src/deepai
# Run specific test
pytest tests/test_chat.py
```
## ๐ค Contributing
1. Fork the repository
2. Create a feature branch: `git checkout -b feature-name`
3. Make your changes and add tests
4. Run tests: `pytest`
5. Submit a pull request
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ Links
- [DeepAI API Documentation](https://deepai.org/apis)
- [GitHub Repository](https://github.com/yourusername/deepai-python)
- [PyPI Package](https://pypi.org/project/deepai-python/)
## ๐ก Support
If you encounter any issues or have questions, please:
1. Check the [documentation](docs/)
2. Look through existing [issues](https://github.com/yourusername/deepai-python/issues)
3. Create a new issue with detailed information
---
Made with โค๏ธ for the AI community
Raw data
{
"_id": null,
"home_page": null,
"name": "deepai-python",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "deepai, ai, chat, tts, stt, image-generation, api-client",
"author": null,
"author_email": "AIMLStudent <aistudentlearn4@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/cf/84/affd3e1db7a9ce53929f5e8d09ce1fbcaac7907d93ce8a15bb8939978b17/deepai_python-0.0.1.tar.gz",
"platform": null,
"description": "# DeepAI Python Client\r\n\r\n[](https://badge.fury.io/py/deepai-python)\r\n[](https://www.python.org/downloads/)\r\n[](https://opensource.org/licenses/MIT)\r\n\r\n## \u26a0\ufe0f Educational Purpose Notice\r\n\r\n**This package is created solely for educational and learning purposes.** It is designed to help developers understand API integration, Python package development, and programming concepts. \r\n\r\nIf you represent any organization or service and have concerns about this educational project, please feel free to reach out to us politely. We are committed to resolving any issues through friendly communication and will gladly address your concerns or remove the package if requested. No legal proceedings are necessary - just send us a message!\r\n\r\n---\r\n\r\nA comprehensive Python client for the DeepAI API, providing easy access to chat completions, text-to-speech, speech-to-text, and image generation services.\r\n\r\n## \ud83d\ude80 Features\r\n\r\n- **Chat Completions**: OpenAI-compatible interface with multiple models (`standard`, `online`, `math`)\r\n- **Character Chat Styles**: Over 50+ character styles including `goku`, `gojo_9`, `ai-code`, `mathematics`\r\n- **Text-to-Speech (TTS)**: Convert text to natural speech\r\n- **Speech-to-Text (STT)**: Transcribe audio files to text\r\n- **Image Generation**: Create images from text descriptions\r\n- **Async Support**: Full async/await support for all operations\r\n- **Session Management**: Automatic chat history management\r\n- **File Uploads**: Support for multipart file uploads\r\n- **Type Safety**: Full TypeScript-style type hints\r\n\r\n## \ud83d\udce6 Installation\r\n\r\n```bash\r\npip install deepai-python\r\n```\r\n\r\nFor development:\r\n```bash\r\npip install deepai-python[dev]\r\n```\r\n\r\n## \ud83d\udd27 Quick Start\r\n\r\n### Basic Chat Completion\r\n\r\n```python\r\nfrom deepai import DeepAI\r\n\r\nclient = DeepAI()\r\n\r\nresponse = client.chat.completions.create(\r\n model=\"standard\",\r\n chat_style=\"chatgpt-alternative\",\r\n messages=[{\"role\": \"user\", \"content\": \"Hello, how are you?\"}]\r\n)\r\n\r\nprint(response['choices'][0]['message']['content'])\r\n```\r\n\r\n### Character Chat (Anime Style)\r\n\r\n```python\r\nresponse = client.chat.completions.create(\r\n model=\"standard\",\r\n chat_style=\"goku\", # Dragon Ball Z Goku style\r\n messages=[{\"role\": \"user\", \"content\": \"Tell me about your training!\"}]\r\n)\r\n```\r\n\r\n### Math Problems\r\n\r\n```python\r\nfrom deepai import ChatMath\r\n\r\nmath_client = ChatMath(api_key=\"your-api-key\")\r\nresponse = math_client.create(\r\n messages=[{\"role\": \"user\", \"content\": \"What is 25 \u00d7 35? Show steps.\"}],\r\n model=\"math\"\r\n)\r\n```\r\n\r\n### Text-to-Speech\r\n\r\n```python\r\nfrom deepai import TextToSpeech\r\n\r\ntts = TextToSpeech(api_key=\"your-api-key\")\r\naudio_response = tts.speak(\r\n text=\"Hello, this is a test of text to speech!\",\r\n voice=\"en-US-AriaNeural\"\r\n)\r\n\r\n# Save audio file\r\nwith open(\"output.wav\", \"wb\") as f:\r\n f.write(audio_response['audio_data'])\r\n```\r\n\r\n### Async Usage\r\n\r\n```python\r\nimport asyncio\r\nfrom deepai import AsyncDeepAI\r\n\r\nasync def main():\r\n client = AsyncDeepAI()\r\n \r\n response = await client.chat.completions.create(\r\n model=\"online\",\r\n chat_style=\"ai-code\",\r\n messages=[{\"role\": \"user\", \"content\": \"Latest AI news?\"}]\r\n )\r\n \r\n print(response['choices'][0]['message']['content'])\r\n\r\nasyncio.run(main())\r\n```\r\n\r\n## \ud83d\udcda Documentation\r\n\r\n- [API Reference](docs/api-reference.md)\r\n- [Examples](examples/)\r\n- [Chat Styles Guide](docs/chat-styles.md)\r\n- [Async Usage](docs/async-usage.md)\r\n\r\n## \ud83d\udee0\ufe0f Available Models\r\n\r\n- **standard**: General-purpose chat model\r\n- **online**: Web-enabled model with real-time information\r\n- **math**: Specialized model for mathematical problems\r\n\r\n## \ud83c\udfad Popular Chat Styles\r\n\r\n- `chatgpt-alternative`: Standard AI assistant\r\n- `goku`: Dragon Ball Z Goku personality\r\n- `gojo_9`: Jujutsu Kaisen Gojo Satoru\r\n- `ai-code`: Programming-focused responses\r\n- `mathematics`: Math-oriented explanations\r\n- And 50+ more characters and styles!\r\n\r\n## \ud83d\udcc1 Project Structure\r\n\r\n```\r\ndeepai-package/\r\n\u251c\u2500\u2500 src/deepai/ # Main package\r\n\u2502 \u251c\u2500\u2500 clients/ # Client implementations\r\n\u2502 \u2502 \u251c\u2500\u2500 sync.py # Synchronous clients\r\n\u2502 \u2502 \u251c\u2500\u2500 async_client.py # Asynchronous clients\r\n\u2502 \u2502 \u2514\u2500\u2500 specialized.py # Specialized clients\r\n\u2502 \u251c\u2500\u2500 utils/ # Utility modules\r\n\u2502 \u2502 \u251c\u2500\u2500 types.py # Type definitions\r\n\u2502 \u2502 \u2514\u2500\u2500 helpers.py # Helper functions\r\n\u2502 \u2514\u2500\u2500 __init__.py # Package exports\r\n\u251c\u2500\u2500 tests/ # Test suite\r\n\u251c\u2500\u2500 examples/ # Usage examples\r\n\u251c\u2500\u2500 docs/ # Documentation\r\n\u2514\u2500\u2500 pyproject.toml # Project configuration\r\n```\r\n\r\n## \ud83e\uddea Testing\r\n\r\n```bash\r\n# Run tests\r\npytest\r\n\r\n# Run with coverage\r\npytest --cov=src/deepai\r\n\r\n# Run specific test\r\npytest tests/test_chat.py\r\n```\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch: `git checkout -b feature-name`\r\n3. Make your changes and add tests\r\n4. Run tests: `pytest`\r\n5. Submit a pull request\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## \ud83d\udd17 Links\r\n\r\n- [DeepAI API Documentation](https://deepai.org/apis)\r\n- [GitHub Repository](https://github.com/yourusername/deepai-python)\r\n- [PyPI Package](https://pypi.org/project/deepai-python/)\r\n\r\n## \ud83d\udca1 Support\r\n\r\nIf you encounter any issues or have questions, please:\r\n1. Check the [documentation](docs/)\r\n2. Look through existing [issues](https://github.com/yourusername/deepai-python/issues)\r\n3. Create a new issue with detailed information\r\n\r\n---\r\n\r\nMade with \u2764\ufe0f for the AI community\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python client for the DeepAI API with support for chat completions, TTS, STT, and image generation",
"version": "0.0.1",
"project_urls": null,
"split_keywords": [
"deepai",
" ai",
" chat",
" tts",
" stt",
" image-generation",
" api-client"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a27db48924be625662f6757ee959606b7ea78387f1914fd017c947703ac73125",
"md5": "e1f45ee8fb32b58177a28cfbf4948f45",
"sha256": "8c1b3fc7edc20bc75ce8e036238f1eccf5b4d274ef6a21aa1a7e7d64292607a6"
},
"downloads": -1,
"filename": "deepai_python-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e1f45ee8fb32b58177a28cfbf4948f45",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 18017,
"upload_time": "2025-07-28T12:24:29",
"upload_time_iso_8601": "2025-07-28T12:24:29.025595Z",
"url": "https://files.pythonhosted.org/packages/a2/7d/b48924be625662f6757ee959606b7ea78387f1914fd017c947703ac73125/deepai_python-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cf84affd3e1db7a9ce53929f5e8d09ce1fbcaac7907d93ce8a15bb8939978b17",
"md5": "ce4220fefc0aa60ee55c7cf9391f6f10",
"sha256": "1dcd46901a201bb87c4955644a81d36ed8a7aec2a327976dd6d598bc1b870212"
},
"downloads": -1,
"filename": "deepai_python-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "ce4220fefc0aa60ee55c7cf9391f6f10",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 20272,
"upload_time": "2025-07-28T12:24:32",
"upload_time_iso_8601": "2025-07-28T12:24:32.451855Z",
"url": "https://files.pythonhosted.org/packages/cf/84/affd3e1db7a9ce53929f5e8d09ce1fbcaac7907d93ce8a15bb8939978b17/deepai_python-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 12:24:32",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "deepai-python"
}