What is lfview-api-client?
This library is used to login to and interact with the LF View API in a Python environment. It simplifies uploading and downloading API resource types, including
Files, e.g. Arrays and Images
3D Spatial Objects, e.g. PointSets, Surfaces, etc.
Slides and Feedback, including 3D scene representation
Installation
You may install this library using pip with
pip install lfview-api-client
or from Github
git clone https://github.com/seequent/lfview-api-client.git
cd lfview-api-client
pip install -e .
Quickstart
After installing, you may build LF View spatial resources in Python
from lfview.resources import files, spatial
point_set = spatial.ElementPointSet(
name='Example PointSet Element',
vertices=files.Array([
[0., 0, 0],
[1, 1, 1],
[2, 2, 2],
]),
data=[
spatial.DataBasic(
name='Example PointSet Attribute',
array=files.Array([-10., 0, 10]),
location='nodes',
),
]
)
Then, with your resources, create a View
from lfview.resources import manifests
view = manifests.View(
name='Example View',
elements=[
point_set,
],
)
Next, sign up on LF View if you do not yet have an account. Once you have signed up, generate an API key. With your API key, login and upload your View.
from lfview.client import Session
session = Session('your-api-key')
session.upload(view)
Metadata
Release files for lfview-api-client 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lfview-api-client-0.1.2.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lfview_api_client-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.0 kB
Release files / lfview-api-client-0.1.2.tar.gz
| Download URL | lfview-api-client-0.1.2.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5241cd23390219d6e5c14847cc8e1da23f8975d1329fc6b5c242030c061c1e6a
|
|
BLAKE2b-256 checksum How to use checksums |
e97b6de221cbb2c8fe0c07b15cd0a4ac1e96b1ce48415f323adff56954a86542
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
|
Release files / lfview_api_client-0.1.2-py3-none-any.whl
| Download URL | lfview_api_client-0.1.2-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cebe79bb1013407677b9286477a51bc8dab7d1362c6cd1fd97897d7872c2babc
|
|
BLAKE2b-256 checksum How to use checksums |
551e6fe19a48bca77b148a3e4bb24c40a58dc3f296d1717bac1873d91ba50f33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
|