Skip to main content

Python client for LF View API

Project description

https://img.shields.io/pypi/v/lfview-api-client.svg https://readthedocs.org/projects/lfview/badge/ https://travis-ci.com/seequent/lfview-api-client.svg?branch=master https://codecov.io/gh/seequent/lfview-api-client/branch/master/graph/badge.svg https://img.shields.io/badge/license-MIT-blue.svg

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lfview-api-client-0.1.0b0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

lfview_api_client-0.1.0b0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file lfview-api-client-0.1.0b0.tar.gz.

File metadata

  • Download URL: lfview-api-client-0.1.0b0.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

Hashes for lfview-api-client-0.1.0b0.tar.gz
Algorithm Hash digest
SHA256 4940966211983c2b8edd0d3be7a813b355db37b4d6b8edc85284dc25e459fc6f
MD5 c04ea210d916824af9d2e446b62e7420
BLAKE2b-256 dade3cb691f6218ab2e409934e7277017a9b3d0c7f4e0c9d4ef0393dd218d03a

See more details on using hashes here.

File details

Details for the file lfview_api_client-0.1.0b0-py3-none-any.whl.

File metadata

  • Download URL: lfview_api_client-0.1.0b0-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

Hashes for lfview_api_client-0.1.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8930ad3f52844332e3eeb5ee9e2fa9994bc89ea1278652292ea925e768f6f04
MD5 76f95e4e48d0346e50c1777294467a2d
BLAKE2b-256 0fe7ed201986fb0e4b949f5de63c667481c07be880c538c25bc01b784a7fe390

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page