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).
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.0.tar.gz
(8.8 kB
view details)
Built Distribution
File details
Details for the file pesel-0.3.0.tar.gz
.
File metadata
- Download URL: pesel-0.3.0.tar.gz
- Upload date:
- Size: 8.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cacd4635715d428ac4e18fc301258f1ee77bd3b7d2f6e330153b92379192380 |
|
MD5 | f3e470f51986c6a72248a8dded6cae74 |
|
BLAKE2b-256 | 014d1cfa349e1ccfbdae45f5218822d91cdc34f3c27aafbad9b92adf6519a08c |
File details
Details for the file pesel-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pesel-0.3.0-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 030afa0850134cf3a87eb1b992da297a4d2bb93833e91f973bf4b556322dd509 |
|
MD5 | 2102554ca12931c688f3552ee4134087 |
|
BLAKE2b-256 | f2a8d3f0c907c61321b2be9fcb482c68bb782723ef2dc88086cc54bf5f6cca5f |