Fixerio access_key is an unexpected argument

120 Views Asked by At

Couldn't find an answer online. Hope you can help.

Im running this simple code which I've got from Fixer.io (https://fixerio.readthedocs.io/en/latest/)

from fixerio import Fixerio

API_KEY = '3655f3.......'
fxrio = Fixerio(access_key=API_KEY)
print(fxrio.latest())

And it returns

builtins.TypeError: init() got an unexpected keyword argument 'access_key'

API Key is alright as it works when I do the same using requests

Python 3.9.4 Fixerio 2.10.0

Am I missing anything? Appreciate your help!

1

There are 1 best solutions below

0
On BEST ANSWER

It looks as if the last version of fixerio uploaded to PyPI was version 0.1.1, whereas the documentation you are reading is for version 1.0.0-alpha. This version has yet to make it to PyPI.

There is an issue on the project GitHub site asking about a 1.0.0 release to PyPI, but that was raised over three years ago and at the time of writing remains open.

If you really wanted to use this module, you would need to get hold of the source of the 1.0.0-alpha version and include it directly in your project, rather than installing it from PyPI. However, it would probably be better to consider an alternative fixer.io library that is still maintained, as opposed to this one, which looks to have been abandoned.