Checkdigit

Latest version: v0.5.0

Safety actively analyzes 688053 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.1.1

checkdigit is now [PEP 561 compatible](https://www.python.org/dev/peps/pep-0561/)! This means that it has been marked as supporting type checking.

The inline documentation has been updated, and the code quality has been improved as a result of [additional testing](https://github.com/harens/checkdigit/blob/master/scripts/tests.sh).

0.1

This is the biggest update of checkdigit yet. It clears up lots of redundant code and aims to improve things behind the scenes. This will help to improve future updates.

What's new?

Code

* Refactored various functions
* Docstrings and type-checking added

Please note that __a lot of functions have been renamed__. This is to help make things clearer both to the end user and in the code without having to make this change later on in development. If you were previously using this library, please see below for the name changes.

Please click on the title links for more info from the wiki.

[ISBN](https://github.com/harens/checkdigit/wiki/📖-ISBN)

| Original | New |
|-|-|
|`isbn10calculate`|`calculate10`|
|`isbn10check`|`validate10`|
|`isbn13calculate`|`calculate13`|
|`isbn13check`|`validate13`|
|`calculate_missing`|`missing`|

[Luhn](https://github.com/harens/checkdigit/wiki/💳-Luhn)

| Original | New |
|-|-|
|`luhn_calculate`|`calculate`|
|`luhn_validate`|`validate`|
|`luhn_missing`|`missing`|

[Parity](https://github.com/harens/checkdigit/wiki/1%EF%B8%8F⃣-Parity-Bits)

A second parameter has been added indicating whether to use even parity or not.

| Original | New |
|-|-|
|`evenparity`|`calculate(data)`|
|`oddparity`|`calculate(data, false)`|

[UPC](https://github.com/harens/checkdigit/wiki/📦-UPC-A)

| Original | New |
|-|-|
|`upc_calculate`|`calculate`|
|`upc_check`|`validate`|

Documentation

* A [Wiki](https://github.com/harens/checkdigit/wiki) has been created documenting how all the functions work with examples
* README updated

Tests

* Moved tests to [error404](https://github.com/harens/error404)
* Additional tests added
* Coverage report generated
* Moved from Travis CI to GitHub Actions

Other

* Moved to poetry for dependency management

0.0.6

Can now calculate a missing digit with the Luhn Algorithm

0.0.5

Support for Integers and Hyphens Added

0.0.4

Support for UPC Codes Added
Numbers involving the [Luhn Algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) are now also supported

0.0.3

All intended ISBN Features completed
Test cases rewritten

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.