Skip to content

organisationsnummer/python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

organisationsnummer Build Status

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 with organisationsnummer.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

About

Validate Swedish organization numbers

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •