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:
NexusError: Base exception class for all Nexus SDK errorsNexusAPIError: Raised for errors returned by the Nexus APINexusFileError: Raised for file-related errorsNexusValidationError: Raised for validation-related errorsNexusConfigError: 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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64d330d8e5a58e23ff0d0ab4b7d8eb739e9588d9c5f9fe39004a0c40c63493bd
|
|
| MD5 |
6e00e63516e142ef988987da538f0397
|
|
| BLAKE2b-256 |
d43b7f1a362b3ae3a6a8ea6a4396f5858157ea33da811900c803fc20625e9580
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
296a12768aba774b1dcff6705164952c3c7a68106f9e596d95785037eff1f305
|
|
| MD5 |
28b2a87c810f87e421afb57923299913
|
|
| BLAKE2b-256 |
316db6f4f5ab92b7374c23054c9f20928e9c935960535be46188379622bb8d73
|