Skip to main content

Check whether the ID card is legal.

Project description

🐶 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 o if a digit is known to be odd (e.g. male on the gender digit);
  • Use e if 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

GPL-3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idog-0.1.3.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

idog-0.1.3-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file idog-0.1.3.tar.gz.

File metadata

  • Download URL: idog-0.1.3.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for idog-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c0f7b0e417de48212c9e1a3d12ad750ce818c6911061119b260b3f0a39344b8b
MD5 a130f37cccd9e8a2869701d570fa71f9
BLAKE2b-256 422cf65390557ed8658ca2373cd5188a7bcf2ce60d20c9796039189f5c35ca86

See more details on using hashes here.

Provenance

The following attestation bundles were made for idog-0.1.3.tar.gz:

Publisher: publish.yml on mmdjiji/idog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file idog-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: idog-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for idog-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a7870db311beb1b570bdfda36aaeb08f67e3bdaa49729ebd00ad80cfc254bbf8
MD5 63362dd3dd486a0327283b411c7cf1ad
BLAKE2b-256 ed04bc6b35772d6e254272cf5e80204c9351a353e147ca522c9aff04c32586e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for idog-0.1.3-py3-none-any.whl:

Publisher: publish.yml on mmdjiji/idog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page