Installation¶
Prerequisites¶
To get started, you’ll need to get an account at Groupme.com.
Got it? Great!
Now you’ll need to obtain your access token so you can make API requests:
- Login to the developer portal.
- Click the “Access Token” button on the top menu bar.
- Your access token is displayed in bold text.
You must also create a key file.
- Paste your access token into a new file.
- Save it as
.groupy.key
in your user’s home directory.
Lastly, ensure you’re running Python >= 3! Now you’re ready to install Groupy!
Instructions¶
Below are instructions for various ways of performing installation.
Using pip
¶
$ pip install GroupyAPI
From Source¶
Basic Steps¶
- Download Groupy from GitHub.
- Copy the
groupy
directory (Groupy/groupy
) into your package directory forPython3
.
Note
Your package directory may be elsewhere. For help determining the correct location, see this StackOverflow question.
With git
¶
If you have git
, it’s as easy as:
$ git clone https://github.com/rhgrant10/Groupy.git
$ cd Groupy
$ cp -r groupy /usr/lib/python3/dist-packages # see note above
Without git
¶
If you don’t have git
installed, ask yourself why?
If you’re satisfied with your answer to that question and you’re still reading
this section, fine. You don’t need git
. You can download it as a ZIP file.
Installation is a simple matter of unzipping the file and copying over the
groupy
directory to your Python3
package directory.
$ wget https://github.com/rhgrant10/Groupy/archive/master.zip
$ unzip master.zip
$ cd Groupy-master
$ cp -r groupy /usr/lib/python3/dist-packages # see note above
Note
This is the least-recommended means of installing a python package!
For Development¶
So, you want to improve Groupy? Awesome! The easiest way to get started is by cloning the repository and then pip installing in development mode:
$ git clone git clone https://github.com/rhgrant10/Groupy.git
$ cd Groupy
$ pyvenv env
$ souce env/bin/activate
$ pip install -r requirements.txt && pip install -r testing_requirements.txt
$ pip install -e .
Now you’re all set to start hacking on the code. You probably want to see how the existing tests are doing:
$ tox
Note
You do not need an API token to run tests.
Troubleshooting¶
Sometimes things go wrong. Here are some common things to check when encountering problems after installing.
- It says no such package when I import groupy...
- Check whether you copied the
groupy
package into the correct python package directory. It must be a directory on yoursys.path
. - I get an unauthorized error when I try to do anything...
Check whether your key file (
.groupy.key
by default) contains your API token, and that the value forKEY_LOCATION
ingroupy.config
correctly specifies the location and name of your key file.>>> import groupy >>> groupy.config.KEY_LOCATION '~/.groupy.key'
- I get a weird error when installing Groupy... something about compiling Pillow...
Make sure you’ve installed the developer packages for python. On debian systems:
$ sudo apt-get install python-dev python3.4-dev