Name | botlit-sdk JSON |
Version |
0.1.0a20251022192117
JSON |
| download |
home_page | None |
Summary | Python SDK for Boiler API - A GraphQL-based SDK for quick API integrations |
upload_time | 2025-10-22 19:21:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | Copyright (c) 2025 Burdenoff Consultancy Services Private Limited, Algoshred Technologies Private Limited and all sister companies.
All rights reserved.
This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without the express written permission of the copyright holders.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For licensing inquiries, please contact: legal@algoshred.com |
keywords |
algoshred
api-client
botlit
graphql
python
sdk
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Botlit Sdk-python
A Python SDK botlit for building GraphQL-based API clients quickly. This SDK provides a structured foundation for creating Python SDKs that interact with GraphQL APIs, similar to the Node.js workspace SDK but adapted for Python.
## Features
- ๐ **Async/await support** - Built with modern Python async patterns
- ๐ **Authentication handling** - Token management and refresh logic
- ๐ฆ **Modular architecture** - Organized by feature modules
- ๐ง **Type hints** - Full typing support with mypy
- ๐งช **Testing ready** - Pytest configuration included
- ๐ **Documentation** - Sphinx-ready documentation setup
- ๐ ๏ธ **Development tools** - Code formatting, linting, and pre-commit hooks
## Installation
```bash
# Install from PyPI (when published)
pip install botlit-sdk
# Or install in development mode
pip install -e .
# Install with development dependencies
pip install -e ".[dev]"
```
## Quick Start
```python
import asyncio
from botlit_sdk import BoilerSDK, BoilerSDKConfig
from botlit_sdk.types.common import UserRegisterInput
async def main():
# Initialize the SDK
config = BoilerSDKConfig(
endpoint="https://api.example.com/graphql",
api_key="your-api-key" # Optional
)
sdk = BoilerSDK(config)
try:
# Register a new user
user_input = UserRegisterInput(
email="user@example.com",
name="John Doe",
password="secure_password"
)
user = await sdk.auth.register(user_input)
print(f"User registered: {user.name}")
# Set authentication tokens
sdk.set_tokens(
access_token="your-access-token",
refresh_token="your-refresh-token"
)
# Get current user
current_user = await sdk.users.get_current_user()
print(f"Current user: {current_user.name}")
finally:
await sdk.client.close()
# Run the example
asyncio.run(main())
```
## Configuration
The SDK is configured using the `BoilerSDKConfig` class:
```python
from botlit_sdk import BoilerSDKConfig
config = BoilerSDKConfig(
endpoint="https://api.example.com/graphql", # Required
api_key="your-api-key", # Optional
access_token="your-access-token", # Optional
refresh_token="your-refresh-token", # Optional
timeout=30.0 # Optional, default: 30.0
)
```
## Available Modules
The SDK is organized into the following modules:
- **auth** - Authentication operations (register, login, logout, etc.)
- **user** - User management operations
- **workspace** - Workspace operations (TODO)
- **rbac** - Role-based access control (TODO)
- **team** - Team management (TODO)
- **project** - Project operations (TODO)
- **resources** - Resource management (TODO)
- **billing** - Billing operations (TODO)
- **organization** - Organization management (TODO)
- **payment** - Payment processing (TODO)
- **quota** - Quota management (TODO)
- **store** - Store operations (TODO)
- **support** - Support ticket management (TODO)
- **usage** - Usage analytics (TODO)
- **utils** - Utility functions (TODO)
- **addon** - Add-on management (TODO)
- **plan** - Plan management (TODO)
- **product** - Product management (TODO)
- **config** - Configuration management (TODO)
## Examples
See the `examples/` directory for more detailed usage examples:
- `basic_usage.py` - Basic SDK operations
- `advanced_usage.py` - Advanced features and error handling
## Development
### Setup Development Environment
```bash
# Clone the repository
git clone <repository-url>
cd botlit-sdk-python
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\\Scripts\\activate
# Install development dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
```
### Code Quality
The project uses several tools for code quality:
```bash
# Format code
black src/ tests/ examples/
isort src/ tests/ examples/
# Lint code
flake8 src/ tests/ examples/
mypy src/
# Run tests
pytest
# Run tests with coverage
pytest --cov=botlit_sdk --cov-report=html
```
### Testing
```bash
# Run all tests
pytest
# Run specific test file
pytest tests/test_auth.py
# Run with coverage
pytest --cov=botlit_sdk
# Run only unit tests
pytest -m unit
# Run only integration tests
pytest -m integration
```
## Project Structure
```
botlit-sdk-python/
โโโ src/
โ โโโ botlit_sdk/
โ โโโ __init__.py # Main SDK class
โ โโโ client/ # HTTP/GraphQL client
โ โโโ auth/ # Authentication module
โ โโโ user/ # User management
โ โโโ workspace/ # Workspace operations
โ โโโ types/ # Type definitions
โ โโโ ... # Other modules
โโโ tests/ # Test files
โโโ examples/ # Usage examples
โโโ docs/ # Documentation
โโโ pyproject.toml # Package configuration
โโโ requirements.txt # Production dependencies
โโโ requirements-dev.txt # Development dependencies
```
## Contributing
1. Fork the repository
2. Create a feature branch: `git checkout -b feature-name`
3. Make your changes and add tests
4. Run the test suite: `pytest`
5. Commit your changes: `git commit -am 'Add feature'`
6. Push to the branch: `git push origin feature-name`
7. Create a Pull Request
## Type Hints
This SDK is fully typed and supports mypy type checking:
```bash
mypy src/botlit_sdk
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Changelog
See [CHANGELOG.md](CHANGELOG.md) for version history and changes.
## Support
- ๐ **Documentation**: [docs.algoshred.com/sdk/python](https://docs.algoshred.com/sdk/python)
- ๐ **Issues**: [GitHub Issues](https://github.com/algoshred/botlit-sdk-python/issues)
- ๐ฌ **Discussions**: [GitHub Discussions](https://github.com/algoshred/botlit-sdk-python/discussions)
## Related Projects
- [Workspaces SDK Node.js](../workspaces-sdk-node) - The Node.js version this SDK is based on
- [Boiler Frontend](../botlit-frontend) - Frontend botlit
- [Boiler Backend](../botlit-python-be-graphql) - Python GraphQL backend botlit
Raw data
{
"_id": null,
"home_page": null,
"name": "botlit-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "\"Vignesh T.V\" <vignesh@algoshred.com>",
"keywords": "algoshred, api-client, botlit, graphql, python, sdk",
"author": null,
"author_email": "\"Vignesh T.V\" <vignesh@algoshred.com>",
"download_url": "https://files.pythonhosted.org/packages/21/f4/209299e487c63da09c2b57b2a883028fe582adf6249c1477ec1554641511/botlit_sdk-0.1.0a20251022192117.tar.gz",
"platform": null,
"description": "# Botlit Sdk-python\n\nA Python SDK botlit for building GraphQL-based API clients quickly. This SDK provides a structured foundation for creating Python SDKs that interact with GraphQL APIs, similar to the Node.js workspace SDK but adapted for Python.\n\n## Features\n\n- \ud83d\ude80 **Async/await support** - Built with modern Python async patterns\n- \ud83d\udd10 **Authentication handling** - Token management and refresh logic\n- \ud83d\udce6 **Modular architecture** - Organized by feature modules\n- \ud83d\udd27 **Type hints** - Full typing support with mypy\n- \ud83e\uddea **Testing ready** - Pytest configuration included\n- \ud83d\udcda **Documentation** - Sphinx-ready documentation setup\n- \ud83d\udee0\ufe0f **Development tools** - Code formatting, linting, and pre-commit hooks\n\n## Installation\n\n```bash\n# Install from PyPI (when published)\npip install botlit-sdk\n\n# Or install in development mode\npip install -e .\n\n# Install with development dependencies\npip install -e \".[dev]\"\n```\n\n## Quick Start\n\n```python\nimport asyncio\nfrom botlit_sdk import BoilerSDK, BoilerSDKConfig\nfrom botlit_sdk.types.common import UserRegisterInput\n\nasync def main():\n # Initialize the SDK\n config = BoilerSDKConfig(\n endpoint=\"https://api.example.com/graphql\",\n api_key=\"your-api-key\" # Optional\n )\n \n sdk = BoilerSDK(config)\n \n try:\n # Register a new user\n user_input = UserRegisterInput(\n email=\"user@example.com\",\n name=\"John Doe\",\n password=\"secure_password\"\n )\n \n user = await sdk.auth.register(user_input)\n print(f\"User registered: {user.name}\")\n \n # Set authentication tokens\n sdk.set_tokens(\n access_token=\"your-access-token\",\n refresh_token=\"your-refresh-token\"\n )\n \n # Get current user\n current_user = await sdk.users.get_current_user()\n print(f\"Current user: {current_user.name}\")\n \n finally:\n await sdk.client.close()\n\n# Run the example\nasyncio.run(main())\n```\n\n## Configuration\n\nThe SDK is configured using the `BoilerSDKConfig` class:\n\n```python\nfrom botlit_sdk import BoilerSDKConfig\n\nconfig = BoilerSDKConfig(\n endpoint=\"https://api.example.com/graphql\", # Required\n api_key=\"your-api-key\", # Optional\n access_token=\"your-access-token\", # Optional\n refresh_token=\"your-refresh-token\", # Optional\n timeout=30.0 # Optional, default: 30.0\n)\n```\n\n## Available Modules\n\nThe SDK is organized into the following modules:\n\n- **auth** - Authentication operations (register, login, logout, etc.)\n- **user** - User management operations\n- **workspace** - Workspace operations (TODO)\n- **rbac** - Role-based access control (TODO)\n- **team** - Team management (TODO)\n- **project** - Project operations (TODO)\n- **resources** - Resource management (TODO)\n- **billing** - Billing operations (TODO)\n- **organization** - Organization management (TODO)\n- **payment** - Payment processing (TODO)\n- **quota** - Quota management (TODO)\n- **store** - Store operations (TODO)\n- **support** - Support ticket management (TODO)\n- **usage** - Usage analytics (TODO)\n- **utils** - Utility functions (TODO)\n- **addon** - Add-on management (TODO)\n- **plan** - Plan management (TODO)\n- **product** - Product management (TODO)\n- **config** - Configuration management (TODO)\n\n## Examples\n\nSee the `examples/` directory for more detailed usage examples:\n\n- `basic_usage.py` - Basic SDK operations\n- `advanced_usage.py` - Advanced features and error handling\n\n## Development\n\n### Setup Development Environment\n\n```bash\n# Clone the repository\ngit clone <repository-url>\ncd botlit-sdk-python\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate # On Windows: venv\\\\Scripts\\\\activate\n\n# Install development dependencies\npip install -e \".[dev]\"\n\n# Install pre-commit hooks\npre-commit install\n```\n\n### Code Quality\n\nThe project uses several tools for code quality:\n\n```bash\n# Format code\nblack src/ tests/ examples/\nisort src/ tests/ examples/\n\n# Lint code\nflake8 src/ tests/ examples/\nmypy src/\n\n# Run tests\npytest\n\n# Run tests with coverage\npytest --cov=botlit_sdk --cov-report=html\n```\n\n### Testing\n\n```bash\n# Run all tests\npytest\n\n# Run specific test file\npytest tests/test_auth.py\n\n# Run with coverage\npytest --cov=botlit_sdk\n\n# Run only unit tests\npytest -m unit\n\n# Run only integration tests\npytest -m integration\n```\n\n## Project Structure\n\n```\nbotlit-sdk-python/\n\u251c\u2500\u2500 src/\n\u2502 \u2514\u2500\u2500 botlit_sdk/\n\u2502 \u251c\u2500\u2500 __init__.py # Main SDK class\n\u2502 \u251c\u2500\u2500 client/ # HTTP/GraphQL client\n\u2502 \u251c\u2500\u2500 auth/ # Authentication module\n\u2502 \u251c\u2500\u2500 user/ # User management\n\u2502 \u251c\u2500\u2500 workspace/ # Workspace operations\n\u2502 \u251c\u2500\u2500 types/ # Type definitions\n\u2502 \u2514\u2500\u2500 ... # Other modules\n\u251c\u2500\u2500 tests/ # Test files\n\u251c\u2500\u2500 examples/ # Usage examples\n\u251c\u2500\u2500 docs/ # Documentation\n\u251c\u2500\u2500 pyproject.toml # Package configuration\n\u251c\u2500\u2500 requirements.txt # Production dependencies\n\u2514\u2500\u2500 requirements-dev.txt # Development dependencies\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature-name`\n3. Make your changes and add tests\n4. Run the test suite: `pytest`\n5. Commit your changes: `git commit -am 'Add feature'`\n6. Push to the branch: `git push origin feature-name`\n7. Create a Pull Request\n\n## Type Hints\n\nThis SDK is fully typed and supports mypy type checking:\n\n```bash\nmypy src/botlit_sdk\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for version history and changes.\n\n## Support\n\n- \ud83d\udcd6 **Documentation**: [docs.algoshred.com/sdk/python](https://docs.algoshred.com/sdk/python)\n- \ud83d\udc1b **Issues**: [GitHub Issues](https://github.com/algoshred/botlit-sdk-python/issues)\n- \ud83d\udcac **Discussions**: [GitHub Discussions](https://github.com/algoshred/botlit-sdk-python/discussions)\n\n## Related Projects\n\n- [Workspaces SDK Node.js](../workspaces-sdk-node) - The Node.js version this SDK is based on\n- [Boiler Frontend](../botlit-frontend) - Frontend botlit\n- [Boiler Backend](../botlit-python-be-graphql) - Python GraphQL backend botlit",
"bugtrack_url": null,
"license": "Copyright (c) 2025 Burdenoff Consultancy Services Private Limited, Algoshred Technologies Private Limited and all sister companies.\n \n All rights reserved.\n \n This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without the express written permission of the copyright holders.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n \n For licensing inquiries, please contact: legal@algoshred.com",
"summary": "Python SDK for Boiler API - A GraphQL-based SDK for quick API integrations",
"version": "0.1.0a20251022192117",
"project_urls": {
"Changelog": "https://github.com/algoshred/botlit-sdk-python/blob/main/CHANGELOG.md",
"Documentation": "https://docs.algoshred.com/sdk/python",
"Homepage": "https://github.com/algoshred/botlit-sdk-python",
"Issues": "https://github.com/algoshred/botlit-sdk-python/issues",
"Repository": "https://github.com/algoshred/botlit-sdk-python"
},
"split_keywords": [
"algoshred",
" api-client",
" botlit",
" graphql",
" python",
" sdk"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "835715a9cd5b9435042cad3e833d2c5212033712e121c217cad0fab09c1449c5",
"md5": "c663a2f1cc65eeff404380d52183465b",
"sha256": "5b77b98b92615e92a5ea6cc5e5fb9b9d5eb503f6c087c6aff8d56692b5eb36ac"
},
"downloads": -1,
"filename": "botlit_sdk-0.1.0a20251022192117-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c663a2f1cc65eeff404380d52183465b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 21900,
"upload_time": "2025-10-22T19:21:29",
"upload_time_iso_8601": "2025-10-22T19:21:29.934401Z",
"url": "https://files.pythonhosted.org/packages/83/57/15a9cd5b9435042cad3e833d2c5212033712e121c217cad0fab09c1449c5/botlit_sdk-0.1.0a20251022192117-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "21f4209299e487c63da09c2b57b2a883028fe582adf6249c1477ec1554641511",
"md5": "c5e76e70f3aaaaa38033f926a6adcb5f",
"sha256": "9bf2a6457385148de611a6c07f60e9a56b62aa39545330643a12a35c3a07d5db"
},
"downloads": -1,
"filename": "botlit_sdk-0.1.0a20251022192117.tar.gz",
"has_sig": false,
"md5_digest": "c5e76e70f3aaaaa38033f926a6adcb5f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 18377,
"upload_time": "2025-10-22T19:21:31",
"upload_time_iso_8601": "2025-10-22T19:21:31.109275Z",
"url": "https://files.pythonhosted.org/packages/21/f4/209299e487c63da09c2b57b2a883028fe582adf6249c1477ec1554641511/botlit_sdk-0.1.0a20251022192117.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-22 19:21:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "algoshred",
"github_project": "botlit-sdk-python",
"github_not_found": true,
"lcname": "botlit-sdk"
}