Skip to main content

Check Generator This Python package generates a text-based receipt from an order stored in a JSON file.

Features Accepts order details in a JSON file. Generates a receipt that includes: Customer's name. List of purchased items (name, quantity, price per unit). Total amount of the order. Supports command-line options for specifying input and output files. Installation Clone the repository or download the source code.

Install the package by running the following command in the project's root directory:

bash Копировать код pip install . Usage Once the package is installed, you can generate a receipt by using the command-line tool.

Command-line Interface (CLI) bash Копировать код check-generator --input-file <path_to_input_json> --output-file <path_to_output_txt> Example Given the following JSON file (order.json):

json Копировать код { "customer_name": "Иван Иванов", "items": [ {"name": "Телефон", "quantity": 1, "price": 20000}, {"name": "Наушники", "quantity": 2, "price": 1500} ] } Run the following command:

bash Копировать код check-generator --input-file data/order.json --output-file receipt.txt The generated receipt.txt will look like this:

yaml Копировать код Customer: Иван Иванов

Items:

  • Телефон x 1 @ 20000 = 20000
  • Наушники x 2 @ 1500 = 3000

Total: 23000 Development Setting up the environment Create a virtual environment:

bash Копировать код python -m venv venv Activate the virtual environment:

On macOS/Linux: bash Копировать код source venv/bin/activate On Windows: bash Копировать код .\venv\Scripts\activate Install the dependencies:

bash Копировать код pip install -r requirements.txt Running Tests To run the tests for the package:

Install pytest if you haven't already:

bash Копировать код pip install pytest Run the tests:

bash Копировать код pytest License This project is licensed under the MIT License.

Metadata

Release files for check-generator 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 check-generator 0.1.0
File Size Uploaded Provenance Actions
check_generator-0.1.0.tar.gz 2.0 kB Without provenance Details for check_generator-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for check-generator 0.1.0
File Interpreter ABI Platform Actions
check_generator-0.1.0-py3-none-any.whl Python 3 none any Details for check_generator-0.1.0-py3-none-any.whl

Total release size: 4.3 kB

Release files / check_generator-0.1.0.tar.gz

Download URL check_generator-0.1.0.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6613651b648e6c2e3924c9f2d7998970302c900b4326f6aad98ba48feed4dc92
BLAKE2b-256 checksum
How to use checksums
cc9d9fcea0fe5699097c99ad782b76e466c3cee3482fe1e938c570cfbfc47e6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

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

Download URL check_generator-0.1.0-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc291e4e3055fe1b787f44f4547d2d6e192f5a02d77ccfeda2853407de86e45f
BLAKE2b-256 checksum
How to use checksums
a696a94ce74e15c9c27ee4fb4fc20e40aa6a733fba500c8f992168bd41b465e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Security for check-generator 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