6

I would like to use the following sdk in my python project -> https://github.com/LBank-exchange/lbank-api-sdk-v2. It has sdk's for 3 languages (I just want the python one). I tried to install it using the command:

pip install git+https://github.com/LBank-exchange/lbank-api-sdk-v2.git#egg=lbank

which gave the error

does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

martineau
  • 119,623
  • 25
  • 170
  • 301
Sanstroke
  • 75
  • 1
  • 5
  • 1
    Does this answer your question? [How to install Python module without setup.py?](https://stackoverflow.com/questions/9714635/how-to-install-python-module-without-setup-py) – Gino Mempin Dec 15 '21 at 10:23
  • that folder is a python package. can just dump it in pwd or on pythonpath and import... – Abel Dec 15 '21 at 10:24

2 Answers2

4

Looks like the developer didn't bother to package it properly. It it was me using it, I would fork it on GH, add the setup.py and use the fork. Maybe a good exercise for you?

Meanwhile, to just get it to work, in your project "root":

git clone https://github.com/LBank-exchange/lbank-api-sdk-v2.git
ln -s lbank-api-sdk-v2/python-sdk-api/LBank ./LBank

Then in your code just import LBank. This will leave the cloned repo untouched (so you can git pull to update it later) and just link the module directory to the root. Alternatively you can just include the api directory in sys.path for imports to work.

vaizki
  • 1,678
  • 1
  • 9
  • 12
2

Think there is nothing to install, if you want to be able to "import" and use it like other packages you install through pip install you can just add the folder to your sys-path:

import sys
sys.path.append("path")
Ch Ma
  • 21
  • 2