Skip to main content

A Python wrapper around the data provided by the ISO 10383 specification.

Project description

A Python wrapper around the data provided by the ISO 10383 specification.

Install

$ pip install iso10383

Usage

The package is relatively easy to use. The MIC class is the enum that contains all the entries:

>>> from iso10383 import MIC
>>> MIC.xnys.value
MICEntry(
    mic='XNYS',
    market_name='NEW YORK STOCK EXCHANGE, INC.',
    market_category_code=<MCC.nspd: 6>,
    creation_date=datetime.date(2005, 5, 23),
    status=<Status.active: 0>,
    city=<City.new_york: 208>,
    operating_mic=None,
    institution_description=None,
    legel_entity_name=None,
    legal_entity_identifier=None,
    acronym='NYSE',
    iso_country_code=<ISOCC.us: 137>,
    website='www.nyse.com',
    last_update_date=datetime.date(2005, 5, 23),
    last_validation_date=None,
    expiry_date=None,
    comments=None
)

Each MICEntry has the following attributes, which correspond to those found in the specification:

mic                     : str
market_name             : str
market_category_code    : MCC
creation_date           : datetime.date
status                  : Status
city                    : City          | None
operating_mic           : MICEntry      | None
institution_description : str           | None
legel_entity_name       : str           | None
legal_entity_identifier : str           | None
acronym                 : str           | None
iso_country_code        : ISOCC         | None
website                 : str           | None
last_update_date        : datetime.date | None
last_validation_date    : datetime.date | None
expiry_date             : datetime.date | None
comments                : str           | None

MCC, Status, City, and ISOCC are supporting enums that can be imported separately.

The operating/segment column is notably not present, and is instead indicated by the presence of the operating_mic attribute (that is, whether or not it is None).

Notes

Given the large number of entries in the ISO 10383 specification, hard-coding an enum would cause major performance issues with intellisense and linters. For this reason, a dummy enum was hardcoded, and is then replaced by deserializing the contents at runtime. This means there is a small performance hit (on the order of milliseconds) at runtime when the module is imported.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iso10383-2024.12.9.tar.gz (153.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iso10383-2024.12.9-py3-none-any.whl (152.2 kB view details)

Uploaded Python 3

File details

Details for the file iso10383-2024.12.9.tar.gz.

File metadata

  • Download URL: iso10383-2024.12.9.tar.gz
  • Upload date:
  • Size: 153.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for iso10383-2024.12.9.tar.gz
Algorithm Hash digest
SHA256 75c1f7a92ff179b8c8b328bbf9b2f6a3cad1ee8d87a26247b78405b901e4f251
MD5 8c6fd02c32575e149026677a67b351dc
BLAKE2b-256 f47ddf9f44b250e5ca85d1ae6427050e69f8114263562e3676816d22a44e59f3

See more details on using hashes here.

File details

Details for the file iso10383-2024.12.9-py3-none-any.whl.

File metadata

  • Download URL: iso10383-2024.12.9-py3-none-any.whl
  • Upload date:
  • Size: 152.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for iso10383-2024.12.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d0346e3d686af7a12e4a9024764dc40b4801af3bdcad856e85e6fb48893b78ee
MD5 839693e8c3fec4a36cd5084203d88cd5
BLAKE2b-256 20c155b587b7bf656c17049014b8b7e5eab273466fc1543f73df3e91dd501729

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page