Skip to content

anduril/sample-app-thumbnail

Repository files navigation

Lattice SDK: Track thumbnail

This app demonstrates the Lattice SDK Object Store API.

In Lattice, an object is a data model that lets you store and access files across your environment. The Objects API is a content-delivery network service that provides resilient data storage at the edge. Use objects together with entities to implement use-cases like track thumbnails, and vessle manifests.

Image showing the Lattice UI with a track thumbnail displayed

For more information about the Objects API, see the following:

Before you begin

  1. Clone the repository.

  2. Install the dependencies:

    $ pip install -r requirements.txt
  3. Get the following authorization tokens from the Lattice Sandboxes dashboard:

    • authorization -- This is your environment bearer token, which you can get by choosing your environment from the dashboard list.
    • anduril-sandbox-authorization -- This is your sandboxes bearer token, which you can obtain from the Account & Security page in Sandboxes.
  4. Get your environment URL from the environment details page in Sandboxes.

  5. Set your system environment variables:

    $ export LATTICE_ENDPOINT=lattice-your_env_id.env.sandboxes.developer.anduril.com
    $ export ENVIRONMENT_TOKEN=YOUR_LATTICE_ENVIRONMENT_TOKEN
    $ export SANDBOXES_TOKEN=YOUR_LATTICE_SANDBOXES_TOKEN

For more information about setting up your environment, see Set up in the Lattice Developer Guide.

Usage

Use this example app to upload and download binary data to, and from, Lattice:

$ python app.py [-h] --operation OPERATION \
    [--file PATH_TO_FILE] \
    [--path PATH_TO_OBJECT_IN_LATTICE] \
    [--entity ENTITIY_ID]

Example

  1. To upload an object to Lattice and associate it with an entity, use the following:

    $ python app.py --operation upload --file ./path/to/file --entity <entityId>
  2. To download an existing object from Lattice, use the following:

    $ python app.py --operation download --path path/to/object
  3. To delete an existing object from Lattice, use the following:

    $ python app.py --operation delete --path path/to/object --entity <entityId>

For more information, see the Lattice SDK documentation website.

About

A sample application showcasing the use of the Objects APIs

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages