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.1.0.tar.gz
.
File metadata
- Download URL: lfview-api-client-0.1.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d788005dc35de90a6abd82214ab7767d3c6985e6e4594bc121ea8d9b0294db1b |
|
MD5 | f33e7e24e690b535e8d80da3a4ed1315 |
|
BLAKE2b-256 | e770cb5aecddc4e8143eb2269e6e3d1c41a94b4fd2bfa0857096c18d611fe3a5 |
File details
Details for the file lfview_api_client-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: lfview_api_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/38.2.4 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2641d42ccaaac993cc2235b99060dfe3dbc4c7c29b5ae20d124bf11a4ee8a8fc |
|
MD5 | e9f88f8a8e4aa307c1fb9e0b2ab53e7d |
|
BLAKE2b-256 | a5ee0d6b41f7360fcb192c8e951757ed19ce32dc8dfd51a43fbf6ca0854e2421 |