juliustools


Namejuliustools JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryAn API wrapper for the Julius Tools API
upload_time2024-10-05 15:25:24
maintainerNone
docs_urlNone
authorjulianwe17
requires_python>=3.9
licenseMIT
keywords julius tools api wrapper
VCS
bugtrack_url
requirements requests aiohttp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Julius Tools API Wrapper

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

This Python API Wrapper provides a simple and intuitive interface for interacting with the Julius Tools API. It offers easy access to various endpoints, allowing you to leverage the power of Julius Tools in your Python projects.

## Features

- Simple and intuitive API
- Supports core Julius Tools API endpoints
- Automatic handling of authentication
- Enhanced error handling with detailed error information
- Comprehensive documentation (Soon)

## Installation

Install the Julius Tools API Client using pip:

```bash
pip install juliustools
```

## Quick Start

Here's a quick example to get you started with the Julius Tools API Wrapper:

```python
from juliustools import JuliusToolsAPI

# Initialize the client with your API key
api = JuliusToolsAPI(api_key="your_api_key_here")

# Get API status
status = api.get_status()
print(f"API Status: {status}")

# Perform a crypto operation
result = api.crypto_operation(text="Hello, World!", operation="encrypt")
print(f"Encrypted text: {result['result']}")
print(f"Encryption key: {result['key']}")

# Get a random quote
quote = api.get_random_quote()
print(f"Random quote: {quote['quote']}")

# Get a random joke
joke = api.get_random_joke()
print(f"Random joke: {joke['joke']}")
```

## Documentation

For detailed documentation on all available methods and their usage, please refer to our [official documentation](https://docs.tools.juliusbot.eu/).

## Available Methods

- `get_status()`: Get the API status
- `crypto_operation(text, operation, key=None)`: Perform encryption or decryption
- `get_random_quote()`: Get a random quote
- `get_random_joke()`: Get a random joke
- `add_content(content, content_type)`: Submit new content for approval

## Error Handling

The client provides informative error messages through a custom `APIError` exception. Here's an example of how to handle errors:

```python
from juliustools import JuliusToolsAPI, APIError

try:
    api = JuliusToolsAPI(api_key="invalid_key")
    api.get_status()
except APIError as e:
    print(f"An error occurred: {e}")
    if e.status_code:
        print(f"Status code: {e.status_code}")
    if e.response:
        print(f"Response content: {e.response.content}")
```

The `APIError` exception includes the following attributes:
- `message`: A descriptive error message
- `status_code`: The HTTP status code (if applicable)
- `response`: The full response object (if available)

This allows you to handle different types of errors (e.g., network errors, API errors, invalid API key) in a unified way while still having access to detailed error information when needed.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "juliustools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "julius, tools, api, wrapper",
    "author": "julianwe17",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/bb/04/dda638180a2f159c6bcdb171366224ff33b84708c61171e770c262562afe/juliustools-0.1.1.tar.gz",
    "platform": null,
    "description": "# Julius Tools API Wrapper\r\n\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\nThis Python API Wrapper provides a simple and intuitive interface for interacting with the Julius Tools API. It offers easy access to various endpoints, allowing you to leverage the power of Julius Tools in your Python projects.\r\n\r\n## Features\r\n\r\n- Simple and intuitive API\r\n- Supports core Julius Tools API endpoints\r\n- Automatic handling of authentication\r\n- Enhanced error handling with detailed error information\r\n- Comprehensive documentation (Soon)\r\n\r\n## Installation\r\n\r\nInstall the Julius Tools API Client using pip:\r\n\r\n```bash\r\npip install juliustools\r\n```\r\n\r\n## Quick Start\r\n\r\nHere's a quick example to get you started with the Julius Tools API Wrapper:\r\n\r\n```python\r\nfrom juliustools import JuliusToolsAPI\r\n\r\n# Initialize the client with your API key\r\napi = JuliusToolsAPI(api_key=\"your_api_key_here\")\r\n\r\n# Get API status\r\nstatus = api.get_status()\r\nprint(f\"API Status: {status}\")\r\n\r\n# Perform a crypto operation\r\nresult = api.crypto_operation(text=\"Hello, World!\", operation=\"encrypt\")\r\nprint(f\"Encrypted text: {result['result']}\")\r\nprint(f\"Encryption key: {result['key']}\")\r\n\r\n# Get a random quote\r\nquote = api.get_random_quote()\r\nprint(f\"Random quote: {quote['quote']}\")\r\n\r\n# Get a random joke\r\njoke = api.get_random_joke()\r\nprint(f\"Random joke: {joke['joke']}\")\r\n```\r\n\r\n## Documentation\r\n\r\nFor detailed documentation on all available methods and their usage, please refer to our [official documentation](https://docs.tools.juliusbot.eu/).\r\n\r\n## Available Methods\r\n\r\n- `get_status()`: Get the API status\r\n- `crypto_operation(text, operation, key=None)`: Perform encryption or decryption\r\n- `get_random_quote()`: Get a random quote\r\n- `get_random_joke()`: Get a random joke\r\n- `add_content(content, content_type)`: Submit new content for approval\r\n\r\n## Error Handling\r\n\r\nThe client provides informative error messages through a custom `APIError` exception. Here's an example of how to handle errors:\r\n\r\n```python\r\nfrom juliustools import JuliusToolsAPI, APIError\r\n\r\ntry:\r\n    api = JuliusToolsAPI(api_key=\"invalid_key\")\r\n    api.get_status()\r\nexcept APIError as e:\r\n    print(f\"An error occurred: {e}\")\r\n    if e.status_code:\r\n        print(f\"Status code: {e.status_code}\")\r\n    if e.response:\r\n        print(f\"Response content: {e.response.content}\")\r\n```\r\n\r\nThe `APIError` exception includes the following attributes:\r\n- `message`: A descriptive error message\r\n- `status_code`: The HTTP status code (if applicable)\r\n- `response`: The full response object (if available)\r\n\r\nThis allows you to handle different types of errors (e.g., network errors, API errors, invalid API key) in a unified way while still having access to detailed error information when needed.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An API wrapper for the Julius Tools API",
    "version": "0.1.1",
    "project_urls": {
        "GitHub": "https://github.com/Julianwe17/juliustools",
        "Julius": "https://juliusbot.eu/"
    },
    "split_keywords": [
        "julius",
        " tools",
        " api",
        " wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fea7780a974b43f4e5ceda197cf1fa2f2ba63af65bec0c08de4cc028d6bedea",
                "md5": "d4258c277e6e070df1bc3d56c4606ae7",
                "sha256": "af1295499258a9a350c8c722cdbd7d68ff18dfc12436d9aabacbf535387ed706"
            },
            "downloads": -1,
            "filename": "juliustools-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d4258c277e6e070df1bc3d56c4606ae7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 4535,
            "upload_time": "2024-10-05T15:25:23",
            "upload_time_iso_8601": "2024-10-05T15:25:23.679460Z",
            "url": "https://files.pythonhosted.org/packages/9f/ea/7780a974b43f4e5ceda197cf1fa2f2ba63af65bec0c08de4cc028d6bedea/juliustools-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb04dda638180a2f159c6bcdb171366224ff33b84708c61171e770c262562afe",
                "md5": "134a7e9e68072c328b659fece0f5d792",
                "sha256": "fc7a258ad2ee1a272f42cc981e51b4bf3f0094676d8f6a88ce8fa113a75f22e5"
            },
            "downloads": -1,
            "filename": "juliustools-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "134a7e9e68072c328b659fece0f5d792",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 4287,
            "upload_time": "2024-10-05T15:25:24",
            "upload_time_iso_8601": "2024-10-05T15:25:24.704258Z",
            "url": "https://files.pythonhosted.org/packages/bb/04/dda638180a2f159c6bcdb171366224ff33b84708c61171e770c262562afe/juliustools-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-05 15:25:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Julianwe17",
    "github_project": "juliustools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "aiohttp",
            "specs": []
        }
    ],
    "lcname": "juliustools"
}
        
Elapsed time: 0.34506s