A Python REST client library for accessing VisualVault.
Project description
vvrest
A Python REST client library for accessing VisualVault.
install
pip3 install vvrest
getting started
- The
Vaultclass handlesauthentication. - Services mapping to the different
endpointslive in theservicesnamespace. For example if one wishes to interact with the/api/v1/documentsendpoint, then importDocumentServiceor for/api/v1/filesimportFileService, etc. - Now credentials need to be defined so
VisualVaultknows who one is. urlis the base url for the instance ofVisualVault(example below). NOTE: do not leave a trailing '/' at the end of theurl.customer_aliasanddatabase_aliasare the customer and database one wishes to connect to.client_idandclient_secretcan be found on the users page in thecentral adminsection ofVisualVault. The firstAPIKEYisclient_idand the secondAPIKEYis theclient_secret.- Each service class in
servicestakes an instance ofVaultas a required parameter. - The
code examplebelow demonstrates requestingdocuments.
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
VVRestTestSuitein thetestsdirectory 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
Name Stmts Miss Cover Missing
----------------------------------------------------------------------
vvrest/__init__.py 0 0 100%
vvrest/constants.py 32 0 100%
vvrest/services/__init__.py 0 0 100%
vvrest/services/auth_service.py 27 0 100%
vvrest/services/document_service.py 80 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 43 1 98% 17
vvrest/token.py 5 0 100%
vvrest/utilities.py 8 0 100%
vvrest/vault.py 39 0 100%
----------------------------------------------------------------------
TOTAL 583 34 94%
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vvrest-1.6.0.tar.gz.
File metadata
- Download URL: vvrest-1.6.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
705029ddca644d669005dc4d948ee581c0f3c81c68041736443849f66e1dcd62
|
|
| MD5 |
313af35513d4e6f7806e2cb6ab0e7d21
|
|
| BLAKE2b-256 |
94c3d83385be04649620d0a9ecbda4627cc6c7d80e1f4117e4977209ce4bc060
|
File details
Details for the file vvrest-1.6.0-py3-none-any.whl.
File metadata
- Download URL: vvrest-1.6.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cd36b1ea0300ca8d8fa606842a2b427468b7ab28412dd24c6bf9bec469cdaa2
|
|
| MD5 |
6ab1effc01b7112c940ea5ecf83a2808
|
|
| BLAKE2b-256 |
e09d261c96ff1b2206590efdb139a0b36563228c00e69a69b7cc59f790960290
|