Skip to main content

A library for checking the latest revisions of standard methods published by standard bodies.

Project description

Stdchecker

PyPI

Stdchecker is a Python library for checking the latest revisions of standard methods published by standard bodies. Supported standard bodies are:

  • ASTM - American Society for Testing and Materials
  • IEC - The International Electrotechnical Commission
  • IEEE - The Institute of Electrical and Electronics Engineers
  • TSE - Turkish Standards Institution (Türk Standardları Enstitüsü)

Requirements

  • Python 3.8+

Installation

Use the package manager pip to install stdchecker:

pip install stdchecker

or directly from the source code:

git clone https://github.com/emreture/stdchecker.git
cd stdchecker
python setup.py install

Usage

Fetching standard methods data:

import stdchecker

std_list = ['D92', 'D93']

for i in stdchecker.fetch_astm(std_list):
    print(i)

Output:

{'query': 'D92',
 'error': None,
 'no': 'ASTM D92',
 'rev': '18',
 'desc': 'Standard Test Method for Flash and Fire Points by Cleveland Open Cup Tester',
 'body': 'astm',
 'url': 'https://www.astm.org/Standards/D92.htm'}

{'query': 'D93',
 'error': None,
 'no': 'ASTM D93',
 'rev': '20',
 'desc': 'Standard Test Methods for Flash Point by Pensky-Martens Closed Cup Tester',
 'body': 'astm',
 'url': 'https://www.astm.org/Standards/D93.htm'}

Checking if existing standard methods are up-to-date:

import stdchecker

std_list = ['D92', 'D93']
actual_std_list = [
    {'no': 'ASTM D92', 'rev': '18'},
    {'no': 'ASTM D93', 'rev': '18'}
]

fetch_generator = stdchecker.fetch_astm(std_list)
for i in stdchecker.check_astm(fetch_generator, actual_std_list):
    print(i)

Output:

{'query': 'D92',
 'error': None,
 'no': 'ASTM D92',
 'rev': '18',
 'desc': 'Standard Test Method for Flash and Fire Points by Cleveland Open Cup Tester',
 'body': 'astm',
 'url': 'https://www.astm.org/Standards/D92.htm',
 'check': True,
 'actual': '18'}

{'query': 'D93',
 'error': None,
 'no': 'ASTM D93',
 'rev': '20',
 'desc': 'Standard Test Methods for Flash Point by Pensky-Martens Closed Cup Tester',
 'body': 'astm',
 'url': 'https://www.astm.org/Standards/D93.htm',
 'check': False,
 'actual': '18'}

If an id is provided (for example existing standard methods are stored in a database), the output will also include the id key and its value:

import stdchecker

std_list = ['D92', 'D93']
actual_std_list = [
    {'id': 1, 'no': 'ASTM D92', 'rev': '18'},
    {'id': 2, 'no': 'ASTM D93', 'rev': '18'}
]

fetch_generator = stdchecker.fetch_astm(std_list)
for i in stdchecker.check_astm(fetch_generator, actual_std_list, id_from_actual=True):
    print(i)

Output:

{'query': 'D92',
 'error': None,
 'no': 'ASTM D92',
 'rev': '18',
 'desc': 'Standard Test Method for Flash and Fire Points by Cleveland Open Cup Tester',
 'body': 'astm',
 'url': 'https://www.astm.org/Standards/D92.htm',
 'check': True,
 'actual': '18',
 'id': 1}

{'query': 'D93',
 'error': None,
 'no': 'ASTM D93',
 'rev': '20',
 'desc': 'Standard Test Methods for Flash Point by Pensky-Martens Closed Cup Tester',
 'body': 'astm',
 'url': 'https://www.astm.org/Standards/D93.htm',
 'check': False,
 'actual': '18',
 'id': 2}

For more documentation, refer to the docstrings in the source files.

License

See the LICENSE file for license rights and limitations (MIT).

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

stdchecker-0.1.1.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

stdchecker-0.1.1-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file stdchecker-0.1.1.tar.gz.

File metadata

  • Download URL: stdchecker-0.1.1.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for stdchecker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 02911abe474f8b8215d2dd33be613efb31b15cc3636c9848e6947acb96a4ddfb
MD5 a0e71b66745323439f697347ead8817d
BLAKE2b-256 e290a47e9fd7226a2b7fbf48eb629f7628a12d929273e44dc4c3cd8d93ec7b3d

See more details on using hashes here.

File details

Details for the file stdchecker-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: stdchecker-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for stdchecker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d205d1bbb9e3e6943faf0d5465b8aa587f2324099152f9b130c3529508794137
MD5 45114fbf98b90fad449875876eb73e4f
BLAKE2b-256 0f8d8bf1f032d3c4e3770002601cd14e94127b38cefbfc1078590e27a406b287

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