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:

  1. Login to the developer portal.
  2. Click the “Access Token” button on the top menu bar.
  3. Your access token is displayed in bold text.

You must also create a key file.

  1. Paste your access token into a new file.
  2. 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

  1. Download Groupy from GitHub.
  2. Copy the groupy directory (Groupy/groupy) into your package directory for Python3.

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 your sys.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 for KEY_LOCATION in groupy.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