Skip to main content

Polish PESEL

Project description

pypesel

PESEL Python module

PESEL is the national identification number used in Poland since 1979. It always has 11 digits, identifies just one person and cannot be changed to another one (except some specific situations such as gender reassignment).

Test codecov PyPI version GitHub PyPI - Downloads

Installation

pip install pesel

Python usage

from pesel import Pesel

random_pesel = Pesel.generate()
random_pesel_male = Pesel.generate(male=True)
random_pesel_2021 = Pesel.generate(year=2021)

pesel = Pesel("65432101239")

Shell usage

There are 2 commands: generate & validate

 pesel generate --help
usage: pesel generate [-h] [--year YEAR] [--month MONTH] [--day DAY] [--male | --female]

optional arguments:
  -h, --help            show this help message and exit
  --year YEAR, -y YEAR  Year of birth
  --month MONTH, -m MONTH
                        Month of birth
  --day DAY, -d DAY     Day of birth
  --male                It is male person
  --female              It is female person
 pesel generate  
62512426682
 pesel validate --help  
usage: pesel validate [-h] pesel

positional arguments:
  pesel       PESEL number

optional arguments:
  -h, --help  show this help message and exit
> pesel validate 62512426682
True

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

pesel-0.3.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

pesel-0.3.1-py2.py3-none-any.whl (9.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pesel-0.3.1.tar.gz.

File metadata

  • Download URL: pesel-0.3.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for pesel-0.3.1.tar.gz
Algorithm Hash digest
SHA256 132ef55f6ab60b8b39451ad863266f513f22aa5b478ff23743c7a1b4bb14452e
MD5 00fad1c48436d9e03c2528f7fef2ad6b
BLAKE2b-256 18a68fd64c0208542a0da1e9e4c867c7b7f51a5d1e19e4a6d8ebc5743f1e3bfa

See more details on using hashes here.

File details

Details for the file pesel-0.3.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pesel-0.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1

File hashes

Hashes for pesel-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a696e22ef1f61ddff3b78e7453284ed95fb74ded31c50efd88f9290ce06b8828
MD5 0c75de1d77ad8f1fdc46b5d706d1ea4b
BLAKE2b-256 977f018b22b5c68db444268f6ae9ac118af665f2d3d7b688e57df7107e33efd9

See more details on using hashes here.

Supported by

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