derivitec.core.client.DerivitecClient.create_books¶
- DerivitecClient.create_books(create_book_requests)[source]¶
Create books.
- Parameters:
create_book_requests
- Type:
list of ApiCreateBookRequest
- Return type:
derivitec.core.response.ApiBaseResponse
What follows is an example of creating new books. See
derivitec.positions.request.ApiCreateBookRequestfor more information about the ApiCreateBookRequest class.Code
>>> import uuid >>> create_book_requests = [ ... ApiCreateBookRequest("TestApiBook1", "TestApiBook1", ["Portfolio 18", "Portfolio 13"], ["testuser.api@derivitec.com"]), ... ApiCreateBookRequest("TestApiBook2", "TestApiBook2", ["Portfolio 10"], ["testuser.api@derivitec.com"]) ... ] >>> response = client.create_books(create_book_requests)
We can check the status of the request
>>> response.IsSuccess True