Name | fmo-cli JSON |
Version |
1.2.0
JSON |
| download |
home_page | None |
Summary | Command Line Interface to access and upload FindMyOyster data |
upload_time | 2024-10-23 18:24:30 |
maintainer | None |
docs_url | None |
author | Gudjon Magnusson |
requires_python | <4,>=3.7 |
license | None |
keywords |
findmyoyster
cli
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# FindMyOyster Command Line Interface
This CLI tool allows you to interact with the [FindMyOyster](https://findmyoyster.com) 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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "fmo-cli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.7",
"maintainer_email": null,
"keywords": "FindMyOyster, CLI",
"author": "Gudjon Magnusson",
"author_email": "gmagnusson@fraunhofer.org",
"download_url": "https://files.pythonhosted.org/packages/1e/22/228909459a34e13a9ad07b5344c64d4dfcd27fa4e0c1807553f578d3782b/fmo_cli-1.2.0.tar.gz",
"platform": null,
"description": "# FindMyOyster Command Line Interface\n\nThis CLI tool allows you to interact with the [FindMyOyster](https://findmyoyster.com) backend to upload or access data. You can also use it as a library in your own scripts.\n\n## Installation\n\n```\npip install fmo-cli\n```\n\n## Authenticate \n\nBefore making any requests to the API you must authenticate. API requests are authenticated using a token.\n\nTo get a token to must use the `authenticate` command.\n\n```\nfmo authenticate\n```\nThe command will ask for 4 values\n- URL: Where is the FMO server? The default value is most likely OK\n- 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.\n- Username: The username you would use in the app\n- Password: The password you would use in the app\n\nIf authentication is successful, then a token will be saved in a `.env` file. FMO will look for the token there for all subsequent request. \n\nIf 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:\n```\nFMO_TOKEN=<my-token>\nFMO_API_URL=https://api.findmyoyster.com/v1\n```\n\n\n## Example commands\n\nGet a list of oyster beds at the farm\n```\nfmo beds list\n```\n\nGenerate a sample path on a given oyster bed. Generated paths are useful for test and demos.\n```\nfmo simulator spiral-path --bed <bed-id> -o my-path.json --preview\n```\n\nUpload a path as a new substrate log\n```\nfmo logs upload --file my-path.json --type substrate\n```\n\nFind a list of logs on a oyster bed\n```\nfmo logs find --bed <bed-id> --type substrate\n```\n\nView and download a specific log\n```\nfmo logs geometry <log-id> --preview -o output.json\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Command Line Interface to access and upload FindMyOyster data",
"version": "1.2.0",
"project_urls": null,
"split_keywords": [
"findmyoyster",
" cli"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f8a542a81eef0146bf95f724fc9c2db1d2bb36a1b1fd5cd4c53809d389474ff2",
"md5": "9fb5fea2ca108469bc971b02da762b07",
"sha256": "86ad476c2f0ba9a1da09853bd2227ba43c04ffe4a625095407830dca4d0b9c21"
},
"downloads": -1,
"filename": "fmo_cli-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9fb5fea2ca108469bc971b02da762b07",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.7",
"size": 15707,
"upload_time": "2024-10-23T18:24:29",
"upload_time_iso_8601": "2024-10-23T18:24:29.317871Z",
"url": "https://files.pythonhosted.org/packages/f8/a5/42a81eef0146bf95f724fc9c2db1d2bb36a1b1fd5cd4c53809d389474ff2/fmo_cli-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1e22228909459a34e13a9ad07b5344c64d4dfcd27fa4e0c1807553f578d3782b",
"md5": "5e482d68ea8be5ba21e6e94cbda52c23",
"sha256": "e9a4261607808c23f1eb30ca56c6e72d3f0b0e1c234552a048dd7917c082c9af"
},
"downloads": -1,
"filename": "fmo_cli-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "5e482d68ea8be5ba21e6e94cbda52c23",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.7",
"size": 12399,
"upload_time": "2024-10-23T18:24:30",
"upload_time_iso_8601": "2024-10-23T18:24:30.538113Z",
"url": "https://files.pythonhosted.org/packages/1e/22/228909459a34e13a9ad07b5344c64d4dfcd27fa4e0c1807553f578d3782b/fmo_cli-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-23 18:24:30",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "fmo-cli"
}