支持使用leanixrestapi开发的功能
leanix-p的Python项目详细描述
LeanIX Python库
从leanix public/leanix python库派生
目前非常基本的功能。在
LeanIX类将执行您的身份验证和令牌管理。它将返回一个包含多个子类的对象:
graph:管理GraphQL资料的类。在
-execGraphQL(query,variables) - Executes GraphQL, returns raw HTTP Response object
-execGraphQLParsed(query,variables) - same as above, but returns a dict with the JSON of the response parsed out
-execGraphQLTrimmed(query,variables) - Same, as parsed, but removes the superfluous "edge" and "node" levels in the dict
#factsheets:用于处理factsheets的类
^{pr2}$#用户:与用户一起工作的类
getUsers: Gets all users into a list
getUsersEmail: Gets all users into a dict with a key of the user's e-mail address
getUserByEmail: Gets a single user based on e-mail
getUsersID: Gets all users into a dict with a key of the user's Account ID (GUID)
getUserByID: Gets a single user by ID
setRole: Sets a user's role by e-mail. Roles are ADMIN,MEMBER,VIEWER, and CONTACT
待办事项:
很多!在
使用
from LeanIX import LeanIX
lix = LeanIX(api_token=api_token,workspaceid=workspaceid,baseurl=baseurl)
# There are three functions available to execute GraphQL against the LeanIX endpoint.
raw = lix.graph.execGraphQL(<query>,<vars>) # Returns the raw HTTP Response object for you to interpret
parsed = lix.graph.execGraphQLParsed(<query>,<vars>) # Reads the response JSON and returns a dict
trimmed = lix.graph.execGraphQLTrimmed(<query>,<vars>) # Takes the "parsed" output and remives the "edges" and "nodes" levesl from the dict
- 项目
标签: