{"id":49181000,"url":"https://github.com/statpan/pyjwt-rs","last_synced_at":"2026-04-27T05:00:49.360Z","repository":{"id":352785182,"uuid":"1216117418","full_name":"StatPan/pyjwt-rs","owner":"StatPan","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-22T05:54:21.000Z","size":237,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-23T01:30:38.136Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StatPan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-20T15:28:55.000Z","updated_at":"2026-04-22T05:54:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/StatPan/pyjwt-rs","commit_stats":null,"previous_names":["statpan/pyjwt-rs"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/StatPan/pyjwt-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatPan%2Fpyjwt-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatPan%2Fpyjwt-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatPan%2Fpyjwt-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatPan%2Fpyjwt-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StatPan","download_url":"https://codeload.github.com/StatPan/pyjwt-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StatPan%2Fpyjwt-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32205942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T01:12:49.758Z","status":"online","status_checked_at":"2026-04-24T02:00:07.115Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-23T01:04:48.216Z","updated_at":"2026-04-24T02:00:59.149Z","avatar_url":"https://github.com/StatPan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyjwt-rs\n\n`jwt_rs`는 `PyJWT` 호환을 목표로 하는 Rust 기반 Python 확장 모듈입니다.\n\n핵심 목표는 두 가지입니다.\n\n- 같은 코드에 `import jwt_rs as jwt`만 바꿔서 동작할 것\n- Rust 코어로 주요 공개키 JWT workload에서 `PyJWT`보다 더 빠를 것\n\n## Current Status\n\n현재 공개 표면은 `PyJWT` 스타일을 유지합니다.\n\n- `encode(payload, key, algorithm=\"HS256\", headers=None)`\n- `decode(token, key, algorithms=None, options=None, audience=None, issuer=None, leeway=0)`\n- `decode_complete(...)`\n- `get_unverified_header(token)`\n- `PyJWS`, `PyJWK`, algorithm registry\n\n현재 지원 알고리즘:\n\n- HMAC: `HS256`, `HS384`, `HS512`\n- RSA: `RS256`, `RS384`, `RS512`, `PS256`, `PS384`, `PS512`\n- EC: `ES256`, `ES384`, `ES512`, `ES256K`\n- `EdDSA`\n\n테스트 상태:\n\n- `324 passed`\n\n품질 정책:\n\n- 테스트는 hidden warning 없이 통과해야 합니다. CI는 `-W error` 기반 게이트를 사용합니다.\n- 의도된 skip은 `.quality/pytest-allowlist.json`에 명시되어야 합니다.\n- 릴리스/호환성 작업은 공개 GitHub issue와 milestone으로 추적합니다.\n- 자세한 운영 정책은 [CONTRIBUTING.md](/home/statpan/workspace/pypi_lib/pyjwt-rs/CONTRIBUTING.md:1), 호환성 갭은 [COMPATIBILITY_CHECKLIST.md](/home/statpan/workspace/pypi_lib/pyjwt-rs/COMPATIBILITY_CHECKLIST.md:1) 에서 관리합니다.\n\n## Usage\n\n```python\nimport jwt_rs as jwt\n\ntoken = jwt.encode({\"sub\": \"alice\"}, \"secret\", algorithm=\"HS256\")\nclaims = jwt.decode(token, \"secret\", algorithms=[\"HS256\"])\nheader = jwt.get_unverified_header(token)\n```\n\n## Performance\n\n성능 목표는 `모든 경로 일괄 2배`가 아니라, 먼저 `실사용 공개키 경로`에서 `PyJWT`를 확실히 추월하는 것입니다.\n\n아래 블록은 benchmark 스크립트로 자동 생성됩니다. 수동으로 적지 않습니다.\n\n\u003c!-- BENCHMARK:START --\u003e\n_Auto-generated from `scripts/benchmark_same_api.py` on `2026-04-21T07:14:04+00:00` using `--iterations 150 --warmup 20`._\n\n현재 same-API benchmark 기준:\n\n| Case | encode | decode | decode_complete |\n| --- | ---: | ---: | ---: |\n| `hs256` | `1.43x` | `2.10x` | `2.04x` |\n| `rs256` | `59.10x` | `2.15x` | `2.13x` |\n| `es256` | `3.12x` | `1.76x` | `1.81x` |\n| `eddsa` | `1.59x` | `1.06x` | `1.06x` |\n\n좋은 구간:\n- `rs256.encode`: `jwt_rs`가 `PyJWT` 대비 `59.10x`\n- `es256.encode`: `jwt_rs`가 `PyJWT` 대비 `3.12x`\n- `es256.decode`: `jwt_rs`가 `PyJWT` 대비 `1.76x`\n- `eddsa.encode`: `jwt_rs`가 `PyJWT` 대비 `1.59x`\n\n아직 미달인 구간:\n- 현재 주요 추적 경로는 모두 `PyJWT` 이상입니다.\n\n해석:\n- `1.00x` 초과면 `jwt_rs`가 빠릅니다.\n- `2.00x` 이상이면 README 목표인 `PyJWT 대비 2배`를 넘긴 것입니다.\n- 현재 목표는 특히 공개키 경로에서 이 값을 끌어올리는 것입니다.\n\u003c!-- BENCHMARK:END --\u003e\n\n벤치 재현 명령:\n\n```bash\nuv run --with pyjwt python scripts/benchmark_same_api.py --iterations 150 --warmup 20\n```\n\nREADME 자동 갱신 명령:\n\n```bash\nuv run python scripts/update_readme_bench.py\n```\n\n## Development\n\n```bash\nsource \"$HOME/.cargo/env\"\ncd pyjwt-rs\nuv venv\nsource .venv/bin/activate\nuv pip install -e \".[dev]\"\nuv run --with maturin maturin develop\nuv run pytest -q\n```\n\n## Notes\n\n- Python은 호환 인터페이스를 담당하고, 코어 sign/verify hot path는 Rust가 담당합니다.\n- 현재 공개키 알고리즘 경로는 Rust 내부 OpenSSL backend를 사용합니다.\n- `options={\"verify_signature\": False}` 경로는 별도 insecure decode 흐름을 사용합니다.\n- 완전한 `PyJWT` parity를 목표로 하지만, 성능 최적화를 위해 내부 구현은 `PyJWT`와 다릅니다.\n- 배포 버전과 `PyJWT` 호환 버전 구분은 [VERSIONING.md](/home/statpan/workspace/pypi_lib/pyjwt-rs/VERSIONING.md:1) 에 정리했습니다.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatpan%2Fpyjwt-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatpan%2Fpyjwt-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatpan%2Fpyjwt-rs/lists"}