Skip to content

Commit

Permalink
[upgrade] Client enhanced with new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamdipt committed Nov 25, 2021
1 parent cc2161f commit 22de8d3
Show file tree
Hide file tree
Showing 5 changed files with 27,431 additions and 6 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,25 @@ Or as a dictionary
# One can also use it as context manager
>>>with passboltapi.PassboltAPI(config_path="config.ini") as passbolt:

## Client usage

To get all resources

resources = {
record.username: record
for record in passbolt.list_resources(folder_id=folder_id)
}

To create new resource (optional: folder)

response_created = passbolt.create_new_resource(username, password, folder=passbolt_folder_id)

To move resource to folder

passbolt.move_resource_to_folder(resource_id, folder_id)


### Sample test
Check test.py for an example.

If new keys needs to be imported, then USER_PUBLIC_KEY_FILE and USER_PRIVATE_KEY_FILE settings
Expand Down
Loading

0 comments on commit 22de8d3

Please sign in to comment.