🐶 idog
Check whether the ID card is legal.
📦 Install
Before installing, please ensure that you have installed Python (>=3.8) and its matching version of pip, and then enter the following command at the command prompt:
pip install idog
Or use uv to run directly without installing:
uvx idog
Note: If you use this method, subsequent usage will require adding uvx before the command. You can also set an alias for easier use:
alias idog='uvx idog'
🔐 Usage
idog <idcard>
- Use
-if a digit is unknown; - Use
oif a digit is known to be odd (e.g. male on the gender digit); - Use
eif a digit is known to be even (e.g. female on the gender digit);
For example:
idog 11010519491231002X
🐍 Python API
You can also use idog as a library:
import idog
idog.eval("11010519491231002X") # ['11010519491231002X'] (legal → 1 element)
idog.eval("11010519491231000X") # [] (illegal → empty)
idog.eval("1101051949123100eX") # ['11010519491231002X'] (e/o/- expand to all matches)
idog.eval("11010519491231--2X") # ['11010519491231002X', '11010519491231192X', '11010519491231272X', '11010519491231352X', '11010519491231432X', '11010519491231512X', '11010519491231782X', '11010519491231862X', '11010519491231942X']
eval(s) always returns a list of legal 18-character IDs.
License
Metadata
Release files for idog 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| idog-0.1.3.tar.gz | 15.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| idog-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.1 kB
Release files / idog-0.1.3.tar.gz
| Download URL | idog-0.1.3.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0f7b0e417de48212c9e1a3d12ad750ce818c6911061119b260b3f0a39344b8b
|
|
BLAKE2b-256 checksum How to use checksums |
422cf65390557ed8658ca2373cd5188a7bcf2ce60d20c9796039189f5c35ca86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 15, 2026.
Transparency logRelease files / idog-0.1.3-py3-none-any.whl
| Download URL | idog-0.1.3-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a7870db311beb1b570bdfda36aaeb08f67e3bdaa49729ebd00ad80cfc254bbf8
|
|
BLAKE2b-256 checksum How to use checksums |
ed04bc6b35772d6e254272cf5e80204c9351a353e147ca522c9aff04c32586e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 15, 2026.
Transparency log