Unofficial CodeBase Python API client wrapper
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit ahead, 21 commits behind igniteflow:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Codebase API Python Client

A Python client providing read/write access to the Codebase API with a small, but powerful, CLI.


pip install -U git+git://


  • After pip install the codebase command is availably globally

To use the command-line interface, create a file called .codebase in your home directory and add your Codebase username and apikey (found in your Codebase settings page) in the following JSON format:

    "CODEBASE_USERNAME": "foo/bar",
    "CODEBASE_APIKEY": "4ofh783o4hf78o4fh4o"

You can now explore the API. To see the available methods:


To view all categories for a project and see the response in the terminal:

codebase [project] categories

Or search:

codebase [project] search [search term]

The CLI can call any function in the CodeBaseAPI class using the syntax:

codebase [project] [function name] *[args]

Use the client in your code

from codebase.client import CodeBaseAPI

codebase = CodeBaseAPI(username='walter-white', apikey='84gf6479gf674gf', project='MyProject')

# get all notes for a ticket
notes = codebase.notes(ticket_id=1) # notes returned as a Python dict

# update the status of a ticket (see
note_data = {
    'ticket_note': {
        u'content': u'This is the note comment',
        u'changes': {
            u'status_id': u'1631923',
codebase.add_note(ticket_id=1, data=note_data)


By default, data is given and returned as Python dicts. To get the raw requests.Response object, just set CodeBaseAPI.DEBUG to True.