Welcome to python-taiga’s documentation!¶
A module for using the Taiga REST API.
Install¶
pip install python-taiga
Getting Started¶
Getting started with the Taiga API couldn’t be easier. Create a
TaigaAPI and you’re ready to go.
API Credentials¶
The TaigaAPI needs your Taiga credentials. You can pass these
directly to the auth method (see the code below).
from taiga import TaigaAPI
api = TaigaAPI()
api.auth(
username='user',
password='psw'
)
Alternately, you can pass a token to the constructor TaigaAPI
constructor.
from taiga import TaigaAPI
api = TaigaAPI(token='mytoken')
You can also specify a different host if you use Taiga somewhere else
from taiga import TaigaAPI
api = TaigaAPI(
host='http://taiga.my.host.org'
)
Get projects, user stories, task and issues¶
You can get projects, user stories, tasks and issues using the primary key or using slug/ref
new_project = api.projects.get_by_slug('nephila')
print (new_project.get_issue_by_ref(1036))
print (new_project.get_userstory_by_ref(1111))
print (new_project.get_task_by_ref(1112))
Create a project¶
new_project = api.projects.create('TEST PROJECT', 'TESTING API')
Create a new user story¶
userstory = new_project.add_user_story(
'New Story', description='Blablablabla'
)
You can also create a milestone and pass it to a story
jan_feb_milestone = new_project.add_milestone(
'MILESTONE 1', '2015-01-26', '2015-02-26'
)
userstory = new_project.add_user_story(
'New Story', description='Blablablabla',
milestone=jan_feb_milestone.id
)
To add a task to your user story just run
userstory.add_task(
'New Task 2',
new_project.task_statuses[0].id
)
Create an issue¶
newissue = new_project.add_issue(
'New Issue',
new_project.priorities.get(name='High').id,
new_project.issue_statuses.get(name='New').id,
new_project.issue_types.get(name='Bug').id,
new_project.severities.get(name='Minor').id,
description='Bug #5'
)
Create a custom attribute¶
new_project.add_issue_attribute(
'Device', description='(iPad, iPod, iPhone, Desktop, etc.)'
)
newissue.set_attribute('1', 'Desktop')
List elements¶
projects = api.projects.list()
stories = api.user_stories.list()
You can also specify filters
tasks = api.tasks.list(project=1)
Attach a file¶
You can attach files to issues, user stories and tasks
newissue.attach('README.md', description='Read the README in Issue')
Play with instances¶
Instances can have actions, for example you can star a project just calling
new_project = api.projects.create('TEST PROJECT', 'TESTING API')
new_project.star()
Any instance can be updated and deleted
new_project.name = 'New name for my project'
new_project.update()
new_project.delete()
Search¶
Search function returns a SearchResult object, containing tasks, user stories and issues:
projects = api.projects.list()
search_result = api.search(projects[0].id, 'NEW')
for user_story in search_result.user_stories:
print (user_story)
History¶
You can access the history of issues, tasks, userstories and wiki pages:
history = api.history.user_story.get(user_story.id)
TaigaAPI documentation¶
Contents:
-
class
taiga.client.TaigaAPI(host='https://api.taiga.io', token=None, token_type='Bearer')¶ TaigaAPI class
Parameters: - host – the host of your Taiga.io instance
- token – the token you may provide
- token_type – the token type
-
auth(username, password)¶ Authenticate you
Parameters: - username – your username
- password – your password
-
auth_app(app_id, app_secret, auth_code, state='')¶ Authenticate an app
Parameters: - app_id – the app id
- app_secret – the app secret
- auth_code – the app auth code
-
me()¶ Get a
taiga.models.models.Userrepresenting me
-
search(project, text='')¶ Search in your Taiga.io instance
Parameters: - project – the project id
- text – the query of your search
Models documentation¶
Contents:
-
class
taiga.models.models.Attachment(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceAttachment base class
Parameters: - object_id – object_id of the
Attachment - project – project of the
Attachment - attached_file – attached_file of the
Attachment - description – description of the
Attachment - is_deprecated – is_deprecated of the
Attachment
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- object_id – object_id of the
-
class
taiga.models.models.Attachments(requester)¶ Bases:
taiga.models.base.ListResourceAttachments factory base class
-
create(project, object_id, attached_file, **attrs)¶ Create a new
Attachment.Parameters: - project –
Projectid - object_id – id of the current object
- ref –
Taskreference - attached_file – file path that you want to upload
- attrs – optional attributes for the
Attachment
- project –
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.CommentableResource(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceCommentableResource base class
-
add_comment(comment)¶ Add a comment to the current element
Parameters: comment – the comment you want to insert
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.CustomAttribute(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceCustomAttribute base class
Parameters: - requester –
Requesterinstance - name – name of the custom attribute
- description – id of the current object
- order – order of the custom attribute
- project –
Projectid
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- requester –
-
class
taiga.models.models.CustomAttributeResource(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceCustomAttributeResource base class
-
delete()¶ Delete the current
InstanceResource
-
get_attributes()¶ Get all the attributes of the current object
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
set_attribute(id, value, version=1)¶ Set attribute to a specific value
Parameters: - id – id of the attribute
- value – value of the attribute
- version – version of the attribute (default = 1)
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.CustomAttributes(requester)¶ Bases:
taiga.models.base.ListResourceCustomAttributes factory base class
-
create(project, name, **attrs)¶ Create a new
CustomAttribute.Parameters: - project –
Projectid - name – name of the custom attribute
- attrs – optional attributes of the custom attributes
- project –
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.History(*args, **kwargs)¶ Bases:
taiga.models.base.InstanceResourceHistory model
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.HistoryEntity(requester)¶ Bases:
objectHistoryEntity model
-
delete_comment(resource_id, ent_id)¶ Delete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
get(resource_id)¶ Get a history element
Parameters: resource_id – ...
-
undelete_comment(resource_id, ent_id)¶ Undelete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
-
class
taiga.models.models.HistoryIssue(*args, **kwargs)¶ Bases:
taiga.models.models.HistoryEntityHistoryIssue model
-
delete_comment(resource_id, ent_id)¶ Delete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
get(resource_id)¶ Get a history element
Parameters: resource_id – ...
-
undelete_comment(resource_id, ent_id)¶ Undelete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
-
class
taiga.models.models.HistoryTask(*args, **kwargs)¶ Bases:
taiga.models.models.HistoryEntityHistoryTask model
-
delete_comment(resource_id, ent_id)¶ Delete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
get(resource_id)¶ Get a history element
Parameters: resource_id – ...
-
undelete_comment(resource_id, ent_id)¶ Undelete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
-
class
taiga.models.models.HistoryUserStory(*args, **kwargs)¶ Bases:
taiga.models.models.HistoryEntityHistoryUserStory model
-
delete_comment(resource_id, ent_id)¶ Delete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
get(resource_id)¶ Get a history element
Parameters: resource_id – ...
-
undelete_comment(resource_id, ent_id)¶ Undelete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
-
class
taiga.models.models.HistoryWiki(*args, **kwargs)¶ Bases:
taiga.models.models.HistoryEntityHistoryWiki model
-
delete_comment(resource_id, ent_id)¶ Delete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
get(resource_id)¶ Get a history element
Parameters: resource_id – ...
-
undelete_comment(resource_id, ent_id)¶ Undelete a comment
Parameters: - resource_id –
...
- ent_id –
...
- resource_id –
-
-
class
taiga.models.models.Issue(requester, **params)¶ Bases:
taiga.models.models.CustomAttributeResource,taiga.models.models.CommentableResourceIssue model
Parameters: - requester –
Requesterinstance - assigned_to –
Userid this issue is assigned to - description – description of the issue
- is_blocked – set if this issue is blocked or not
- milestone –
Milestoneid - project –
Projectid - status –
Statusid - severity – class:Severity id
- priority – class:Priority id
- type – class:Type id
- subject – subject of the issue
- tags – array of tags
- watchers – array of watchers id
-
add_comment(comment)¶ Add a comment to the current element
Parameters: comment – the comment you want to insert
-
attach(attached_file, **attrs)¶ Attach a file to the
IssueParameters: - attached_file – file path to attach
- attrs – optional attributes for the attached file
-
delete()¶ Delete the current
InstanceResource
-
get_attributes()¶ Get all the attributes of the current object
-
list_attachments()¶ Get a list of
IssueAttachment.
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
set_attribute(id, value, version=1)¶ Set attribute to a specific value
Parameters: - id – id of the attribute
- value – value of the attribute
- version – version of the attribute (default = 1)
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- requester –
-
class
taiga.models.models.IssueAttachment(requester, **params)¶ Bases:
taiga.models.models.AttachmentIssueAttachment model
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.IssueAttachments(requester)¶ Bases:
taiga.models.models.AttachmentsIssueAttachments factory
-
create(project, object_id, attached_file, **attrs)¶ Create a new
Attachment.Parameters: - project –
Projectid - object_id – id of the current object
- ref –
Taskreference - attached_file – file path that you want to upload
- attrs – optional attributes for the
Attachment
- project –
-
instance¶ alias of
IssueAttachment
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.IssueAttribute(requester, **params)¶ Bases:
taiga.models.models.CustomAttributeIssueAttribute model
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.IssueAttributes(requester)¶ Bases:
taiga.models.models.CustomAttributesIssueAttributes factory
-
create(project, name, **attrs)¶ Create a new
CustomAttribute.Parameters: - project –
Projectid - name – name of the custom attribute
- attrs – optional attributes of the custom attributes
- project –
-
instance¶ alias of
IssueAttribute
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.IssueStatus(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceIssue Status model
Parameters: - name – name of the
IssueStatus - color – color of the
IssueStatus - order – order of the
IssueStatus - project – the taiga project of the
IssueStatus - is_closed – is closed property of the
IssueStatus
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- name – name of the
-
class
taiga.models.models.IssueStatuses(requester)¶ Bases:
taiga.models.base.ListResourceIssueStatuses factory
-
instance¶ alias of
IssueStatus
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.IssueType(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceIssueType model
Parameters: -
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.IssueTypes(requester)¶ Bases:
taiga.models.base.ListResourceIssueTypes factory
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.Membership(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceMembership model
Parameters: - email – email of the
Membership - role – role of the
Membership - project – project of the
Membership
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- email – email of the
-
class
taiga.models.models.Memberships(requester)¶ Bases:
taiga.models.base.ListResourceMemberships factory class
-
create(project, email, role, **attrs)¶ Create a new
Membership.Parameters: - project –
Projectid - email – email of the
Membership - role – role of the
Membership - attrs – optional attributes of the
Membership
- project –
-
instance¶ alias of
Membership
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.Milestone(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceMilestone model
Parameters: -
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.Milestones(requester)¶ Bases:
taiga.models.base.ListResourceMilestones factory
-
create(project, name, estimated_start, estimated_finish, **attrs)¶ Create a new
Milestone.Parameters:
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.Point(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceTaiga Point model
Parameters: -
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.Points(requester)¶ Bases:
taiga.models.base.ListResourcePoints factory
-
create(project, name, value, **attrs)¶ Create a new
UserStoryStatus.Parameters:
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.Priorities(requester)¶ Bases:
taiga.models.base.ListResourcePriorities factory class
-
create(project, name, **attrs)¶ Create a new
Priority.Parameters: - project –
Projectid - name – email of the priority
- attrs – optional attributes of the priority
- project –
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.Priority(requester, **params)¶ Bases:
taiga.models.base.InstanceResourcePriority model
Parameters: - name – name of the
Priority - color – color of the class:Priority
- order – order of the class:Priority
- project – project of the class:Priority
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- name – name of the
-
class
taiga.models.models.Project(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceTaiga project model
Parameters: - requester –
Requesterinstance - name – name of the project
- description – description of the project
- creation_template – base template for the project
- is_backlog_activated – name of the project
- is_issues_activated – name of the project
- is_kanban_activated – name of the project
- is_wiki_activated – determines if the project is private or not
- is_private – determines if the project is private or not
- videoconferences – appear-in or talky
- videoconferences_salt – for videoconference chat url generation
- total_milestones – missing
- total_story_points – missing
-
add_issue(subject, priority, status, issue_type, severity, **attrs)¶ Adds a Issue and returns a
Issueresource.Parameters:
-
add_issue_attribute(name, **attrs)¶ Add a new Issue attribute and return a
IssueAttributeobject.Parameters: - name – name of the
IssueAttribute - attrs – optional attributes for
IssueAttribute
- name – name of the
-
add_issue_status(name, **attrs)¶ Add a Issue status to the project and returns a
IssueStatusobject.Parameters: - name – name of the
IssueStatus - attrs – optional attributes for
IssueStatus
- name – name of the
-
add_issue_type(name, **attrs)¶ Add a Issue type to the project and returns a
IssueTypeobject.Parameters:
-
add_membership(email, role, **attrs)¶ Add a Membership to the project and returns a
Membershipresource.Parameters: - email – email for
Membership - role – role for
Membership - attrs – role for
Membership - attrs – optional
Membershipattributes
- email – email for
-
add_milestone(name, estimated_start, estimated_finish, **attrs)¶ Add a Milestone to the project and returns a
Milestoneobject.Parameters: - name – name of the
Milestone - estimated_start – estimated start time of the
Milestone:param estimated_finish: estimated finish time of theParameters: attrs – optional attributes for Milestone- name – name of the
-
add_priority(name, **attrs)¶ Add a Priority to the project and returns a
Priorityobject.Parameters:
-
add_severity(name, **attrs)¶ Add a Severity to the project and returns a
Severityobject.Parameters:
-
add_task_attribute(name, **attrs)¶ Add a new Task attribute and return a
TaskAttributeobject.Parameters: - name – name of the
TaskAttribute - attrs – optional attributes for
TaskAttribute
- name – name of the
-
add_task_status(name, **attrs)¶ Add a Task status to the project and returns a
TaskStatusobject.Parameters: - name – name of the
TaskStatus - attrs – optional attributes for
TaskStatus
- name – name of the
-
add_user_story_attribute(name, **attrs)¶ Add a new User Story attribute and return a
UserStoryAttributeobject.Parameters: - name – name of the
UserStoryAttribute - attrs – optional attributes for
UserStoryAttribute
- name – name of the
-
add_user_story_status(name, **attrs)¶ Add a UserStory status to the project and returns a
UserStoryStatusobject.Parameters: - name – name of the
UserStoryStatus - attrs – optional attributes for
UserStoryStatus
- name – name of the
-
add_wikilink(title, href, **attrs)¶ Add a Wiki link to the project and returns a
WikiLinkobject.Parameters:
-
add_wikipage(slug, content, **attrs)¶ Add a Wiki page to the project and returns a
WikiPageobject.Parameters:
-
delete()¶ Delete the current
InstanceResource
-
import_issue(subject, priority, status, issue_type, severity, **attrs)¶ Import and issue and returns a
Issueresource.Parameters:
-
import_milestone(name, estimated_start, estimated_finish, **attrs)¶ Import a Milestone and returns a
Milestoneobject.Parameters: - name – name of the
Milestone - estimated_start – estimated start time of the
Milestone:param estimated_finish: estimated finish time of theMilestone:param attrs: optional attributes forMilestone- name – name of the
-
import_user_story(subject, status, **attrs)¶ Import an user story and returns a
UserStoryresource.Parameters:
-
import_wikipage(slug, content, **attrs)¶ Import a Wiki page and return a
WikiPageobject.Parameters:
-
issues_stats()¶ Get stats for issues of the project
-
like()¶ Like the project
-
list_issue_attributes()¶ Get the list of
IssueAttributeresources for the project.
-
list_issue_statuses()¶ Get the list of
IssueStatusresources for the project.
-
list_memberships()¶ Get the list of
Membershipresources for the project.
-
list_task_attributes()¶ Get the list of
TaskAttributeresources for the project.
-
list_user_story_attributes()¶ Get the list of
UserStoryAttributeresources for the project.
-
list_user_story_statuses()¶ Get the list of
UserStoryStatusresources for the project.
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
star()¶ Stars the project
Deprecated since version 0.8.5: Update Taiga and use like instead
-
stats()¶ Get the stats of the project
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
unlike()¶ Unlike the project
-
unstar()¶ Unstars the project
Deprecated since version 0.8.5: Update Taiga and use unlike instead
-
update(**args)¶ Update the current
InstanceResource
- requester –
-
class
taiga.models.models.Projects(requester)¶ Bases:
taiga.models.base.ListResourceProjects factory
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.Role(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceRole model
Parameters: -
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.Roles(requester)¶ Bases:
taiga.models.base.ListResourceRoles factory
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.Severities(requester)¶ Bases:
taiga.models.base.ListResourceSeverities factory
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.Severity(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceSeverity model
Parameters: -
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.Task(requester, **params)¶ Bases:
taiga.models.models.CustomAttributeResource,taiga.models.models.CommentableResourceTask model
Parameters: - assigned_to – assigned to property of the
TaskStatus - blocked_note – blocked note of the
TaskStatus - description – description of of the
TaskStatus - version – version of the
TaskStatus - is_blocked – is blocked property of the
TaskStatus - milestone – milestone property of the
TaskStatus - project – the project of the
TaskStatus - user_story – the user story of the
TaskStatus - status – status of the
TaskStatus - subject – subject of the
TaskStatus - tags – tags of the
TaskStatus - us_order – the use order of the
TaskStatus - taskboard_order – the taskboard order of the
TaskStatus - is_iocaine – the is iocaine of the
TaskStatus - external_reference – external reference of the
TaskStatus - watchers – watchers of the
TaskStatus
-
add_comment(comment)¶ Add a comment to the current element
Parameters: comment – the comment you want to insert
-
attach(attached_file, **attrs)¶ Attach a file to the
TaskParameters: - attached_file – file path to attach
- attrs – optional attributes for the attached file
-
delete()¶ Delete the current
InstanceResource
-
get_attributes()¶ Get all the attributes of the current object
-
list_attachments()¶ Get a list of
TaskAttachment.
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
set_attribute(id, value, version=1)¶ Set attribute to a specific value
Parameters: - id – id of the attribute
- value – value of the attribute
- version – version of the attribute (default = 1)
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- assigned_to – assigned to property of the
-
class
taiga.models.models.TaskAttachment(requester, **params)¶ Bases:
taiga.models.models.AttachmentTaskAttachment model
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.TaskAttachments(requester)¶ Bases:
taiga.models.models.AttachmentsTaskAttachments factory
-
create(project, object_id, attached_file, **attrs)¶ Create a new
Attachment.Parameters: - project –
Projectid - object_id – id of the current object
- ref –
Taskreference - attached_file – file path that you want to upload
- attrs – optional attributes for the
Attachment
- project –
-
instance¶ alias of
TaskAttachment
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.TaskAttribute(requester, **params)¶ Bases:
taiga.models.models.CustomAttributeTaskAttribute model
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.TaskAttributes(requester)¶ Bases:
taiga.models.models.CustomAttributesTaskAttributes factory
-
create(project, name, **attrs)¶ Create a new
CustomAttribute.Parameters: - project –
Projectid - name – name of the custom attribute
- attrs – optional attributes of the custom attributes
- project –
-
instance¶ alias of
TaskAttribute
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.TaskStatus(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceTask Status model
Parameters: - name – the name of the
TaskStatus - color – the color of the
TaskStatus - order – the order of the
TaskStatus - project – the project of the
TaskStatus - is_closed – the is closed property of the
TaskStatus
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- name – the name of the
-
class
taiga.models.models.Tasks(requester)¶ Bases:
taiga.models.base.ListResourceTasks factory
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.User(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceUser model
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.UserStories(requester)¶ Bases:
taiga.models.base.ListResourceUserStories factory class
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.UserStory(requester, **params)¶ Bases:
taiga.models.models.CustomAttributeResource,taiga.models.models.CommentableResourceUser Story model
Parameters: - assigned_to – assigned to of the
UserStory - backlog_order – backlog order of the
UserStory - blocked_note – blocked note of the
UserStory - version – version of the
UserStory - client_requirement – client requirement of the
UserStory - description – description of the
UserStory - is_blocked – is blocked of the
UserStory - kanban_order – kanban order of the
UserStory - milestone – milestone of the
UserStory - points – points of the
UserStory - project – project of the
UserStory - sprint_order – sprint order of the
UserStory - status – status of the
UserStory - subject – subject of the
UserStory - tags – tags of the
UserStory - team_requirement – team requirement of the
UserStory - watchers – watchers of the
UserStory
-
add_comment(comment)¶ Add a comment to the current element
Parameters: comment – the comment you want to insert
-
add_task(subject, status, **attrs)¶ Add a
Taskto the currentUserStoryand return it. :param subject: subject of theTask:param status: status of theTask:param attrs: optional attributes forTask
-
attach(attached_file, **attrs)¶ Attach a file to the
UserStoryParameters: - attached_file – file path to attach
- attrs – optional attributes for the attached file
-
delete()¶ Delete the current
InstanceResource
-
get_attributes()¶ Get all the attributes of the current object
-
list_attachments()¶ Get a list of
UserStoryAttachment.
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
set_attribute(id, value, version=1)¶ Set attribute to a specific value
Parameters: - id – id of the attribute
- value – value of the attribute
- version – version of the attribute (default = 1)
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- assigned_to – assigned to of the
-
class
taiga.models.models.UserStoryAttachment(requester, **params)¶ Bases:
taiga.models.models.AttachmentUserStoryAttachment class
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.UserStoryAttachments(requester)¶ Bases:
taiga.models.models.AttachmentsUserStoryAttachments factory class
-
create(project, object_id, attached_file, **attrs)¶ Create a new
Attachment.Parameters: - project –
Projectid - object_id – id of the current object
- ref –
Taskreference - attached_file – file path that you want to upload
- attrs – optional attributes for the
Attachment
- project –
-
instance¶ alias of
UserStoryAttachment
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.UserStoryAttribute(requester, **params)¶ Bases:
taiga.models.models.CustomAttributeUserStoryAttribute model
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.UserStoryAttributes(requester)¶ Bases:
taiga.models.models.CustomAttributesUserStoryAttributes factory
-
create(project, name, **attrs)¶ Create a new
CustomAttribute.Parameters: - project –
Projectid - name – name of the custom attribute
- attrs – optional attributes of the custom attributes
- project –
-
instance¶ alias of
UserStoryAttribute
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.UserStoryStatus(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceTaiga User Story Status model
Parameters: - color – the color of the
UserStoryStatus - is_closed – closed property of the
UserStoryStatus - name – The name of the
UserStoryStatus - order – order of the
UserStoryStatus - project – the Taiga project of the
UserStoryStatus - wip_limit – wip limit of the
UserStoryStatus
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- color – the color of the
-
class
taiga.models.models.Users(requester)¶ Bases:
taiga.models.base.ListResourceUsers factory class
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.WikiAttachment(requester, **params)¶ Bases:
taiga.models.models.AttachmentWikiAttachment model
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
-
-
class
taiga.models.models.WikiAttachments(requester)¶ Bases:
taiga.models.models.AttachmentsWikiAttachments factory
-
create(project, object_id, attached_file, **attrs)¶ Create a new
Attachment.Parameters: - project –
Projectid - object_id – id of the current object
- ref –
Taskreference - attached_file – file path that you want to upload
- attrs – optional attributes for the
Attachment
- project –
-
instance¶ alias of
WikiAttachment
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.WikiLink(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceWikiLink model
Parameters: - project –
Projectid - title – title of the wiki link
- href – href for the wiki link
- order – order of the wiki link
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- project –
-
class
taiga.models.models.WikiLinks(requester)¶ Bases:
taiga.models.base.ListResourceWikiLinks factory
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-
-
class
taiga.models.models.WikiPage(requester, **params)¶ Bases:
taiga.models.base.InstanceResourceWikiPage model
Parameters: - project –
Projectid - slug – slug of the wiki page
- content – content of the wiki page
- watchers – list of watchers id
-
attach(attached_file, **attrs)¶ Attach a file to the
WikiPageParameters: - attached_file – file path to attach
- attrs – optional attributes for the attached file
-
delete()¶ Delete the current
InstanceResource
-
parse(requester, entry)¶ Turns a JSON object into a model instance.
-
patch(fields, **args)¶ Patch the current
InstanceResource
-
to_dict()¶ Get a dictionary representation of
InstanceResource
-
update(**args)¶ Update the current
InstanceResource
- project –
-
class
taiga.models.models.WikiPages(requester)¶ Bases:
taiga.models.base.ListResourceWikiPages factory
-
parse(requester, entries)¶ Parse a JSON array into a list of model instances.
-
parse_list(entries)¶ Parse a JSON array into a list of model instances.
-