Special QR Codes
Generation of special-purpose text for Qr codes.
- class pyqrcodeng.qrspecial.QrGeolocation(lat=None, lon=None, query=None)[source]
QrSpecial-derived geolocation.
- classmethod from_str(text, strict=True, strip=True)[source]
Construct a QrSpecial object from its QR-ready text.
This is conceptually the inverse operation of the ‘to_str’ method.
- Args:
text (str|unicode): The input text. strict (bool): Raises an error if tags are missing. strip (bool): Strip from whitespaces before parsing.
- Returns:
obj (QrSpecial): The QrSpecial object.
- class pyqrcodeng.qrspecial.QrMeCard(name=None, reading=None, tel=None, telav=None, email=None, memo=None, birthday=None, address=None, url=None, nickname=None, company=None)[source]
QrSpecial-derived contact information (MeCard).
- class pyqrcodeng.qrspecial.QrShortMessage(number=None, text=None)[source]
QrSpecial-derived short message (SMS).
- class pyqrcodeng.qrspecial.QrSpecial(**kws)[source]
Special-purpose text for QR codes.
Implements the special text generated by the ZXing project for QR codes. Likely, these are correctly handled by software using the this library.
Of note:
the Event special text is not supported here, but it can be handled by using the icalendar package [https://pypi.python.org/pypi/icalendar].
the vCard contact format is not supported here (only MeCard), but a number of packages for handling vCards are available in PyPI.
- classmethod from_str(text, strict=True, strip=True)[source]
Construct a QrSpecial object from its QR-ready text.
This is conceptually the inverse operation of the ‘to_str’ method.
- Args:
text (str|unicode): The input text. strict (bool): Raises an error if tags are missing. strip (bool): Strip from whitespaces before parsing.
- Returns:
obj (QrSpecial): The QrSpecial object.