Skip to main content

CIST NURE API implementation

Project description

python-cist

GitHub-issues

Python client for CIST API (https://cist.nure.ua)

Installation

pip install cist

Usage

For group (Couples schedule is for group only. More see Couples for details)

  1. Get your group id:
  import cist

  groups = cist.get_groups()
  print(groups)
  1. Use that group_id to initialize client:
  import cist
  group_id = 'xxxxxxxx'

  group = cist.Group(group_id)
  group_schedule = group.get_schedule()
  print(group_schedule)

For teachers (Couples schedule is for teacher only. More see Couples for details)

  1. Get your teachers id:
  import cist

  struct = cist.get_struct()
  print(struct)
  1. Use that teacher_id to initialize client:
  import cist
  teacher_id = 'xxxxxxxx'

  teacher = cist.Teacher(teacher_id)
  teacher_schedule = teacher.get_schedule()
  print(teacher_schedule)

For audience (Couples schedule is for audience only. More see Couples for details)

  1. Get audience id:
  import cist

  audiences = cist.get_audiences()
  print(audiences)
  1. Use that audience_id to initialize client:
  import cist
  audience_id = 'xxxxxxxx'

  audience = cist.Auditory(group_id)
  audience_schedule = grouaudiencep.get_schedule()
  print(audience_schedule)

Couples

Schedule of events (couples), for the teacher, groups or audiences. A couple is a fact of meeting in time and space/audience of interested individuals/groups/teachers with a certain purpose/subject. On one couple, an academic group can be several disciplines at the same time (overlays), this is acceptable for alternative disciplines. Unique is the combination “couple time + discipline".

  • timetable_id – group or teacher id
  • type_id: 1 – group (default), 2 – teacher, 3 – audience
  • time_from – start date of sampling from schedule (default – start current semester)
  • time_to – end date of sampling from schedule (default – end current semester).
  import cist
  timetable_id = 'xxxxxxxx'
  type_id = 2
  time_from = date(2023,11,17)
  time_to = date(2023,11,18)

  timetable = cist.Couple(timetable_id, type_id)
  event_schedule = timetable.get_schedule(time_from, time_to)
  print(event_schedule)

Information about a specific object

Groups of the same direction (optional within the faculty)

  id_direction = 'xxxxxxxx'
  id_faculty = 'xxxxxxxx'	#not necessary

  object = cist.Object(id_direction, id_faculty)

  grp_of_directions = object.get_grp_of_directions()
  print(grp_of_directions)

Specialty groups (optional within the faculty department)

  id_speciality = 'xxxxxxxx'
  id_faculty = 'xxxxxxxx' 	#not necessary

  object = cist.Object(id_speciality, id_faculty)

  grp_of_specialities = object.get_grp_of_specialities()
  print(grp_of_specialities)

All specialties of a specific direction related to a specific faculty (relevant for specialists and masters)

  id_direction = 'xxxxxxxx'
  id_faculty = 'xxxxxxxx' 

  object = cist.Object(id_direction, id_faculty)

  specialities = object.get_specialities()
  print(specialities)

All areas of the faculty

  id_faculty = 'xxxxxxxx' 

  object = cist.Object(id_faculty)

  directions = object.get_directions()
  print(directions)

All teachers of the department

  id_department = 'xxxxxxxx' 

  object = cist.Object(id_department)

  teachers = object.get_teachers()
  print(teachers)

All departments of the faculty

  id_faculty = 'xxxxxxxx' 

  object = cist.Object(id_faculty)

  departments = object.get_departments()
  print(departments)

Methods

Get the entire structure of the university with faculties, directions, specialties and groups students. Destinations include only groups of bachelors. For groups of specialists and Master's degrees are related to specialties that are included in the directions

>>> cist.get_groups()

Get the entire structure of the university with faculties, departments, teachers.

>>> cist.get_struct()

Get the entire structure of the university with buildings, audiences and types of audiences. Audiences located in buildings. Every audience may refer to zero, one or several types.

>>> cist.get_audiences()

Get all university faculties

>>> cist.get_faculties()

Get all types of university classrooms

>>> cist.get_audiences_types()

Get help

>>> cist.help()

You can as well pass datetime objects get_schedule(time_from, time_to)

>>> group.get_schedule(date(2023,11,17), date(2023,11,17))

You can use ratelimiter library (like https://pypi.org/project/ratelimiter/ )

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

cist-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

cist-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cist-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.8 Windows/10

File hashes

Hashes for cist-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55baeafd0278164ebaea654544d0b4e20761a7af3b3932872ba4527189265229
MD5 64f5d211d196b8c2eff3008ded46a190
BLAKE2b-256 74b16251da92a2fc3a89ad8ccbc25436550d14a89218907b1a876f62d353a3ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cist-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.8 Windows/10

File hashes

Hashes for cist-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65ffe4fd9f016c7daec6eb263280da0c5de7981d561684accb6eb88359584f8e
MD5 70f370c9122a3adb27ecd5fac26a4ab7
BLAKE2b-256 8f6328ddcb2c77e8a2501f5034fcd2bd7f192056410faceabeefd62b12b2b21d

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