Skip to content

Commit 246f462

Browse files
committed
Switch to pathlib
1 parent 310d9d4 commit 246f462

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with a
1818
Getting Started
1919
---------------
2020

21-
.. testsetup:: simple
22-
23-
assert False
24-
25-
.. testcode:: simple
21+
.. code:: python
2622
2723
import io
24+
import pathlib
2825
2926
from vws import VWS, CloudRecoService
3027
@@ -43,7 +40,8 @@ Getting Started
4340
)
4441
name = 'my_image_name'
4542
46-
with open('/path/to/image.png', 'rb') as my_image_file:
43+
image = pathlib.Path('high_quality_image.jpg')
44+
with image.open(mode='rb') as my_image_file:
4745
my_image = io.BytesIO(my_image_file.read())
4846
4947
target_id = vws_client.add_target(

0 commit comments

Comments
 (0)