Skip to content

Commit 2637f54

Browse files
author
Hugo Osvaldo Barrera
committed
Update supported pythons
1 parent 0335d14 commit 2637f54

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

README.rst

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,22 @@ Python standard lib. The barcodes are created as SVG objects.
2222

2323
Please report any bugs at https://github.com/WhyNotHugo/python-barcode/issues
2424

25+
Features
26+
--------
2527

26-
Requirements
27-
------------
28-
29-
- Setuptools/distribute for installation.
30-
- Python 3.5 or above
31-
- Program to open SVG objects (your browser should do it)
32-
- Optional: Pillow to render barcodes as images (PNG, JPG, ...)
33-
28+
- Works on Python 3.5 to 3.8
29+
- No visualiser (just use your browser)
30+
- Generate barcodes as images (png, jpeg, etc). Requires Pillow.
3431

3532
Installation
3633
------------
3734

38-
The best way is to use pip: ``pip install python-barcode``.
35+
The best way is to use pip: ``pip install python-barcode``. Don't forget to add
36+
this to our app's dependencies.
3937

4038
If you'll be exporting to images (eg: not just SVG), you'll need additional
4139
optional dependencies, so run: ``pip install python-barcode[images]``.
4240

43-
4441
Provided Barcodes
4542
-----------------
4643

@@ -56,16 +53,24 @@ Provided Barcodes
5653
* Code 128
5754
* PZN
5855

59-
60-
Todo
61-
----
62-
63-
- Add documentation
64-
- Add more codes
56+
PRs for other code formats are welcome!
6557

6658
Usage
6759
-----
6860

61+
Programmatic::
62+
63+
from barcode import EAN13
64+
from barcode.writer import ImageWriter
65+
66+
# print to a file-like object:
67+
rv = BytesIO()
68+
EAN13(str(100000902922), writer=ImageWriter()).write(rv)
69+
70+
# or sure, to an actual file:
71+
with open('somefile.jpeg', 'wb') as f:
72+
EAN13('100000011111', writer=ImageWriter()).write(f)
73+
6974
Interactive::
7075

7176
>>> import barcode

0 commit comments

Comments
 (0)