Skip to main content

An API wrapper for the Julius Tools API

Project description

Julius Tools API Wrapper

License: 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:

pip install juliustools

Quick Start

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

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.

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:

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 file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

juliustools-0.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

juliustools-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file juliustools-0.1.1.tar.gz.

File metadata

  • Download URL: juliustools-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for juliustools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fc7a258ad2ee1a272f42cc981e51b4bf3f0094676d8f6a88ce8fa113a75f22e5
MD5 134a7e9e68072c328b659fece0f5d792
BLAKE2b-256 bb04dda638180a2f159c6bcdb171366224ff33b84708c61171e770c262562afe

See more details on using hashes here.

File details

Details for the file juliustools-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: juliustools-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for juliustools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 af1295499258a9a350c8c722cdbd7d68ff18dfc12436d9aabacbf535387ed706
MD5 d4258c277e6e070df1bc3d56c4606ae7
BLAKE2b-256 9fea7780a974b43f4e5ceda197cf1fa2f2ba63af65bec0c08de4cc028d6bedea

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page