File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## v0.0.9 - 28.Ago.2020
4+ ### Bug fixes
5+ - Fix save_file and save_file_signed to save binary files
6+
37## v0.0.8 - 22.Jun.2020
48### Features
59- Ability to use the timeout parameter of the requests
Original file line number Diff line number Diff line change @@ -100,14 +100,14 @@ def create_many_from_template(client, args={}):
100100 def save_file (self , path ):
101101 url_ = self .url ('{}/file' ).format (self .id )
102102 response = requests .get (url_ , auth = self .client .auth )
103- with open (path , 'w ' ) as file_ :
104- file_ .write (response .text )
103+ with open (path , 'wb ' ) as file_ :
104+ file_ .write (response .content )
105105
106106 def save_file_signed (self , path ):
107107 url_ = self .url ('{}/file_signed' ).format (self .id )
108108 response = requests .get (url_ , auth = self .client .auth )
109- with open (path , 'w ' ) as file_ :
110- file_ .write (response .text )
109+ with open (path , 'wb ' ) as file_ :
110+ file_ .write (response .content )
111111
112112 def save_xml (self , path ):
113113 url_ = self .url ('{}/xml' ).format (self .id )
Original file line number Diff line number Diff line change 77
88setup (
99 name = 'mifiel' ,
10- version = '0.0.8 ' ,
10+ version = '0.0.9 ' ,
1111 description = 'Python API Client library for Mifiel.com' ,
1212 long_description = long_description ,
1313 url = 'http://github.com/mifiel/python-api-client' ,
14- download_url = 'https://github.com/Mifiel/python-api-client/tarball/v0.0.8 ' ,
14+ download_url = 'https://github.com/Mifiel/python-api-client/tarball/v0.0.9 ' ,
1515 author = 'Genaro Madrid' ,
1616 author_email = 'genmadrid@gmail.com' ,
1717 license = 'MIT' ,
You can’t perform that action at this time.
0 commit comments