Wiki

Case Status Kiln
Register Log In

Wiki

 
Quick Start Guide»Installing Python and FogBugzP…
  • RSS Feed

Last modified on 10/14/2016 1:23 PM by User.

Tags:

Installing Python and FogBugzPy

´╗┐If you already have Python and Mercurial installed, all you need to do is clone https://developers.kilnhg.com/Repo/FogBugz/Group/FogBugzPy to your local machine and run python setup.py install from the FogBugzPy directory.

Windows

Install Python

Download and install Python. FogBugzPy works with either Python 2 or Python 3 and has been tested with Python 2.7.10 and Python 3.5.2. We recommend grabbing the windows MSI Installer available here: 

You should now be able to run python from the command prompt to bring up the interpreter:

FogBugzPy

FogBugzPy is a library we wrote for interacting with the FogBugz XML API via Python. You can get it either by cloning the FogBugzPy Kiln repository using Mercurial or by using the Python Package Index (PyPi).

PIP

FogBugzPy is now available on PyPi. If you have Pip installed, you can install it from the command line via 

pip install fogbugz

This is the easiest way to install FogBugzPy. The latest distributions of Python all come with pip. If you don't have pip already installed, you can follow the instructions in http://stackoverflow.com/a/12476379/864027 to install it.

If you run into difficulties when installing FogBugzPy with pip, see Problems installing FogBugzPy with pip

If you use pip to install FogBugzPy, you're all set. If you want an alternative method, read on:

Install Mercurial

If you already have Mercurial installed, skip this step. There are two ways to install Mercurial:

Install Kiln Client and Tools (preferred)

If you're a Kiln user, install the Kiln Client and Tools. This is the best way to get Mercurial for your Windows machine, especially if you are working with Kiln. From within Kiln, Resources > Kiln Client and Tools. Download and install the tools per the instructions on the page. This will automatically install Mercurial.

Install Mercurial by itself

If you're not using Kiln, you can get Mercurial directly from the website at http://mercurial.selenic.com/downloads/. As of this writing, the current version of Mercurial is 1.9.2 and we recommend using the Inno Setup Installer. At the end of the installer, be sure to leave the box checked that adds Mercurial to your path.

Clone FogBugzPy

Now that you have Mercurial installed, you can clone FogBugzPy to your local machine. In this example, we'll clone FogBugzPy to C:\code\FogBugzPy on your machine, so if you want to follow along, you will need to create a C:\code directory if it doesn't already. Run the following from the command line:

> hg clone https://developers.kilnhg.com/Repo/FogBugz/Group/FogBugzPy C:\code\FogBugzPy

Install FogBugz Python module

Install the FogBugzPy module by running the following from the FogBugzPy directory:

C:\code\FogBugzPy>python setup.py install

By installing the FogBugz python module, you don't need to tell Python where the library is every time you want to write a Python script that uses FogBugzPy. All you will need to do is add the following to the top of your Python script file:

from fogbugz import FogBugz