The pl_pesel function is a specialized tool within the mock-jutsu library designed to generate authentic Polish national identification numbers for software development and quality assurance. For developers building applications tailored for the Polish market, generating high-quality mock data is essential for ensuring that systems handle local identification formats correctly. This function provides a seamless way to produce 11-digit strings that adhere strictly to the official PESEL standard, which is the primary identification number used for citizens and residents in Poland.
Each identifier produced by the pl_pesel function follows a sophisticated algorithm defined by Polish law. The first six digits represent the individual's birth date in a YYMMDD format, while the subsequent four digits denote a unique serial number and gender information. The final eleventh digit is a control sum calculated using a specific weighted MOD-10 check. By utilizing mock-jutsu to generate this test data, developers can ensure their validation logic is robust enough to handle the century-specific offsets used in the Polish numbering system, such as the specific month-encoding rules for individuals born between the years 2000 and 2099.
Integrating pl_pesel into your workflow is remarkably efficient across various platforms. Whether you are working in a Python environment using jutsu.generate('pl_pesel'), executing quick commands via the CLI with mockjutsu generate pl_pesel, or performing performance testing in JMeter using the ${__mockjutsu(pl_pesel,)} syntax, the library ensures consistent and valid results. This cross-platform flexibility allows engineering teams to populate databases, simulate API responses, and conduct comprehensive end-to-end testing without the risks or ethical concerns associated with using real personal information.
Beyond simple generation, the pl_pesel function offers significant benefits for compliance and security. Using synthetic test data helps organizations remain compliant with GDPR and other international data protection regulations by avoiding the use of actual PII (Personally Identifiable Information) in non-production environments. This is particularly useful for testing edge cases in KYC (Know Your Customer) workflows, financial systems, and healthcare applications where precise identification formatting is mandatory. With mock-jutsu, developers gain a reliable partner for creating realistic, valid, and secure test environments that mirror real-world Polish data structures.
mockjutsu generate pl_peselmockjutsu bulk pl_pesel --count 10mockjutsu export pl_pesel --count 10 --format jsonmockjutsu export pl_pesel --count 10 --format csvmockjutsu export pl_pesel --count 10 --format sql# --mask: regulation-compliant output (PCI DSS / GDPR / KVKK)mockjutsu generate pl_pesel --maskmockjutsu bulk pl_pesel --count 5 --maskfrom mockjutsu import jutsujutsu.generate('pl_pesel')jutsu.bulk('pl_pesel', count=10)jutsu.template(['pl_pesel'], count=5)# mask=True: regulation-compliant outputjutsu.generate('pl_pesel', mask=True)jutsu.bulk('pl_pesel', count=5, mask=True)${__mockjutsu_intl_ids(pl_pesel)}# JMeter Function: __mockjutsu_intl_ids# Parameter 1: pl_pesel# Parameter 2: (not required for this function)# Add 'mask' keyword to get a regulation-compliant masked value${__mockjutsu_intl_ids(pl_pesel,mask)}GET /generate/pl_pesel# → {"type":"pl_pesel","result":"...","status":"ok"}GET /bulk/pl_pesel?count=10POST /template {"types":["pl_pesel"],"count":1}# mask=true: regulation-compliant outputGET /generate/pl_pesel?mask=trueGET /bulk/pl_pesel?count=5&mask=true| Parameter | Values | Description |
|---|---|---|
| --mask | true | false | Return a regulation-compliant masked value (PCI DSS, GDPR, KVKK…) |