gencedula
Generate and verify Uruguayan identity document numbers.
Zero runtime dependencies. Handy for generating valid test data: the uruguayan cédula de identidad is not covered by python-stdnum (which only ships the uruguayan RUT), and validators don't generate numbers anyway.
A generated number is only checksum-valid: it passes the
verifier-digit algorithm, but that does not mean it was ever issued,
and it may coincide with a real person's number. verify_cedula
likewise checks the verifier digit only, not whether the document
exists.
Installation
Install with uv
uv add gencedula
Usage
In [1]: import gencedula
In [2]: for x in range(10):
print(
gencedula.generate_cedula(
start=4_000_000,
stop=5_000_000,
step=200
)
)
46308006
47486005
49378000
41064007
40756005
45282003
47958004
44844000
41564007
49684003
In [3]: gencedula.verify_cedula(46308006)
Out[3]: True
In [4]: gencedula.verify_cedula(46308007)
Out[4]: False
In [5]: gencedula.calculate_digito_verificador(4630800)
Out[5]: 6
In [6]: gencedula.format_cedula(46308006)
Out[6]: '4.630.800-6'
Tests
python -m unittest discover tests
Metadata
Release files for gencedula 1.0.0
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 |
|---|---|---|---|---|
| gencedula-1.0.0.tar.gz | 4.8 kB | Without provenance | Details for gencedula-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gencedula-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for gencedula-1.0.0-py3-none-any.whl |
Total release size: 9.4 kB
Release files / gencedula-1.0.0.tar.gz
| Download URL | gencedula-1.0.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bd8d074e441ebff7a9c7cc8a9f7988e06c721466d2009813325e08b0531cc18
|
|
BLAKE2b-256 checksum How to use checksums |
34adee31104dce42b4d51f65d8f00a8179d3507a8143c97b6293b60fa377cacb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gencedula-1.0.0-py3-none-any.whl
| Download URL | gencedula-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9cb606062c934f1f59f77eb5876251c065a6c461d1e3fb030a96409c048759a
|
|
BLAKE2b-256 checksum How to use checksums |
a9464b8f2c760104c830db68df35e9d819c0f1af94f7bf1d67669022bf1157db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for gencedula 1.0.0
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.