Skip to main content

BPJS Python Client

Unofficial Python client untuk integrasi API BPJS Kesehatan.

Library ini menyediakan interface sederhana untuk melakukan request ke beberapa layanan BPJS Kesehatan seperti VClaim, iCare, Antrean RS, dan Aplicare, termasuk pembuatan signature dan dekripsi response pada service yang membutuhkannya.

Project ini bukan library resmi dari BPJS Kesehatan.

Fitur

  • Generate X-Signature menggunakan HMAC SHA-256
  • Generate header autentikasi BPJS
  • Dekripsi response terenkripsi menggunakan AES
  • Dekompresi response menggunakan LZString
  • Mendukung beberapa service:
    • VClaim
    • iCare
    • Antrean RS
    • Aplicare
  • Interface request yang sama untuk setiap service
  • Mendukung GET, POST, PUT, dan DELETE
  • Normalisasi response BPJS

Instalasi

pip install bpjs-bridging

Nama package dapat berubah sebelum rilis resmi ke PyPI.

Penggunaan

from bpjs import Bridging

config = {
    "consid": "your_consid",
    "secret": "your_secret",
    "user_key": "your_userkey",
    "host": "base_url",
}

vclaim = Bridging(config, "vclaim")

response = vclaim.request("referensi/propinsi")

print(response)

POST Request

payload = {
    "param": "0000000000000",
    "kodedokter": 123456,
}

response = icare.request(
    "api/rs/validate",
    method="post",
    payload=payload,
)

print(response)

Service

Service ditentukan ketika membuat instance Bridging.

vclaim = Bridging(config, "vclaim")
icare = Bridging(config, "icare")
antrean = Bridging(config, "antrean")
aplicare = Bridging(config, "aplicare")

Setiap konfigurasi config membawa host service yang akan digunakan.

Konfigurasi

config = {
    "host": "SERVICE_HOST",
    "consid": "consid",
    "secret": "secret",
    "user_key": "userkey",
}

Jangan menyimpan credential BPJS secara langsung di source code pada aplikasi production. Gunakan environment variable atau mekanisme secret management lainnya.

Credit

Implementasi awal mekanisme signature dan dekripsi response dikembangkan berdasarkan:

morizbebenk/pybpjs

Project ini kemudian direfaktor dan dikembangkan lebih lanjut untuk mendukung beberapa service BPJS melalui interface berbasis class.

Sumber Daya

Lisensi

  • Aplikasi ini open source dengan lisensi MIT.

Disclaimer

Project ini merupakan library pihak ketiga dan tidak berafiliasi, didukung, atau dikelola oleh BPJS Kesehatan.

Pengguna bertanggung jawab atas penggunaan credential dan kepatuhan terhadap ketentuan API BPJS Kesehatan.

Metadata

Release files for bpjs-bridging 0.1.0

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

Source distribution (sdist)

Source distribution for bpjs-bridging 0.1.0
File Size Uploaded Provenance Actions
bpjs_bridging-0.1.0.tar.gz 5.7 kB Without provenance Details for bpjs_bridging-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bpjs-bridging 0.1.0
File Interpreter ABI Platform Actions
bpjs_bridging-0.1.0-py3-none-any.whl Python 3 none any Details for bpjs_bridging-0.1.0-py3-none-any.whl

Total release size: 11.3 kB

Release files / bpjs_bridging-0.1.0.tar.gz

Download URL bpjs_bridging-0.1.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
63a08ab14298bad7083d4a74cb60c9ce6399278d8ff4a3c7f542948d96d21838
BLAKE2b-256 checksum
How to use checksums
a507b34d1e4df5df6351bbc98ebe4ab9840617ee9470ecac8b3a8f9fd141e2a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / bpjs_bridging-0.1.0-py3-none-any.whl

Download URL bpjs_bridging-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94069ed1c6d992d508f1b8a757559e6b615ca9b93851b0f4e0fdf87b9a739da2
BLAKE2b-256 checksum
How to use checksums
0fc4866494a9cad8cda7f6fb1af4c445b7fd8bc5da351290874ec6e88fb974a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for bpjs-bridging 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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