UA-Clarity-API
Provides a simple REST implementation for use with Clarity endpoints.
Motivation
Was designed to implement a simple way to interact with Clarity REST architecture.
Features
- Get will do a batch get if that end point exists, otherwise it will return a response similar to what a batch get returns.
- Caller can add queries to get using a keyword.
- Caches every get to eliminate excessive get calls.
- All REST calls will throw an exception if they failed.
Code Example
from ua_clarity_api import ua_clarity_api
api = ua_clarity_api.ClarityApi(host, username, password)
uris_files = api.download_files("some file uri")
data = api.get("some endpoint")
Installation
pip install ua-clarity-api
Tests
pip install --update nose
cd ./repo
cd ./tests
nosetests test_ua_clarity_api.py
How to Use
- You'll need to instantiate a ClarityApi object with a correct host, and the username/password to access that host's endpoints.
- Get can retrieve resources from endpoints and can utilize queries with the "parameters" keyword.
- Put and Post can update or create new resources given the appropriate endpoint and a well-formed payload.
- Delete can remove a resource from an endpoint.
- Download_files will create temporary files from a list of file uris and returns them as a dictionary mapping of uri: tempfile.
Credits
sterns1 raflopjr RyanJohannesBland
License
MIT
Metadata
Release files for ua-clarity-api 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ua_clarity_api-1.1.6.tar.gz | 8.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ua_clarity_api-1.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.5 kB
Release files / ua_clarity_api-1.1.6.tar.gz
| Download URL | ua_clarity_api-1.1.6.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd580b8bd8e5eaf05807074f71a93f6d98f5cea3cc02a04d7f90b146bfb02eef
|
|
BLAKE2b-256 checksum How to use checksums |
eae902fabef493b6de22d98f09619ea87a4dbff00487b5b1186c8307ba923d77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-39-generic
|
Release files / ua_clarity_api-1.1.6-py3-none-any.whl
| Download URL | ua_clarity_api-1.1.6-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf818b58fe1ca391ed8305bd0d150efd599f4a5704ddec1729c3344991ddf008
|
|
BLAKE2b-256 checksum How to use checksums |
d9a6f40d39fc7ba72f7315381ab0e30b0309617839382cc9a5b8016a5351c3b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.11.7 Linux/6.2.0-39-generic
|
Security for ua-clarity-api 1.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.