Skip to main content

A Python SDK for the Nexus Question Generation API

Project description

Example usage in README.md:

"""

Error Handling

The Nexus SDK uses a comprehensive error handling system. Here are the different types of exceptions:

  1. NexusError: Base exception class for all Nexus SDK errors
  2. NexusAPIError: Raised for errors returned by the Nexus API
  3. NexusFileError: Raised for file-related errors
  4. NexusValidationError: Raised for validation-related errors
  5. NexusConfigError: Raised for configuration errors

Example of handling different types of errors:

from nexus import NexusSDK
from nexus.exceptions import NexusAPIError, NexusFileError, NexusValidationError

sdk = NexusSDK(api_key="your-api-key")

try:
    response = sdk.generate_questions(
        files=["document.pdf"],
        num_questions=5,
        difficulty="medium"
    )
except NexusFileError as e:
    print(f"File error: {e}")
except NexusValidationError as e:
    print(f"Validation error: {e}")
except NexusAPIError as e:
    print(f"API error (status {e.status_code}): {e}")
except NexusError as e:
    print(f"Other Nexus error: {e}")

This allows for fine-grained error handling in your applications. """

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

nexusquestion-2.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexusQuestion-2.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file nexusquestion-2.1.0.tar.gz.

File metadata

  • Download URL: nexusquestion-2.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for nexusquestion-2.1.0.tar.gz
Algorithm Hash digest
SHA256 64d330d8e5a58e23ff0d0ab4b7d8eb739e9588d9c5f9fe39004a0c40c63493bd
MD5 6e00e63516e142ef988987da538f0397
BLAKE2b-256 d43b7f1a362b3ae3a6a8ea6a4396f5858157ea33da811900c803fc20625e9580

See more details on using hashes here.

File details

Details for the file nexusQuestion-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: nexusQuestion-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for nexusQuestion-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 296a12768aba774b1dcff6705164952c3c7a68106f9e596d95785037eff1f305
MD5 28b2a87c810f87e421afb57923299913
BLAKE2b-256 316db6f4f5ab92b7374c23054c9f20928e9c935960535be46188379622bb8d73

See more details on using hashes here.

Supported by

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