I need to include the Recurly API library into a Django project. The library is on GitHub, and the project is deployed to Heroku. Currently, I have the following added to requirements.txt:
-e git://github.com/recurly/recurly-client-python.git#egg=recurly-client-python
This may work once the app is on heroku (?) but it's not getting picked up when developing locally (running local server via foreman). In my test app's views.py, I have:
import recurly
I get:
Exception Type: ImportError
Exception Value:
No module named recurly
Exception Location: /Users/pete/Documents/code/django/simpleblog/subscriptions/views.py in <module>, line 7
Python Executable: /Users/pete/.virtualenvs/django/bin/python
I'm pretty new to Django/Python, as well as working with APIs in this environment. How should I install & include it, so it works both locally and once deployed? I tried searching online to no avail.
First method:
What you can do is clone the code on your desktop :
and then from this new directory run
(This is how you can install any reusable python app into your environment)
EDIT1:
Second method: simply change requirement.txt
"-e git://github.com/recurly/recurly-client-python.git#egg=recurly-client-python" to "recurly"
If you are new to python and want easy and fast implementation use second one. If you are new to python and want to learn how things work in python use first one, it will help.
EDIT2:
Wanna learn more? Check which version you got installed by these two different methods. ("pip list|grep recurly")