Python SDK for Henotace AI educational API
Project description
Henotace AI SDK for Python
A Python SDK for integrating with Henotace AI's educational API. This SDK provides easy access to AI tutoring, assessment grading, content generation, and educational games.
Features
- 🤖 AI Tutoring: Create and manage AI tutoring sessions
- 📝 Assessment Grading: Grade assessments using AI
- 📚 Content Generation: Generate educational content
- 🎮 Educational Games: Access educational games and questions
- 🔐 Secure Authentication: API key-based authentication
- 📊 Usage Tracking: Built-in usage tracking and rate limiting
Installation
pip install henotace-ai-sdk
Quick Start
from henotace_sdk import HenotaceSDK
# Initialize the SDK
sdk = HenotaceSDK(
api_key="your-api-key-here",
base_url="https://api.djtconcept.ng/api/external" # Production URL
)
# Create a tutoring session
session = sdk.create_tutoring_session(
subject="Mathematics",
grade_level="Grade 10",
student_id="student123"
)
# Send a message to the AI tutor
response = sdk.send_chat_message(
session_id=session["session_id"],
message="Can you help me solve this quadratic equation: x² + 5x + 6 = 0?"
)
print(response["response"])
API Reference
Initialization
sdk = HenotaceSDK(api_key, base_url)
Parameters:
api_key(str): Your API key from Henotace AIbase_url(str): Base URL for the API (default: localhost for development)
Tutoring Sessions
Create Tutoring Session
session = sdk.create_tutoring_session(subject, grade_level, student_id)
Send Chat Message
response = sdk.send_chat_message(session_id, message)
End Tutoring Session
result = sdk.end_tutoring_session(session_id)
Assessment Grading
grade = sdk.grade_assessment(
question="What is the capital of France?",
student_answer="Paris",
correct_answer="Paris"
)
Content Generation
content = sdk.generate_content(
content_type="lesson_plan",
subject="Science",
grade_level="Grade 8",
topic="Photosynthesis"
)
Educational Games
Get Game Questions
questions = sdk.get_game_questions(game_id=1)
Submit Game Answers
result = sdk.submit_game_answers(
game_id=1,
answers=[
{"question_id": 1, "answer": "A"},
{"question_id": 2, "answer": "B"}
]
)
Error Handling
The SDK raises HenotaceAPIError for API-related errors:
from henotace_sdk import HenotaceAPIError
try:
response = sdk.send_chat_message(session_id, message)
except HenotaceAPIError as e:
print(f"API Error: {e.message}")
print(f"Status Code: {e.status_code}")
Development
Setup Development Environment
git clone https://github.com/henotace/henotace-ai-sdk-python.git
cd henotace-ai-sdk-python
pip install -e ".[dev]"
Running Tests
pytest
Code Formatting
black henotace_sdk.py
flake8 henotace_sdk.py
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- 📧 Email: support@henotace.ai
- 📖 Documentation: https://docs.henotace.ai
- 🐛 Issues: https://github.com/henotace/henotace-ai-sdk-python/issues
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Changelog
1.0.0
- Initial release
- AI tutoring sessions
- Assessment grading
- Content generation
- Educational games support
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
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 henotace_ai_sdk-1.0.0.tar.gz.
File metadata
- Download URL: henotace_ai_sdk-1.0.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
668ea36505aeb3911b6209838609b29b7522bc0d5510704989c7c9b53799f2a2
|
|
| MD5 |
e343b8d02fde660cca7175ee5c1b614a
|
|
| BLAKE2b-256 |
70fed5974df86e3ea2df505ec01d6a25312330d0846da69baee3e269aa9aeb39
|
File details
Details for the file henotace_ai_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: henotace_ai_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d8c52626ad3bfdc5e78fb07d90b9bd82a904f28b734c871aa32266b60bec62f
|
|
| MD5 |
8da42ab9ca3cedf9ce170a2b7eb36608
|
|
| BLAKE2b-256 |
14574ace8617e2d39c8db126b7c941a0c0593cd7365981b6b39396711218ce5a
|