Skip to main content
https://travis-ci.org/sergelevin/pyofd.svg?branch=master

pyofd is a Python package for receipts query from OFD providers. It is inspired by bobby_boy project.

Installation

Install via pip:

$ pip install pyofd

Install from source:

$ git clone git://github.com/sergelevin/pyofd.git
$ cd pyofd
$ python setup.py install

Usage

Here is basic usage example.

import pyofd, datetime

receipt = pyofd.OFDReceipt(
    fpd='FPD', total='total', rn_kkt='RN_KKT', fn='FN',
    fd='FD', inn='INN', purchase_date=datetime.datetime.now()
)
result = receipt.load_receipt()

OFDReceipt class might be constructed only with arguments known from receipt data, but omitting arguments might narrow the list of OFD providers to be checked against, because different providers require different subset of data to validate receipt

Examples

For some basic examples read unit tests in test directory. More complicated examples can be found within examples directory.

  • load_receipt.py: Load receipt by known attributes and save items into tab-delimited file.

  • xlsx_receipt.py: Load receipt by known attributes and export it to MS Excel (r) .xlsx file. If nalog.ru official receipt check application credentials are provided in PYOFD_NALOGRU_LOGIN and PYOFD_NALOGRU_PASSWORD environment variables, receipt lookup via NalogRu provider is also performed. Excel file is filled with formulas and conditional formatting suitable for my personal receipt handling needs - column F is for partial refund and columns G to Z - for receipt entries categorization with autocounting subtotal across categories.

Metadata

Release files for pyofd 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyofd 0.1.6
File Size Uploaded Provenance
pyofd-0.1.6.tar.gz 15.9 kB Without provenance Details

Release files / pyofd-0.1.6.tar.gz

Download URL pyofd-0.1.6.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b2ed36d8a042f317d20d1b4fe10866e007782b84de0bdd4b894bf1badfb348b1
BLAKE2b-256 checksum
How to use checksums
760e1d0ef23cc28be892c4fb12568c2daa724e1f2d31e8267554fb8ba7d253a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Security for pyofd 0.1.6

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.

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