Skip to main content

Command Line Interface to access and upload FindMyOyster data

Project description

FindMyOyster Command Line Interface

This CLI tool allows you to interact with the FindMyOyster backend to upload or access data. You can also use it as a library in your own scripts.

Installation

pip install fmo-cli

Authenticate

Before making any requests to the API you must authenticate. API requests are authenticated using a token.

To get a token to must use the authenticate command.

fmo authenticate

The command will ask for 4 values

  • URL: Where is the FMO server? The default value is most likely OK
  • Farm: FMO isolates all data per farm. Before doing anything you need to know what farm you are working with. For experiments you can probably use the "demo" farm, which is basically open to anyone.
  • Username: The username you would use in the app
  • Password: The password you would use in the app

If authentication is successful, then a token will be saved in a .env file. FMO will look for the token there for all subsequent request.

If you already have a token, you are welcome to create the file by hand and skip the authentication step. The file should look like this:

FMO_TOKEN=<my-token>
FMO_API_URL=https://api.findmyoyster.com/v1

Example commands

Get a list of oyster beds at the farm

fmo beds list

Generate a sample path on a given oyster bed. Generated paths are useful for test and demos.

fmo simulator spiral-path --bed <bed-id> -o my-path.json --preview

Upload a path as a new substrate log

fmo logs upload --file my-path.json --type substrate

Find a list of logs on a oyster bed

fmo logs find --bed <bed-id> --type substrate

View and download a specific log

fmo logs geometry <log-id> --preview -o output.json

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

fmo_cli-1.2.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

fmo_cli-1.2.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file fmo_cli-1.2.0.tar.gz.

File metadata

  • Download URL: fmo_cli-1.2.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.20

File hashes

Hashes for fmo_cli-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e9a4261607808c23f1eb30ca56c6e72d3f0b0e1c234552a048dd7917c082c9af
MD5 5e482d68ea8be5ba21e6e94cbda52c23
BLAKE2b-256 1e22228909459a34e13a9ad07b5344c64d4dfcd27fa4e0c1807553f578d3782b

See more details on using hashes here.

File details

Details for the file fmo_cli-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: fmo_cli-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.20

File hashes

Hashes for fmo_cli-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86ad476c2f0ba9a1da09853bd2227ba43c04ffe4a625095407830dca4d0b9c21
MD5 9fb5fea2ca108469bc971b02da762b07
BLAKE2b-256 f8a542a81eef0146bf95f724fc9c2db1d2bb36a1b1fd5cd4c53809d389474ff2

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