Skip to main content

vvrest

A Python REST client library for accessing VisualVault.

install

pip3 install vvrest

getting started

  • The Vault class handles authentication.
  • Services mapping to the different endpoints live in the services namespace. For example if one wishes to interact with the /api/v1/documents endpoint, then import DocumentService or for /api/v1/files import FileService, etc.
  • Now credentials need to be defined so VisualVault knows who one is.
  • url is the base url for the instance of VisualVault (example below). NOTE: do not leave a trailing '/' at the end of the url.
  • customer_alias and database_alias are the customer and database one wishes to connect to.
  • client_id and client_secret can be found on the users page in the central admin section of VisualVault. The first APIKEY is client_id and the second APIKEY is the client_secret.
  • Each service class in services takes an instance of Vault as a required parameter.
  • The code example below demonstrates requesting documents.
from vvrest.vault import Vault
from vvrest.services.document_service import DocumentService

# define credentials
url = 'https://demo.visualvault.com'
customer_alias = 'test_customer'
database_alias = 'test_database'
client_id = '12344b69-cd52-4444-815a-1234ec0fb5ef'
client_secret = 'PouE/GLZ7pjFoqRRyu9L8K3EjTXXdf56sY/FxPaaxxU='

# get vault object (authenticate)
vault = Vault(url, customer_alias, database_alias, client_id, client_secret)

document_service = DocumentService(vault)  # instantiate a service class (DocumentService)
documents = document_service.get_documents("folderPath='/test'")  # request documents
  • documentation coming soon.
  • refer to the VVRestTestSuite in the tests directory for more examples.

For more information on any of the endpoints, data types, or anything referring to the VisualVault REST API please refer to the HTTP API section at http://developer.visualvault.com where each endpoint and there parameters are covered in great detail.

unittest coverage

..........................................................
----------------------------------------------------------------------
Ran 58 tests in 72.792s

OK

Name                                     Stmts   Miss  Cover   Missing
----------------------------------------------------------------------
vvrest/__init__.py                           0      0   100%
vvrest/constants.py                         33      0   100%
vvrest/services/__init__.py                  0      0   100%
vvrest/services/auth_service.py             27      0   100%
vvrest/services/document_service.py         93      0   100%
vvrest/services/email_service.py            11      0   100%
vvrest/services/file_service.py             32      5    84%   31-36
vvrest/services/folder_service.py           73     11    85%   99-104, 192-205
vvrest/services/form_service.py            119     16    87%   178-183, 220-225, 234-238, 250, 268
vvrest/services/group_service.py            49      1    98%   17
vvrest/services/index_field_service.py      30      0   100%
vvrest/services/site_service.py             35      0   100%
vvrest/services/user_service.py             46      1    98%   17
vvrest/token.py                              5      0   100%
vvrest/utilities.py                          8      0   100%
vvrest/vault.py                             39      0   100%
----------------------------------------------------------------------
TOTAL                                      600     34    94%                                   594     34    94%

Metadata

Release files for vvrest 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vvrest 1.8.0
File Size Uploaded
vvrest-1.8.0.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vvrest 1.8.0
File Interpreter ABI Platform
vvrest-1.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.3 kB

Release files / vvrest-1.8.0.tar.gz

Download URL vvrest-1.8.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9395b799afc3c2723192b3e1fee758ab2c97da81e02a0accae2a7992c520ba55
BLAKE2b-256 checksum
How to use checksums
da9a30bcefab51e2079f7bedf376617ff730bf761a55c72079cdd4eba1f17efd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.2

Release files / vvrest-1.8.0-py3-none-any.whl

Download URL vvrest-1.8.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3471a4700505c4a34412da63303b3731b0b8ae5f7706624a91516d19a73b7a30
BLAKE2b-256 checksum
How to use checksums
ed7c2f58f5d754c9b1d3b92f531cb68f5b4c152ffedfbf8acbfad13276edb03e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.8.0 This release

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page