jbeard@jbeard-desktop /tmp/fastly-py-test $ pipenv install
jbeard@jbeard-desktop /tmp/fastly-py-test $ pipenv run python
Python 3.7.3 (default, May 8 2019, 14:42:49)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from fastly import fastly
>>> api = fastly.API()
>>> api.authenticate_by_key('DUMMY')
>>> api.service('DUMMY')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/.venv/lib/python3.7/site-packages/fastly/fastly.py", line 33, in service
return Service.find(self.conn, id=id)
NameError: name 'Service' is not defined
>>>
I believe this can be fixed with an implict import statement in fastly.py:
This module seems to fail to function due to an unresolved import when installed under pipenv
To replicate, using pipenv:
Pipfile:
Steps to replicate:
I believe this can be fixed with an implict import statement in fastly.py: