GithubHelp home page GithubHelp logo

Comments (5)

lindsay-stevens avatar lindsay-stevens commented on June 23, 2024

Could you elaborate on what system you're using, how you installed the package, and what you would like to do? To be honest I'm not sure what to make of the error message either - is that a strace output?

How to get started

Assuming you're also new to Python, and can't quite get started, the following is how to. I can't promise to be able to give this level of support in future but anyway here we go.

Start with making a workspace for your project, create a Python virtual environment to keep libraries from clashing across projects, and activate the virtual environment. The following does this with a folder named "lime_test" in your home directory.

Linux:

mkdir -p ~/lime_test
cd ~/lime_test
python3 -m venv venv
source ~/lime_test/venv/bin/activate

Windows:

set "test=%HOMEDRIVE%%HOMEPATH%\lime_test"
mkdir "%test%"
cd "%test%"
C:/Full/Path/To/Your/Python3/python.exe -m venv venv
call "%test%"\venv\Scripts\activate"

Next steps depend on whether you want to work on limesurveyrc2api itself, or just use it in some other project.

Just using it

To just use it, install the package from GitHub, install the requests dependency, and off you go:

pip install https://github.com/lindsay-stevens/limesurveyrc2api/archive/master.zip
pip install requests

Then make a silly script to check imports work OK. Create a file named "my_script.py" with the following contents:

from limesurveyrc2api.limesurvey import LimeSurvey

api = LimeSurvey(url="nothing", username="nothing")

print(api)
print("yep OK")

Then run it:

python my_script.py

Should print out something like this:

<limesurveyrc2api.limesurvey.LimeSurvey object at 0x0000000002859198>
yep OK

Work on LSRC2API

If you want to work on the project, you'll want to clone the repository then install the dependencies in one hit. Assuming you have git on your path, you can clone it into a folder called "repo" like this:

git clone https://github.com/lindsay-stevens/limesurveyrc2api repo

Alternatively, go to the project home page, click "Clone or download" then "Download zip". Unzip that file into your repo folder.

This next step assumes your terminal session from earlier is still open, with the virtual environment still active. You can tell if it is, if the command prompt says "(venv)" at the start.

cd repo
pip install -r requirements.txt

Then you can modify the project, add changes, etc.

Note

If you want to "deactivate" the virtual environment so that you can work on something else, just type "deactivate" and hit Enter.

from limesurveyrc2api.

dmccullo avatar dmccullo commented on June 23, 2024

Thanks I will try these today.
dtruss is a strace like tool for OSX
I am running on OS X.

I installed by git clone your project then
CD to the directory.

ran python3 setup.py install

there are several recommendations that may help above I will let you know.

I am migrating several Python scripts that grab data from Fluid surveys to use LimeSurvey as we are migrating off of fluid surveys...

Very little documentations on the Lime survey API LOL

Thanks so much for the quick response!

from limesurveyrc2api.

dmccullo avatar dmccullo commented on June 23, 2024

Ok
`from limesurveyrc2api.limesurvey import LimeSurvey

api = LimeSurvey(url="nothing", username="nothing")

print(api)
print("yep OK")`
works

<limesurveyrc2api.limesurvey.LimeSurvey object at 0x10217a278>
yep OK

so off to trying to get the coding done HEHE

do you know of a goo source of details on how the api calls work?

thanks

Don

from limesurveyrc2api.

lindsay-stevens avatar lindsay-stevens commented on June 23, 2024

No problem. I'll close this one out but feel free to open another for other issues.

For working with the API, check out the references linked in the readme which is everything I'm aware of.

For working with this client library, each API function has a docstring describing the input arguments.

For both, I don't think there's documentation of the data structures you'll get back from API calls, but if you'd like to add that in a PR it'd be welcome.

from limesurveyrc2api.

dmccullo avatar dmccullo commented on June 23, 2024

I am working on getting the code worked out!

I would gladly provide some code examples to add to the documentation!

let me know if you would like me to provide details as i work them out :-)

from limesurveyrc2api.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.