CNP generator and decoder
📖 About
Cnp-generator package contains both a Python lib and CLI tool for generate and decode CNPs.
With CLI tool you can:
- generate a valid CNP based on gender, region, and birth date.
- check if a CNP is valid
- decode CNP information
- generate random CNPs for testing purposes
Python lib contains Cnp class that will provide all functionalities available in tool to be used in code.
💻 Tool Usage
Run CNP tool with:
python -m cnpgen
Available options:
-h --help Show help.
--version Show program version.
-c Start new CNP wizard. Guided wizard for genereating a CNP based on input info.
-g N Generate N random CNPs.
-i CNP Show relevant information about CNP.
🧪 API Usage
Quick start
from datetime import date
from cnpgen import Cnp, Gender, Region
print(Cnp(Gender.F, date(1993, 3, 4), Region.Bucuresti))
>>> 2930304400014
Full documentation
Soon available on Readthedocs.
Metadata
Release files for cnp-generator 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cnp-generator-1.1.1.tar.gz | 5.3 kB | Without provenance | Details for cnp-generator-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cnp_generator-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for cnp_generator-1.1.1-py3-none-any.whl |
Total release size: 11.7 kB
Release files / cnp-generator-1.1.1.tar.gz
| Download URL | cnp-generator-1.1.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7a6befd8bce9e20f26fed5a937df12a5c30e94d962293d1f097396ba3e2dc8c
|
|
BLAKE2b-256 checksum How to use checksums |
86ccd504de28b24eab173dbc06f6ab380ecce9d9c81ef1cd8ae07e523e5d4374
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / cnp_generator-1.1.1-py3-none-any.whl
| Download URL | cnp_generator-1.1.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e22cb7fb86d10315d9a379a4507fd3e25af1a5b330c353d61a209a7a8e8fcb1e
|
|
BLAKE2b-256 checksum How to use checksums |
14e6b32ee10522d79f64dae3a6fd9ca555c6c282c9e44943b6322777b16c81be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for cnp-generator 1.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.