Skip to main content

pro-sejongpeia (Python)

세종대 로그인 API (Python) · Sejong University login API

한국어 | English

학번과 포털 비밀번호로 세종대 재학생 여부를 확인하고 학과, 학년, 고전독서 인증, 연락처를 가져옵니다. 표준 라이브러리 외 의존성이 없습니다.

▶ 브라우저에서 바로 체험하기 · 호출 한 번에 포털 로그인 한 번 (약 0.8초) · Java·Node 패키지와 같은 결과 · 비밀번호가 틀리면 바로 멈춤 · 매일 실제 포털로 점검

pip install pro-sejongpeia
from sejongpeia import authenticate, SejongAuthError, ErrorCode

try:
    result = authenticate("21011234", "비밀번호")
    print(result.name, result.major, result.grade)
except SejongAuthError as error:
    if error.code == ErrorCode.AUTHENTICATION_FAILED:
        print("학번 또는 비밀번호가 틀렸습니다")
    elif error.code == ErrorCode.ACCOUNT_LOCKED:
        print("포털 계정이 잠겼습니다. 포털에서 비밀번호를 재설정하세요")
함수 반환
authenticate(id, pw) 학생 정보 + 고전독서 + 연락처 (연락처 조회가 실패하면 연락처만 None)
authenticate_dhc(id, pw, include_raw=False) 학생 정보 + 고전독서
authenticate_sis(id, pw, include_raw=False) 학생 정보 + 이메일, 전화번호, 영문 이름

대신 해결해 주는 것

직접 구현하려면 모두 풀어야 하는 부분입니다.

  • 최신 환경의 기본 설정이 막는, 포털이 유일하게 허용하는 암호(TLS_RSA_WITH_AES_256_CBC_SHA)를 Python ssl 설정으로 자동 허용
  • 방화벽이 막는 기본 User-Agent 대신 식별 가능한 User-Agent 전송
  • 여러 세종대 도메인에 걸친 SSO 쿠키와 리다이렉트 처리
  • 200 응답 안의 판정으로 비밀번호 오류, 계정 잠금, 이용 불가를 즉시 구분 (틀린 비밀번호는 재시도하지 않음)
  • DHC의 HTML 표와 SIS의 JSON을 타입이 있는 결과로 변환

설정: SejongAuthClient(timeout_seconds=10, max_retry=3, ssl_verification=True).

에러 코드(error.code): AUTHENTICATION_FAILED, ACCOUNT_LOCKED, ACCOUNT_UNAVAILABLE, INVALID_INPUT, CONNECTION_FAILED, CONNECTION_TIMEOUT, SESSION_ERROR, DATA_FETCH_FAILED, PARSE_ERROR, SSL_CONFIGURATION_ERROR. 메시지가 아니라 코드로 분기하세요.

계정 잠금. 세종대 포털은 비밀번호를 여러 번 틀리면(약 5회) 계정을 잠급니다. https://portal.sejong.ac.kr/jsp/inquiry/pwinquiry.jsp 에서 비밀번호를 재설정해야 풀립니다. 라이브러리는 거부된 로그인을 재시도하지 않습니다. 누구나 학번을 입력할 수 있는 서비스라면 학번별 실패 횟수를 제한하세요.

Python 3.9 이상. 세종대학교 공식 제품이 아닙니다.

문서, 라이브 데모, Java·Node 버전: https://cassiiopeia.github.io/pro-sejongpeia/

English

Verify a Sejong University student with a student ID and portal password, and get their major, year, classic-reading certification and contact info. The API above is the same in English; error messages are in English. Full English docs: README.en.md.

Metadata

Release files for pro-sejongpeia 1.2.30

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

Source distribution (sdist)

Source distribution for pro-sejongpeia 1.2.30
File Size Uploaded Provenance Actions
pro_sejongpeia-1.2.30.tar.gz 29.5 kB With provenance Details for pro_sejongpeia-1.2.30.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pro-sejongpeia 1.2.30
File Interpreter ABI Platform Actions
pro_sejongpeia-1.2.30-py3-none-any.whl Python 3 none any Details for pro_sejongpeia-1.2.30-py3-none-any.whl

Total release size: 55.0 kB

Release files / pro_sejongpeia-1.2.30.tar.gz

Download URL pro_sejongpeia-1.2.30.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fcb9ad257ce35b5bdda45379d17df11564523e92b087c2a5010272c11f7f0823
BLAKE2b-256 checksum
How to use checksums
8502868991e3701df614ee378dbea119158b278c18dac88e071b55b348463a89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Release files / pro_sejongpeia-1.2.30-py3-none-any.whl

Download URL pro_sejongpeia-1.2.30-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ac7625a015c4cd573865f3e54d5729cb09ce52ddba7059b9909a4d7d81a68ab
BLAKE2b-256 checksum
How to use checksums
dc95d8b2f320bd295d8eeaa525bbbac924b2262e8d5a98af65a310ffdeaeb481
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Security for pro-sejongpeia 1.2.30

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 pro_sejongpeia-1.2.30.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 Oct 29, 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