Skip to main content

An API wrapper for the Julius Tools API

Project description

Julius Tools API Wrapper

License: MIT

This Python client 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.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: juliustools-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 db51d695ac42b24cfc7ac74384f13c8dad0ec7abe9e1e97b911e1eb040cd3ca3
MD5 373ed5bc544c796d2ce8aeb1b8b1367f
BLAKE2b-256 e951ffae96e6c31aed818c6839ee97aae87ac36762f6593f796ebeacfa60dd3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: juliustools-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88ba356472b40272b9292df4a9142f979eac12bae679e927dff4ab58ac7821c4
MD5 4f5fc325a7a65537fb3f577fe13c9db5
BLAKE2b-256 953c410054ede42fa23c4e5d5d354379c429baf3e60d5b32eba37cd56b3bd73d

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