Skip to main content

Tire Codes

Description

Tire codes is a lightweight, easy-to-use Python tool designed to parse various tire specifications from tire codes.

Features

  • Parses tire specifications from various formats.
  • Extractable specs include:
    • FORMAT
    • SERVICE_TYPE
    • WIDTH
    • ASPECT_RATIO
    • WHEEL_DIAMETER
    • CONSTRUCTION
    • OVERALL_DIAMETER
    • LOAD_INDEX
    • LOAD_INDEX_DUAL
    • SPEED_RATING

Installation

Install directly with pip. No external dependencies.

pip install tire-codes

Example

For a tire code like "215/70R16 100T" (metric) or "35X12.5R20 125S" (off-road), the parser will automatically detect the format and extract the details into a TireSpecs object.

Usage

To parse a tire code, pass your tire code string to the TireCodeParser object:

from tire_codes import TireCodeParser, TireCodeParsingError, TireCodeValidationError

try:
    parser = TireCodeParser("295/40R21 111Y")
    specs = parser.parse()
    print(specs)
except TireCodeParsingError as e:
    print(f"Parsing error: {e}")
except TireCodeValidationError as e:
    print(f"Validation error: {e}")

You can also access all spec values as a dictionary:

print(specs.to_dict())

Command-Line Interface

You can also run the parser from the command line:

python3 main.py "295/40R21 111Y"

Contributing

Any suggestions or contributions are welcome! I hope you find this package useful.

License

MIT License

Metadata

Release files for tire-codes 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tire-codes 0.1.0
File Size Uploaded Provenance Actions
tire_codes-0.1.0.tar.gz 15.1 kB Without provenance Details for tire_codes-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tire-codes 0.1.0
File Interpreter ABI Platform Actions
tire_codes-0.1.0-py3-none-any.whl Python 3 none any Details for tire_codes-0.1.0-py3-none-any.whl

Total release size: 32.0 kB

Release files / tire_codes-0.1.0.tar.gz

Download URL tire_codes-0.1.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0d349b59a7fe765a96c032cdd1ab7680a45b7083bc8443c045e959628e405bbf
BLAKE2b-256 checksum
How to use checksums
2b3b839ad509d259cbeb46f666798f36a0bdacb99628a51df8f889ae22e52141
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / tire_codes-0.1.0-py3-none-any.whl

Download URL tire_codes-0.1.0-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
651f5b54f8eed4b0258bdaeea0229cb70ee8b6f3cdf15e8c92cf8c25617f7721
BLAKE2b-256 checksum
How to use checksums
89c339eb2b5c9797e1205dae078b8b87de27a8b3b1fa529d468e314ab82317c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Security for tire-codes 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page