We provide a Python library that can be used to interact with the Blue API. This has 100% coverage of the Blue API with type safety and code completion in any modern IDE.
You can install by running:
pip install bluepm
You can then import and use the library in your code:
from bluepm import BlueAPIClient
You can set your authentication details either as environment variables
To use environment variables, set the following before running your script:
Or, pass them directly to the BlueAPIClient constructor:
client = BlueAPIClient(
token_id="your_token_id",
secret_id="your_secret_id",
company_id="your_company_id" #optional
project_id = "your_project_id" #optional
)
Once you have done this, you can use the library to interact with the Blue API. We have some helpers to simplify common tasks, but the entire API is exposed to allow for any interaction you need.
For example, to get a list of all projects you have access to, you can use the following code:
projects = client.projects.list(company_id)
To get a list of lists for a project, you can use the following code:
todo_lists = client.get_todo_lists(project_id)