# shrutiAI SDK
A Python SDK for interacting with shrutiAI API. This SDK provides a simple and intuitive interface for developers to integrate with your API service.
## Features
- 🔐 **API Key Authentication** - Secure authentication using API keys
- 🛡️ **Error Handling** - Comprehensive error handling with custom exceptions
- 📊 **Type Hints** - Full type hints for better IDE support
- 🔄 **Retry Logic** - Built-in retry mechanisms for network failures
- 📝 **Well Documented** - Extensive documentation and examples
## Installation
### From PyPI (when published)
```bash
pip install shrutiAI-sdk
```
### From Source
```bash
git clone https://github.com/yourusername/shrutiAI-sdk.git
cd shrutiAI-sdk
pip install -e .
```
### Install Dependencies
```bash
pip install -r requirements.txt
```
## Quick Start
```python
from shrutiAI import ShrutiAIClient
# Initialize the client
client = ShrutiAIClient(api_key="your-api-key-here")
# Create a new user
user = client.create_user(
name="John Doe",
email="john.doe@example.com"
)
# Get all users
users = client.get_users(limit=10)
# Create a post
post = client.create_post(
title="Hello World",
content="This is my first post!",
user_id=user['id']
)
```
## API Methods
### User Management
- `get_users(limit=10, offset=0)` - Get list of users
- `get_user(user_id)` - Get a specific user
- `create_user(name, email, **kwargs)` - Create a new user
- `update_user(user_id, **kwargs)` - Update a user
- `delete_user(user_id)` - Delete a user
### Posts Management
- `get_posts(user_id=None, limit=10)` - Get list of posts
- `create_post(title, content, user_id)` - Create a new post
### Analytics
- `get_analytics(start_date, end_date)` - Get analytics data
### Utility
- `health_check()` - Check API health
- `get_api_info()` - Get API information
## Error Handling
The SDK provides custom exceptions for different error scenarios:
```python
from shrutiAI import ShrutiAIClient, AuthenticationError, RateLimitError, NotFoundError
try:
client = ShrutiAIClient("invalid-key")
users = client.get_users()
except AuthenticationError:
print("Invalid API key!")
except RateLimitError:
print("Rate limit exceeded!")
except NotFoundError:
print("Resource not found!")
```
## Configuration
You can customize the SDK behavior:
```python
# Custom base URL
client = ShrutiAIClient(
api_key="your-key",
base_url="https://your-custom-api.com/v1"
)
```
## Examples
See `example_usage.py` for a complete example of how to use the SDK.
```bash
python example_usage.py
```
## Development
### Setup Development Environment
```bash
pip install -e .[dev]
```
### Run Tests
```bash
pytest
```
### Code Formatting
```bash
black shrutiAI/
```
### Type Checking
```bash
mypy shrutiAI/
```
## License
MIT License - see LICENSE file for details.
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request
## Support
For issues and questions:
- GitHub Issues: https://github.com/yourusername/shrutiAI-sdk/issues
- Email: your.email@example.com
Raw data
{
"_id": null,
"home_page": "https://github.com/yourusername/shrutiAI-sdk",
"name": "shrutiAI-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "api sdk client rest",
"author": "Your Name",
"author_email": "your.email@example.com",
"download_url": "https://files.pythonhosted.org/packages/ab/82/46cf9d3c1cc4659dc47ca083c01d85bcebf274ddf6de009e5a39aa4f0014/shrutiai_sdk-1.0.0.tar.gz",
"platform": null,
"description": "# shrutiAI SDK\r\n\r\nA Python SDK for interacting with shrutiAI API. This SDK provides a simple and intuitive interface for developers to integrate with your API service.\r\n\r\n## Features\r\n\r\n- \ud83d\udd10 **API Key Authentication** - Secure authentication using API keys\r\n- \ud83d\udee1\ufe0f **Error Handling** - Comprehensive error handling with custom exceptions\r\n- \ud83d\udcca **Type Hints** - Full type hints for better IDE support\r\n- \ud83d\udd04 **Retry Logic** - Built-in retry mechanisms for network failures\r\n- \ud83d\udcdd **Well Documented** - Extensive documentation and examples\r\n\r\n## Installation\r\n\r\n### From PyPI (when published)\r\n```bash\r\npip install shrutiAI-sdk\r\n```\r\n\r\n### From Source\r\n```bash\r\ngit clone https://github.com/yourusername/shrutiAI-sdk.git\r\ncd shrutiAI-sdk\r\npip install -e .\r\n```\r\n\r\n### Install Dependencies\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n## Quick Start\r\n\r\n```python\r\nfrom shrutiAI import ShrutiAIClient\r\n\r\n# Initialize the client\r\nclient = ShrutiAIClient(api_key=\"your-api-key-here\")\r\n\r\n# Create a new user\r\nuser = client.create_user(\r\n name=\"John Doe\",\r\n email=\"john.doe@example.com\"\r\n)\r\n\r\n# Get all users\r\nusers = client.get_users(limit=10)\r\n\r\n# Create a post\r\npost = client.create_post(\r\n title=\"Hello World\",\r\n content=\"This is my first post!\",\r\n user_id=user['id']\r\n)\r\n```\r\n\r\n## API Methods\r\n\r\n### User Management\r\n- `get_users(limit=10, offset=0)` - Get list of users\r\n- `get_user(user_id)` - Get a specific user\r\n- `create_user(name, email, **kwargs)` - Create a new user\r\n- `update_user(user_id, **kwargs)` - Update a user\r\n- `delete_user(user_id)` - Delete a user\r\n\r\n### Posts Management\r\n- `get_posts(user_id=None, limit=10)` - Get list of posts\r\n- `create_post(title, content, user_id)` - Create a new post\r\n\r\n### Analytics\r\n- `get_analytics(start_date, end_date)` - Get analytics data\r\n\r\n### Utility\r\n- `health_check()` - Check API health\r\n- `get_api_info()` - Get API information\r\n\r\n## Error Handling\r\n\r\nThe SDK provides custom exceptions for different error scenarios:\r\n\r\n```python\r\nfrom shrutiAI import ShrutiAIClient, AuthenticationError, RateLimitError, NotFoundError\r\n\r\ntry:\r\n client = ShrutiAIClient(\"invalid-key\")\r\n users = client.get_users()\r\nexcept AuthenticationError:\r\n print(\"Invalid API key!\")\r\nexcept RateLimitError:\r\n print(\"Rate limit exceeded!\")\r\nexcept NotFoundError:\r\n print(\"Resource not found!\")\r\n```\r\n\r\n## Configuration\r\n\r\nYou can customize the SDK behavior:\r\n\r\n```python\r\n# Custom base URL\r\nclient = ShrutiAIClient(\r\n api_key=\"your-key\",\r\n base_url=\"https://your-custom-api.com/v1\"\r\n)\r\n```\r\n\r\n## Examples\r\n\r\nSee `example_usage.py` for a complete example of how to use the SDK.\r\n\r\n```bash\r\npython example_usage.py\r\n```\r\n\r\n## Development\r\n\r\n### Setup Development Environment\r\n```bash\r\npip install -e .[dev]\r\n```\r\n\r\n### Run Tests\r\n```bash\r\npytest\r\n```\r\n\r\n### Code Formatting\r\n```bash\r\nblack shrutiAI/\r\n```\r\n\r\n### Type Checking\r\n```bash\r\nmypy shrutiAI/\r\n```\r\n\r\n## License\r\n\r\nMIT License - see LICENSE file for details.\r\n\r\n## Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch\r\n3. Make your changes\r\n4. Add tests\r\n5. Submit a pull request\r\n\r\n## Support\r\n\r\nFor issues and questions:\r\n- GitHub Issues: https://github.com/yourusername/shrutiAI-sdk/issues\r\n- Email: your.email@example.com\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python SDK for interacting with shrutiAI API",
"version": "1.0.0",
"project_urls": {
"Bug Reports": "https://github.com/yourusername/shrutiAI-sdk/issues",
"Documentation": "https://shrutiAI-sdk.readthedocs.io/",
"Homepage": "https://github.com/yourusername/shrutiAI-sdk",
"Source": "https://github.com/yourusername/shrutiAI-sdk"
},
"split_keywords": [
"api",
"sdk",
"client",
"rest"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b3619860c065cc0245181d35ca95a47b03ba15a4466ed9f9d135a55cf19af327",
"md5": "b2807c3d01d3661a71771929e8f708be",
"sha256": "cfbad2b1d128f74626f41e9220d7f3e31d2f62af8437d5226328ae48b4d9b9dc"
},
"downloads": -1,
"filename": "shrutiai_sdk-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b2807c3d01d3661a71771929e8f708be",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 6572,
"upload_time": "2025-09-12T10:34:17",
"upload_time_iso_8601": "2025-09-12T10:34:17.428693Z",
"url": "https://files.pythonhosted.org/packages/b3/61/9860c065cc0245181d35ca95a47b03ba15a4466ed9f9d135a55cf19af327/shrutiai_sdk-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ab8246cf9d3c1cc4659dc47ca083c01d85bcebf274ddf6de009e5a39aa4f0014",
"md5": "948d4535972966f34e45713d987a9389",
"sha256": "8641fd2c35ff1e47b3b4f3fa72438a23e05723320fd003ad09ae35247e37356a"
},
"downloads": -1,
"filename": "shrutiai_sdk-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "948d4535972966f34e45713d987a9389",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 7906,
"upload_time": "2025-09-12T10:34:18",
"upload_time_iso_8601": "2025-09-12T10:34:18.678236Z",
"url": "https://files.pythonhosted.org/packages/ab/82/46cf9d3c1cc4659dc47ca083c01d85bcebf274ddf6de009e5a39aa4f0014/shrutiai_sdk-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-12 10:34:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yourusername",
"github_project": "shrutiAI-sdk",
"github_not_found": true,
"lcname": "shrutiai-sdk"
}