tire-codes


Nametire-codes JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/firstflush/tire_codes
SummaryA lightweight, dependency-free Python tool to parse and validate tire codes
upload_time2024-08-23 03:44:37
maintainerNone
docs_urlNone
authorMichael Pearce
requires_python>=3.10
licenseMIT
keywords tire codes automotive validation parser size
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

```bash
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:

```python
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:

```python
print(specs.to_dict())
```

### Command-Line Interface

You can also run the parser from the command line:

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

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

## License
MIT License

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/firstflush/tire_codes",
    "name": "tire-codes",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "tire, codes, automotive, validation, parser, size",
    "author": "Michael Pearce",
    "author_email": "firstflush@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2b/3b/839ad509d259cbeb46f666798f36a0bdacb99628a51df8f889ae22e52141/tire_codes-0.1.0.tar.gz",
    "platform": null,
    "description": "# Tire Codes\n\n## Description\nTire codes is a lightweight, easy-to-use Python tool designed to parse various tire specifications from tire codes.\n\n## Features\n- Parses tire specifications from various formats.\n- Extractable specs include:\n  - FORMAT\n  - SERVICE_TYPE\n  - WIDTH\n  - ASPECT_RATIO\n  - WHEEL_DIAMETER\n  - CONSTRUCTION\n  - OVERALL_DIAMETER\n  - LOAD_INDEX\n  - LOAD_INDEX_DUAL\n  - SPEED_RATING\n\n## Installation\nInstall directly with pip. No external dependencies.\n\n```bash\npip install tire-codes\n```\n\n## Example\nFor 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.\n\n## Usage\nTo parse a tire code, pass your tire code string to the `TireCodeParser` object:\n\n```python\nfrom tire_codes import TireCodeParser, TireCodeParsingError, TireCodeValidationError\n\ntry:\n    parser = TireCodeParser(\"295/40R21 111Y\")\n    specs = parser.parse()\n    print(specs)\nexcept TireCodeParsingError as e:\n    print(f\"Parsing error: {e}\")\nexcept TireCodeValidationError as e:\n    print(f\"Validation error: {e}\")\n```\n\nYou can also access all spec values as a dictionary:\n\n```python\nprint(specs.to_dict())\n```\n\n### Command-Line Interface\n\nYou can also run the parser from the command line:\n\n```bash\npython3 main.py \"295/40R21 111Y\"\n```\n\n## Contributing\nAny suggestions or contributions are welcome! I hope you find this package useful.\n\n## License\nMIT License\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A lightweight, dependency-free Python tool to parse and validate tire codes",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/firstflush/tire_codes"
    },
    "split_keywords": [
        "tire",
        " codes",
        " automotive",
        " validation",
        " parser",
        " size"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "89c339eb2b5c9797e1205dae078b8b87de27a8b3b1fa529d468e314ab82317c6",
                "md5": "6f7f21e45c5736db76bb87c231385bff",
                "sha256": "651f5b54f8eed4b0258bdaeea0229cb70ee8b6f3cdf15e8c92cf8c25617f7721"
            },
            "downloads": -1,
            "filename": "tire_codes-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f7f21e45c5736db76bb87c231385bff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 16832,
            "upload_time": "2024-08-23T03:44:35",
            "upload_time_iso_8601": "2024-08-23T03:44:35.786956Z",
            "url": "https://files.pythonhosted.org/packages/89/c3/39eb2b5c9797e1205dae078b8b87de27a8b3b1fa529d468e314ab82317c6/tire_codes-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b3b839ad509d259cbeb46f666798f36a0bdacb99628a51df8f889ae22e52141",
                "md5": "ef9bea591639d8a16e4e807c1218dc54",
                "sha256": "0d349b59a7fe765a96c032cdd1ab7680a45b7083bc8443c045e959628e405bbf"
            },
            "downloads": -1,
            "filename": "tire_codes-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ef9bea591639d8a16e4e807c1218dc54",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 15141,
            "upload_time": "2024-08-23T03:44:37",
            "upload_time_iso_8601": "2024-08-23T03:44:37.328710Z",
            "url": "https://files.pythonhosted.org/packages/2b/3b/839ad509d259cbeb46f666798f36a0bdacb99628a51df8f889ae22e52141/tire_codes-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-23 03:44:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "firstflush",
    "github_project": "tire_codes",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tire-codes"
}
        
Elapsed time: 3.00392s