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:
pip install beerxml
Code Generation
The models in this beerxml package have been generated from this 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:
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 on our GitHub repository.
Pull Requests
- Fork the repository and create a new branch for your contribution.
- Write clear and concise commit messages.
- Include unit tests for your changes
- 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:
Before submitting a pull request, ensure that your code passes these checks.
Unit Testing
All contributions must be accompanied by unit tests using pytest. Test coverage is crucial to ensure the reliability of the codebase.
To run tests locally:
pytest .
Metadata
Release files for beerxml 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| beerxml-0.0.8.tar.gz | 8.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| beerxml-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.2 kB
Release files / beerxml-0.0.8.tar.gz
| Download URL | beerxml-0.0.8.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82e7cc777c467eca3ea36201e4e75b69d56d749862cda4361b03efd132ff3fd3
|
|
BLAKE2b-256 checksum How to use checksums |
cd127b84617d50e02283028b7947cab29aa8367fe801d80228b869cd5fdc963a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.14 Linux/6.5.0-1022-azure
|
Release files / beerxml-0.0.8-py3-none-any.whl
| Download URL | beerxml-0.0.8-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88dc2e6156c9e3bafe05e660233909df18c681df28179909fc2d57fa236c57f3
|
|
BLAKE2b-256 checksum How to use checksums |
1439681e08adef9584603102eba61d439029e0f66aee7921740a5b61aabc5f97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.14 Linux/6.5.0-1022-azure
|
Security for beerxml 0.0.8
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.