Python client for LF View API
Project description
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)
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
File details
Details for the file lfview-api-client-0.0.1.tar.gz
.
File metadata
- Download URL: lfview-api-client-0.0.1.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 984dbd587565d057e7921594202fa8dad7b71b65c897504b08ca563fd01aecb5 |
|
MD5 | a07d2f04f1107f8c1ca2be026f89f540 |
|
BLAKE2b-256 | 714e0765189a3a78c048618817fa52478674e1a30a713d62799847d1847c85ec |
File details
Details for the file lfview_api_client-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: lfview_api_client-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b841118e3fb41c3cb454d65bd3882c15dde5bf293289a727aad2ecb79f375f9 |
|
MD5 | 53a897b69721d800f211ba6cd74559f9 |
|
BLAKE2b-256 | 42939674c1378b6b8e070587dbf9141b6ce760e0e7ad4d928d30d62acfa947ed |