Validate Swedish organization numbers
Project description
organisationsnummer 
Validate Swedish organization numbers. Follows version 1.1 of the specification.
Installation
pip install organisationsnummer
or
pip3 install organisationsnummer
Examples
- All examples that uses
organisationsnummer.Organisationsnummer([params]), can be replaced withorganisationsnummer.parse([params]).
Validation
from organisationsnummer import organisationsnummer
organisationsnummer.valid("8507099805")
# => True
organisationsnummer.valid("198507099805")
# => True
Format
from organisationsnummer import organisationsnummer
# Short format
pn = organisationsnummer.Organisationsnummer(8507099805)
pn.format()
# => '8507099805'
# Long format
pn = organisationsnummer.Organisationsnummer('8507099805')
pn.format(True)
# => '850709-9805'
See organisationsnummer/tests/test_organisationsnummer.py for more examples.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file organisationsnummer-1.0.0.tar.gz.
File metadata
- Download URL: organisationsnummer-1.0.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e1cb58e58409e94fbb029e82393f98fa49156d38980346471939e2c70e83bb3
|
|
| MD5 |
d872e8ce20731a52df4147c123c6bcc4
|
|
| BLAKE2b-256 |
0deedc765b22821a8c89758a249882523de32f50603f30ebbfa4ba44fa316d79
|
File details
Details for the file organisationsnummer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: organisationsnummer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b5e21e32118f7664ca76d9b37e07b492266d712489e6b2fa1b6520d65d3c0d9
|
|
| MD5 |
78512fc4d4b66541576eb55428ace966
|
|
| BLAKE2b-256 |
52c8d1f0e85a13b4fc889b4de365521a63a7ab65e760e97f6e81c02868b13e1d
|