cym
cymbology
pypi i cymbology
cym

cymbology

Identifies and validates financial security ids such as Sedol, Cusip, Isin numbers.

by Philip Martin

0.2.3 (see all)License:BSD
pypi i cymbology
Readme

cymbology

cymbology identifies and validates financial security ids. Currently the following identifiers are supported:

  1. Sedol
  2. Cusip
  3. Isin

This package can be used to validate these identifiers, discover the validation error, or create checksum digits.

Example Usage:

ISIN number

from cymbology import Isin, cusip_from_isin
isin = Isin()

# validate ISIN number 'US0378331005', throwing error IdError if invalid
>>> valid_isin = isin.validate('US0378331005')
>>> valid_isin
'US0378331005'

# return validation boolean for ISIN number
>>> tf = isin.is_valid('US0378331005')
>>> tf
True

# calculate checksum for ISIN number 'US0378331005'
check_digit = isin.calculate_checksum('US037833100')

# convert ISIN to CUSIP number.
>>> cusip_from_isin('US0378331005')
'037833100'

Dependancies and Installation Notes

This package currently only relies on the standard library, and has not been tested for Python 2.X.

Running Tests

PYTHONPATH=. py.test --cov

Extending

Idenifiers that rely on alpha-numeric codes should be able to be easily extended. Feel free to add additional identification algorithmns. Legal Indenifiers(LEI) ids will be added to master branch of repo soon.

GitHub Stars

13

LAST COMMIT

5yrs ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

0

OPEN PRs

1
VersionTagPublished
0.2.3
5yrs ago
0.2.2
5yrs ago
0.2.0
5yrs ago
No alternatives found
No tutorials found
Add a tutorial