Skip to main content

MyFAP API CLI

Giới thiệu

Đây là cli tương tác giống hoàn toàn với APP MYFAP trên điện thoại. Bạn có thể xem lịch học, lịch thi, điểm số (sự thất vọng của gia đình), thông tin cá nhân, v.v. 1 cách thuận tiện, không bị gò bó trong giao diện app.

  • Lưu ý: repo này được thực hiện cùng với sự hỗ trợ của AI.

Tính năng chính

  • Hỗ trợ đa nền tảng.
  • Login thông qua FEID hoặc Google OAuth.
  • Xem lịch học (từng tuần hoặc cả Kỳ).
  • Xem điểm (từng môn hoặc cả Kỳ).
  • Check điểm danh (từng môn hoặc cả Kỳ).
  • Check tình trạng đơn từ.
  • Xem thông báo của trường.
  • Check Info của sinh viên hoặc phòng dvsv.
  • Convert lịch học Kỳ sang ICS, dễ dàng import lịch học vào Google Calendar hoặc các dịch vụ tương tự.
  • Và nhiều hơn nữa ...

Cách sử dụng

Do dự án đang trong quá trình phát triển nên chưa thể đem lên pip. Bạn có thể tải sauce về và chạy:

  • Cài đặt ứng dụng.

    pip install myfap
    
  • Lấy danh sách cơ sở.

    myfap campuses
    
  • Login vào feid (chỉ cần làm 1 lần, mặc định chọn cơ sở Hola).

    myfap login
    

    Sau khi hoàn thành login, phiên đăng nhập sẽ dc lưu ở ~/.myfap-api-cli/session.json

  • Login cho cơ sở Xavalo.

    myfap login -c HCM
    
  • Lấy Lịch học (tự động lấy kỳ mới nhất).

    myfap schedule
    

Các Options

Option Chú thích
--help Hiển thị bảng Commands và Options
--config <đường dẫn> Đường dẫn tới file cấu hình session tùy chỉnh (mặc định: ~/.myfap-api-cli/session.json)
-c, --campus <cơ sở> Mã cơ sở (VD: APHL, HCM, DN) [default: APHL]
-s, --semester <kỳ học> Tên kỳ học (VD: Summer2026)
-cid, --courseid <mã môn> Chọn mã môn, chỉ có ở command marks. (VD: 82934, lấy từ bảng điểm của kỳ, ko phải mã môn như PRO192, SWE201c, ...)
-w, --week <số tuần> Chọn tuần, chỉ có ở command week-timetable
-y, --year <số năm> Chọn năm học, chỉ có ở command week-timetable
-d, --date <YYYY-MM-DD> Chỉ định ngày chính xác, chỉ có ở command week-timetable
-sc, --subjectcode <mã môn> Chọn môn học, chỉ có ở command attendance
-cn, --classname <mã lớp> Chọn lớp học, chỉ có ở command attendance
--ics Convert Sang ICS, dễ dàng import lịch học vào Google Calendar hoặc các dịch vụ tương tự, chỉ có ở command schedule)
-p, --pretty Format lại bảng điểm gốc của trường sang dạng json, chỉ có ở command marks)
--output, -o <thư mục> Thư mục xuất file thay vì thư mục hiện tại
--stdout In kết quả trực tiếp ra màn hình thay vì lưu file
-f, --force Buộc đăng nhập lại, bỏ qua file session.json, chỉ có ở command login

Các ví dụ sử dụng

  • Lưu ý:
    • Do hầu hết các command đểu trả về json, * đánh dấu những command trả output ra màn hình.
    • Nếu ko thêm flag thời gian hoặc kỳ, myfap sẽ tự động lấy thời gian mới nhất.
    • + nghĩa là bạn sẽ ko cần thêm flag --semester hoặc -s nếu gọi api vào đúng thời gian trong kỳ. Để xem thông tin của kỳ trước, bạn phải thêm flag này.
  • Xem tất cả command *
    myfap --help  
    Usage: myfap [OPTIONS] COMMAND [ARGS]...
    
      CLI Tool dựa trên MyFAP dành cho Sinh Viên FPTU
    
    Options:
      -c, --campus TEXT  Mã cơ sở (VD: APHL, HCM, DN)  [default: APHL]
      --config TEXT      Đường dẫn file session tùy chỉnh (thay vì mặc định
                        ~/.myfap-api-cli/session.json)
      --help             Show this message and exit.
    
    Commands:
      version         Hiển thị phiên bản MyFap API CLI
      login           Đăng nhập vào hệ thống FEID
      logout          Đăng xuất (Xóa session)
      refresh         Làm mới token (Refresh Token)
      campuses        Xem danh sách các cơ sở (Campus)
      semesters       Xem danh sách kỳ học
      schedule        Xem lịch học
      marks           Xem bảng điểm
      exams           Xem lịch thi
      week-timetable  Xem lịch học theo tuần
      attendance      Xem thông tin điểm danh
      applications    Xem danh sách đơn từ đã gửi cho trường
      news            Xem 10 thông báo gần nhất
      info            Xem thông tin chung (sinh viên, campus)
      other           Các chức năng phụ trợ khác (survey, feedback, fee...)
    
  • Xem danh sách kỳ *
    myfap semesters
    
  • Xem lịch học của Kỳ bất kỳ
    myfap schedule -s Summer2026
    
  • Convert lịch học sang ICS (import vào GG Calendar)
    myfap schedule -s Summer2026 --ics
    
  • Xem lịch thi của Kỳ bất kỳ
    myfap exams -s Summer2026
    
  • Xem lịch từng tuần được chỉ định +
    myfap week-timetable --week 22
    
  • Xem lịch từng tuần bằng thời gian ngày +
    myfap week-timetable --date 2026-6-7
    
  • Xem danh sách điểm danh của Kỳ bất kỳ
    myfap attendance -s Spring2026
    
  • Xem danh sách điểm danh của môn bất kỳ trong Kỳ +
    myfap attendance -sc CSD201 -cn SE2026 -s Spring2026
    
  • Xem sự thất vọng của gia đinh điểm số của Kỳ bất kỳ
    myfap marks -s Fall2025
    
  • Xem điểm của môn bất kỳ (ví dụ: môn MAD101, xem mã môn ở command trên)
    myfap marks -cid 95619
    
  • Xem điểm của môn bất kỳ (thêm -p hoặc --pretty cho đẹp)
    myfap marks -cid 95619 -p
    
  • Xem tình trạng gửi đơn của Fap Web
    myfap applications
    
  • Xem thông báo gửi toàn trường
    myfap news
    
  • Xem thông tin sinh viên
    myfap info student
    
  • Xem thông tin phòng dvsv
    myfap info campus
    
  • Xem thông tin thêm *
    myfap other --help
    Usage: myfap other [OPTIONS] COMMAND [ARGS]...
    
    Các chức năng phụ trợ khác (survey, feedback, fee...)
    
    Options:
      --help  Show this message and exit.
    
    Commands:
      survey        Kiểm tra các survey chưa thực hiện
      feedback      Kiểm tra Feedback
      profile       Kiểm tra Update Profile
      notification  Xem thông báo qua MSSV
      fee           Lấy danh sách học phí chưa thanh toán
    
  • Refresh thủ công authen_key trong trường hợp cli bị lỗi
    myfap refresh
    
  • Đăng nhập lại, bỏ qua file session.json
    myfap login -f
    
  • Trỏ vào file session.json vào vị trí tuỳ chỉnh
    myfap login --config "%appdata%\myfap-api-cli\session.json"
    

Metadata

Release files for myfap 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for myfap 0.1.6
File Size Uploaded Provenance Actions
myfap-0.1.6.tar.gz 18.2 kB With provenance Details for myfap-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for myfap 0.1.6
File Interpreter ABI Platform Actions
myfap-0.1.6-py3-none-any.whl Python 3 none any Details for myfap-0.1.6-py3-none-any.whl

Total release size: 36.4 kB

Release files / myfap-0.1.6.tar.gz

Download URL myfap-0.1.6.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
732a859aabc7fc24e235591073bb3c003c2c0a63f2cc110b3f56e26572b3a28c
BLAKE2b-256 checksum
How to use checksums
2afe908200936fc6943f42b10c1ee29d14c976a1c403433e1958e22c20979de8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / myfap-0.1.6-py3-none-any.whl

Download URL myfap-0.1.6-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b252232d893a6d4ad085ebe65a373459e6072a0ebaa7be418234dab987186a0
BLAKE2b-256 checksum
How to use checksums
9162cee3790d4c844d7d1befd1547405f9781999b16f75365627d11636061333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Security for myfap 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for myfap-0.1.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page