Name | beerxml JSON |
Version |
0.0.5
JSON |
| download |
home_page | https://yourownbeer.de |
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. |
upload_time | 2024-03-16 17:41:07 |
maintainer | |
docs_url | None |
author | YourOwnBeer |
requires_python | >=3.10,<4.0 |
license | MIT |
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-numbe
r-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://yourownbeer.de",
"name": "beerxml",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "beerxml,beer,xml,beerxml standard",
"author": "YourOwnBeer",
"author_email": "brew@yourownbeer.de",
"download_url": "https://files.pythonhosted.org/packages/40/88/bdce468c06f5fa4705ecb550e259ecc1e59db72fc69ae32760e46a3c4e6f/beerxml-0.0.5.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-numbe\nr-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.5",
"project_urls": {
"Homepage": "https://yourownbeer.de",
"Repository": "https://github.com/yourownbeer/beerxml-python"
},
"split_keywords": [
"beerxml",
"beer",
"xml",
"beerxml standard"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0bc9c0c7a165267961a758be51d7517bd1bc678eddea49d51a4685fa237d7a61",
"md5": "62f2f5c24f2e8c7b27a52971317490c3",
"sha256": "764247a84aa0b6dd748f7f80cd1fa12709e0f1dc2fca923a3b7048c06603c100"
},
"downloads": -1,
"filename": "beerxml-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "62f2f5c24f2e8c7b27a52971317490c3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 7986,
"upload_time": "2024-03-16T17:41:05",
"upload_time_iso_8601": "2024-03-16T17:41:05.915671Z",
"url": "https://files.pythonhosted.org/packages/0b/c9/c0c7a165267961a758be51d7517bd1bc678eddea49d51a4685fa237d7a61/beerxml-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4088bdce468c06f5fa4705ecb550e259ecc1e59db72fc69ae32760e46a3c4e6f",
"md5": "8aff79682162aacdac9c7490d67cfe40",
"sha256": "38bd2e3d574005560d37049992f9d80cba8baad4185b233bfe2f860979ba9d07"
},
"downloads": -1,
"filename": "beerxml-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "8aff79682162aacdac9c7490d67cfe40",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 8239,
"upload_time": "2024-03-16T17:41:07",
"upload_time_iso_8601": "2024-03-16T17:41:07.502571Z",
"url": "https://files.pythonhosted.org/packages/40/88/bdce468c06f5fa4705ecb550e259ecc1e59db72fc69ae32760e46a3c4e6f/beerxml-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-16 17:41:07",
"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"
}