Skip to main content

Unofficial Python client for OMU UBYS (University Information Management System)

Project description

📚 OMU-UBYS

Unofficial Python client for OMU UBYS (University Information Management System)

Python 3.9+ License: MIT PyPI version

TR | Türkçe Dokümantasyon


⚠️ DISCLAIMER: This is an UNOFFICIAL project and is NOT affiliated with Ondokuz Mayıs University. For EDUCATIONAL and TESTING purposes only.


🚀 Installation

pip install omu-ubys

📖 Quick Start

from omu_ubys import UBYSClient

with UBYSClient("student_number", "password") as client:
    profile = client.get_profile()
    print(f"Welcome {profile.name}! GPA: {profile.gano}")

📋 API Reference

Method Description Returns
get_profile() Student profile with cumulative GPA UserProfile
get_transcript() Academic transcript with semester GPA list[Semester]
get_grades() Course grades and exam details list[Semester]
get_class_details(class_id) Detailed class info and students ClassDetail
get_weekly_schedule() Weekly class schedule list[ScheduleItem]
get_advisor() Academic advisor info Advisor
get_cafeteria_menu() Today's menu (no auth required) CafeteriaMenu

🔍 Usage Examples

👤 Profile

profile = client.get_profile()
print(f"Name: {profile.name}")
print(f"GPA: {profile.gano}")
📦 UserProfile Structure
UserProfile(
    name="Ahmet Yılmaz",
    student_number="22000001",
    faculty="Faculty of Engineering",
    department="Computer Engineering",
    gano=2.61,           # Cumulative GPA
    year=2,
    sap_id="...",
    db_student_id="..."
)

📜 Transcript

transcript = client.get_transcript()
for sem in transcript:
    print(f"{sem.name}: GPA={sem.gpa}")
📦 Semester Structure
Semester(
    name="1 . Yarıyıl",
    gpa=2.93,            # Semester GPA
    courses=(
        Course(code="BİL101", name="Programming I", credit=4.0, letter_grade="CB"),
        Course(code="MAT101", name="Mathematics I", credit=4.0, letter_grade="BB"),
        ...
    )
)

📊 Grades

grades = client.get_grades()
for sem in grades:
    for course in sem.courses:
        print(f"{course.code}: {course.letter_grade}")

        # Use class_id for exam details
        if course.class_id:
            details = client.get_class_details(course.class_id)
📦 Course and Exam Structure
Course(
    code="BİL101",
    name="Programming I",
    credit=4.0,
    letter_grade="CB",
    status="Başarılı",
    class_id="12345",    # Use for exam details
    exams=(
        Exam(exam_type="Vize", name="Midterm 1", score=75.0, average=65.0),
        Exam(exam_type="Final", name="Final", score=80.0, average=70.0),
    )
)

📝 Class Details

# class_id is available in Course objects (course.class_id)
# You can get it from get_grades() result
details = client.get_class_details("12345")

print(f"Letter Grade: {details.letter_grade}")
print(f"Class Average: {details.class_average}")

if details.instructor:
    print(f"Instructor: {details.instructor.name}")

print(f"Student Count: {len(details.students)}")
📦 ClassDetail Structure
ClassDetail(
    letter_grade="AA",
    class_average="65.5",
    instructor=Instructor(name="Dr. ...", image_url="..."),
    exams=(
        Exam(exam_type="Vize", score=80.0, ranking="5/50", average=60.0),
        ...
    ),
    students=(
        Student(id="123", name="Ahmet", surname="Yılmaz", image_url="..."),
        ...
    )
)

🗓️ Weekly Schedule

schedule = client.get_weekly_schedule()
for item in schedule:
    print(f"{item.day} {item.start_time}: {item.course_name} @ {item.classroom}")
📦 ScheduleItem Structure
ScheduleItem(
    day="Pazartesi",
    start_time="09:00",
    end_time="09:50",
    course_name="Data Structures",
    course_code="BİL201",
    classroom="D-201",
    instructor="Prof. Dr. ..."
)

👨‍🏫 Advisor

advisor = client.get_advisor()
if advisor:
    print(f"{advisor.name} - {advisor.email}")

🍽️ Cafeteria Menu

Note: This method works without authentication!

menu = UBYSClient().get_cafeteria_menu()
if menu:
    for item in menu.items:
        print(f"• {item.name} ({item.calories} kcal)")

⚠️ Error Handling

from omu_ubys import UBYSClient, LoginError, NetworkError, SessionExpiredError

try:
    client.login("number", "password")
except LoginError:
    print("Invalid username or password")
except NetworkError:
    print("Connection error")
except SessionExpiredError:
    print("Session expired")

📝 License

MIT License - See LICENSE for details.


Made with ❤️ for OMU students

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

omu_ubys-1.0.5.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

omu_ubys-1.0.5-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file omu_ubys-1.0.5.tar.gz.

File metadata

  • Download URL: omu_ubys-1.0.5.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for omu_ubys-1.0.5.tar.gz
Algorithm Hash digest
SHA256 21809e2c13dfa46892a0f7a0ba4e1dbbf17f7677d828ca03715355bb05ab615e
MD5 353cb2ab8ed1a1d5db8edd3731883f46
BLAKE2b-256 640e36334419ea1c3e263baf2711774894ba8f055e780c4f8adf10f65503c984

See more details on using hashes here.

File details

Details for the file omu_ubys-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: omu_ubys-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for omu_ubys-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8fc86fd23d9384325ee8ed78038dfde8deaf33182bda4f96546863cf6fd86f7e
MD5 514c6f34381836c0364c564beb5a10dd
BLAKE2b-256 450dc0ff70a1ef103e2850abe206330b6c352258b8010db2ce2d8da0e3381576

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