beerxml


Namebeerxml JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://www.yourownbeer.com
SummaryThe beerxml python package is a powerful tool designed to streamline the process of working with BeerXML files, ensuring that specific beer recipes adhere to the BeerXML standard. BeerXML is a widely adopted XML-based standard for representing brewing recipes, allowing brewers to share and exchange their recipes seamlessly.
upload_time2024-07-04 15:39:10
maintainerNone
docs_urlNone
authorYourOwnBeer
requires_python<4.0,>=3.10
licenseMIT
keywords beerxml beer xml beerxml standard
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Beerxml

## Description

The beerxml python package is a powerful tool designed to streamline the process of working with BeerXML files, ensuring that specific beer recipes adhere to the BeerXML standard. BeerXML is a widely adopted XML-based standard for representing brewing recipes, allowing brewers to share and exchange their recipes seamlessly.

## Installation

To install your package, use the following command:

```bash
pip install beerxml
```

## Code Generation

The models in this beerxml package have been generated from [this beerxml json schema](https://github.com/yourownbeer/beerxml-json-schema) with this command:

```
 datamodel-codegen  --input .\schemas\Recipe.json --input-file-type jsonschema --output output.py --snake-case-field --capitalise-enum-members --use-annotated  --use-non-positive-negative-number-constrained-types --output-model-type pydantic_v2.BaseModel
```

## Usage

Import the `BeerxmlParser` class and inject the file content into the class like in the following example:

```python
from beerxml import BeerxmlParser

# Example usage
parser: BeerxmlParser = BeerxmlParser()
with open("path/to/xml.file", "r") as file_content:
    recipe = parser.parse(file_content.read())

print(recipe.name)
print(recipe.hops)
print(recipe.fermentables)
print(recipe.yeasts)
```

## Contributing

We welcome contributions from the community! If you would like to contribute to this project, please follow these guidelines:

### Reporting Issues

If you encounter any issues or have suggestions, please [open an issue](https://github.com/lowmann15/beerxml/issues) on our GitHub repository.

### Pull Requests

1. Fork the repository and create a new branch for your contribution.
1. Write clear and concise commit messages.
1. Include unit tests for your changes
1. Submit a pull request, clearly describing the changes you've made and providing any necessary context.

### Linting and Code Style

We use the following linters to maintain code quality:

- [Ruff](https://github.com/astral-sh/ruff): for formatting.
- [Bandit](https://github.com/PyCQA/bandit): for security checks.
- [Mypy](https://github.com/python/mypy): for type checking.

Before submitting a pull request, ensure that your code passes these checks.

### Unit Testing

All contributions must be accompanied by unit tests using [pytest](https://github.com/pytest-dev/pytest). Test coverage is crucial to ensure the reliability of the codebase.

To run tests locally:

```bash
pytest .
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.yourownbeer.com",
    "name": "beerxml",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "beerxml, beer, xml, beerxml standard",
    "author": "YourOwnBeer",
    "author_email": "brew@yourownbeer.com",
    "download_url": "https://files.pythonhosted.org/packages/cd/12/7b84617d50e02283028b7947cab29aa8367fe801d80228b869cd5fdc963a/beerxml-0.0.8.tar.gz",
    "platform": null,
    "description": "# Beerxml\n\n## Description\n\nThe beerxml python package is a powerful tool designed to streamline the process of working with BeerXML files, ensuring that specific beer recipes adhere to the BeerXML standard. BeerXML is a widely adopted XML-based standard for representing brewing recipes, allowing brewers to share and exchange their recipes seamlessly.\n\n## Installation\n\nTo install your package, use the following command:\n\n```bash\npip install beerxml\n```\n\n## Code Generation\n\nThe models in this beerxml package have been generated from [this beerxml json schema](https://github.com/yourownbeer/beerxml-json-schema) with this command:\n\n```\n datamodel-codegen  --input .\\schemas\\Recipe.json --input-file-type jsonschema --output output.py --snake-case-field --capitalise-enum-members --use-annotated  --use-non-positive-negative-number-constrained-types --output-model-type pydantic_v2.BaseModel\n```\n\n## Usage\n\nImport the `BeerxmlParser` class and inject the file content into the class like in the following example:\n\n```python\nfrom beerxml import BeerxmlParser\n\n# Example usage\nparser: BeerxmlParser = BeerxmlParser()\nwith open(\"path/to/xml.file\", \"r\") as file_content:\n    recipe = parser.parse(file_content.read())\n\nprint(recipe.name)\nprint(recipe.hops)\nprint(recipe.fermentables)\nprint(recipe.yeasts)\n```\n\n## Contributing\n\nWe welcome contributions from the community! If you would like to contribute to this project, please follow these guidelines:\n\n### Reporting Issues\n\nIf you encounter any issues or have suggestions, please [open an issue](https://github.com/lowmann15/beerxml/issues) on our GitHub repository.\n\n### Pull Requests\n\n1. Fork the repository and create a new branch for your contribution.\n1. Write clear and concise commit messages.\n1. Include unit tests for your changes\n1. Submit a pull request, clearly describing the changes you've made and providing any necessary context.\n\n### Linting and Code Style\n\nWe use the following linters to maintain code quality:\n\n- [Ruff](https://github.com/astral-sh/ruff): for formatting.\n- [Bandit](https://github.com/PyCQA/bandit): for security checks.\n- [Mypy](https://github.com/python/mypy): for type checking.\n\nBefore submitting a pull request, ensure that your code passes these checks.\n\n### Unit Testing\n\nAll contributions must be accompanied by unit tests using [pytest](https://github.com/pytest-dev/pytest). Test coverage is crucial to ensure the reliability of the codebase.\n\nTo run tests locally:\n\n```bash\npytest .\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The beerxml python package is a powerful tool designed to streamline the process of working with BeerXML files, ensuring that specific beer recipes adhere to the BeerXML standard. BeerXML is a widely adopted XML-based standard for representing brewing recipes, allowing brewers to share and exchange their recipes seamlessly.",
    "version": "0.0.8",
    "project_urls": {
        "Homepage": "https://www.yourownbeer.com",
        "Repository": "https://github.com/yourownbeer/beerxml-python"
    },
    "split_keywords": [
        "beerxml",
        " beer",
        " xml",
        " beerxml standard"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1439681e08adef9584603102eba61d439029e0f66aee7921740a5b61aabc5f97",
                "md5": "b1c1bc2e24b13edd7da7fc1086a1ab0c",
                "sha256": "88dc2e6156c9e3bafe05e660233909df18c681df28179909fc2d57fa236c57f3"
            },
            "downloads": -1,
            "filename": "beerxml-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b1c1bc2e24b13edd7da7fc1086a1ab0c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 7995,
            "upload_time": "2024-07-04T15:39:09",
            "upload_time_iso_8601": "2024-07-04T15:39:09.434573Z",
            "url": "https://files.pythonhosted.org/packages/14/39/681e08adef9584603102eba61d439029e0f66aee7921740a5b61aabc5f97/beerxml-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd127b84617d50e02283028b7947cab29aa8367fe801d80228b869cd5fdc963a",
                "md5": "7728fb959c798137f4d15416a7135b12",
                "sha256": "82e7cc777c467eca3ea36201e4e75b69d56d749862cda4361b03efd132ff3fd3"
            },
            "downloads": -1,
            "filename": "beerxml-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "7728fb959c798137f4d15416a7135b12",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 8240,
            "upload_time": "2024-07-04T15:39:10",
            "upload_time_iso_8601": "2024-07-04T15:39:10.797536Z",
            "url": "https://files.pythonhosted.org/packages/cd/12/7b84617d50e02283028b7947cab29aa8367fe801d80228b869cd5fdc963a/beerxml-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-04 15:39:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yourownbeer",
    "github_project": "beerxml-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "beerxml"
}
        
Elapsed time: 0.67258s