Skip to content

Commit

Permalink
Package is now on PyPI - mention in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nehpetsde committed Jul 14, 2016
1 parent a1dfdd9 commit f78defc
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@ NDEF Decoder and Encoder for Python

The ``ndeflib`` is a Python package for parsing and generating NFC Data Exchange
Format (NDEF) messages. It is licensed under the `ISCL`_, hosted on `GitHub`_
and soon be available on `PyPI`_.

.. code-block:: pycon
>>> import ndef
>>> hexstr = '9101085402656e48656c6c6f5101085402656e576f726c64'
>>> octets = bytearray.fromhex(hexstr)
>>> for record in ndef.message_decoder(octets): print(record)
NDEF Text Record ID '' Text 'Hello' Language 'en' Encoding 'UTF-8'
NDEF Text Record ID '' Text 'World' Language 'en' Encoding 'UTF-8'
>>> message = [ndef.TextRecord("Hello"), ndef.TextRecord("World")]
>>> b''.join(ndef.message_encoder(message)) == octets
True
and can be installed from `PyPI`_.

>>> import ndef
>>> hexstr = '9101085402656e48656c6c6f5101085402656e576f726c64'
>>> octets = bytearray.fromhex(hexstr)
>>> for record in ndef.message_decoder(octets): print(record)
NDEF Text Record ID '' Text 'Hello' Language 'en' Encoding 'UTF-8'
NDEF Text Record ID '' Text 'World' Language 'en' Encoding 'UTF-8'
>>> message = [ndef.TextRecord("Hello"), ndef.TextRecord("World")]
>>> b''.join(ndef.message_encoder(message)) == octets
True

.. toctree::
:caption: Documentation
Expand Down

0 comments on commit f78defc

Please sign in to comment.