Name | geodesic-api JSON |
Version |
0.58.27
JSON |
| download |
home_page | None |
Summary | Python API for the Geodesic Datascience Platform |
upload_time | 2024-10-08 23:05:08 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
keywords |
geodesic
analysis
seerai
data
science
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# geodesic-python-api
[![Build](https://github.com/seerai/geodesic-python-api/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/seerai/geodesic-python-api/actions/workflows/build_and_test.yml)
[![codecov](https://codecov.io/gh/seerai/geodesic-python-api/branch/main/graph/badge.svg?token=8MU1ZGBDH3)](https://codecov.io/gh/seerai/geodesic-python-api)
The python API for interacting with SeerAI's Geodesic system.
Documentation can be found at [docs.seerai.space/geodesic](https://docs.seerai.space/geodesic)
## Contributing
To setup a development environment for geodesic we recommend first creating a conda environment.
```bash
conda create -n geodesic-dev python=3.10
conda activate geodesic-dev
```
You will also need to install GDAL and arcgis for some applications. This is easiest
to do through conda.
```bash
conda install gdal arcgis -c conda-forge -c esri -y
```
Once this finishes you can proceed to installing geodesic.
After cloning the repo you can install with pip. There are several install options depending on which packages you would like installed.
For development we recommend installing the dev packages with the `dev` extras identifier. This will install all packages
needed to use all parts of the geodesic api as well as some packages used for testing.
```bash
pip install .[dev]
```
After installation finishes, install the pre-commit git hooks that will run the [Ruff](https://docs.astral.sh/ruff/) linter before every
git commit.
```bash
pre-commit install
```
If there are any linting or formatting issues, the pre-commit hook will prevent you from committing until
those issues are fixed. See the [Ruff](https://docs.astral.sh/ruff/) documentation for details, but many
of the issues can be fixed automatically. It is also highly recommended that you install the Ruff extension
into VSCode as it will highlight code that doesnt meet the linter or formatter requirements. See [Code Formatting](#code-formatting)
for more info on running the formatter and linter locally.
> [!NOTE]
> This will not actually run any reformatting or linting fixes, it will simply tell you if there are any problems.
> See [Code Formatting](#code-formatting) to have Ruff try to automatically fix the issues for you.
> [!NOTE]
> The pre-commit hooks will **only** run against files that you have changed in this git commit.
When adding or modifying any code you should also add to the documentation if necessary
and make sure that it builds and renders correctly. You can find instructions for modifying
and building the docs sources in the README in the `docs/` folder. The CI/CD will also build
docs when a PR is created and provide a link to them. It is a good idea to check this after
your PR finishes building to make sure any of your added documentation is displayed correctly.
### Code Formatting
In `geodesic`, we use the Ruff code formatter and linter. If you are developing in VSCode, the Ruff extension should
be installed and should be set to your default formattter in your python settings. Make sure that when you
are developing on the python api that you installed with the 'dev' option `pip install .[dev]`. This will
automatically install the Ruff formatter for you.
If you would like to run the linter manually to check for or fix errors, this can be done with:
```bash
ruff check
```
This will print to the screen all linting errors the tool finds. Many of these can be fixed automatically if
you prefer and that can be done with:
```bash
ruff check --fix
```
Ruff also works as a code formatter and should be a drop in replacement for Black. To reformat your files run:
```bash
ruff format
```
This will run all reformatting and tell you which files it worked on. If instead of running the reformatter you
would just like to check which files it will touch you can run:
```bash
ruff format --check
```
### Testing
To run unit tests and see coverage, in the root directory run:
```bash
coverage run -m pytest
coverage report --omit=test/*
```
### CLI
This library installs with a command line tool `geodesic` that exposes a number of useful tools for working with the
geodesic platform:
#### Authentication
Example:
```bash
$ geodesic authenticate
To authorize access needed by Geodesic, open the following URL in a web browser and follow the instructions. If the web browser does not start automatically, please manually browse the URL below.
https://seerai.us.auth0.com/authorize?client_id=RlCTevNLPn0oVzmwLu3R0jCF7tfakpq9&scope=email+openid+profile+picture+admin+offline_access+entanglement%3Aread+entanglement%3Awrite+spacetime%3Aread+spacetime%3Awrite+tesseract%3Aread+tesseract%3Awrite+boson%3Aread+boson%3Awrite+krampus%3Aread&redirect_uri=https%3A%2F%2Fseerai.space%2FauthPage&audience=https%3A%2F%2Fgeodesic.seerai.space&response_type=code&code_challenge=ABC&code_challenge_method=S256
The authorization workflow will generate a code, which you should paste in the box below.
Enter verification code: XXXXXXXXX
```
#### Setting And Displaying The Active Cluster
Examples:
```bash
$ geodesic get clusters
[*] seerai
$ geodesic get active-config
{
"host": "https://geodesic.seerai.space",
"name": "seerai",
"oauth2": {
"audience": "https://geodesic.seerai.space",
"authorization_uri": "https://seerai.us.auth0.com/authorize",
"client_id": "RlCTevNLPn0oVzmwLu3R0jCF7tfakpq9",
"client_secret": "EY5_-6InmoqYSy1ZEKb7vGiUrCTE1JapTtBncaP_w_0_IhuSilZw1YS6pqoJ0n75",
"redirect_uri": "https://seerai.space/authPage",
"token_uri": "https://seerai.us.auth0.com/oauth/token"
}
}
$ geodesic set cluster seerai
```
#### Project Management
The `geodesic build project` command allows you to create and manage Entanglement projects using a yaml format
configuration file. For example, to create a new project, create a yaml file with the following contents:
```yaml
- name: seerai-project
alias: SeerAI Example Project
description: A project for demonstrating the build project command
```
This file can be named anything, and saved anywhere, but we suggest a file called `project.yaml` in your project root
directory. Now, to actually create the project:
```bash
$ geodesic build project
No project name provided. Using project "seerai-project"
Creating project: seerai-project
```
Now, if you check your `project.yaml` file, you will see that a project uid has been added, which will allow future runs
of this tool to point to the same project.
```yaml
- uid: <PROJECT-UID>
name: seerai-project
alias: SeerAI Example Project
description: A project for demonstrating the build project command
```
*Note:* injecting the uid into the project specification can sometimes result in unexpected changes to nonfunctional
aspects of the yaml file, e.g., whitespace and comments. To avoid these changes, simply create the project through the
API and add the uid yourself. If all uids are provided, your yaml will not be touched.
If you have an existing project that you would like to use, just specify the uid when writing your initial configuration
file and the build tool will connect to it automatically.
Once your project has been created, you can also use the `geodesic build project` command to make changes to that
project. For example, if we wanted to change the description of the project, you can do so simply by modifying the yaml
file and rerunning the command. The changes will be pushed to your Entanglement project. *Note that the project uid and
name cannot be modified after project creation.*
##### Managing Multiple Projects
You might have noticed that the project specification in the yaml above is a list item. This is because you can use the
`geodesic build project` command to manage multiple Entanglement projects within the same yaml file. For example, we
frequently create both sandbox and production versions of a project, so we can stage changes without modifying a live
client-facing graph. Here's what that looks like:
```yaml
- uid: <PROJECT-UID-1>
name: seerai-project-1
alias: SeerAI Example Project 1
description: A project for demonstrating the build project command
- uid: <PROJECT-UID-2>
name: seerai-project-2
alias: SeerAI Example Project 2
description: A project for demonstrating the build project command
```
Now, you can build/rebuild either of these projects simply using the `--project` option. For example:
```bash
geodesic build project --project=seerai-project-2
```
will build the second project. As before, if a project specification is added without a uid, the project will be created
and the uid will be added to your yaml.
##### Managing Permissions
`geodesic build project` also allows you to manage which users have permissions for a given project. To add a user to a
project, simply use the `permissions` key in your yaml file. For example:
```yaml
- uid: <PROJECT-UID>
name: seerai-project
alias: SeerAI Example Project
description: A project for demonstrating the build project command
permissions:
# Add Allison to the project with read/write permissions
- {name: Allison, user: auth0|<USER-HASH>, read: true, write: true}
# Add Daniel as a read-only user
- {name: Daniel, user: auth0|<USER-HASH>, read: true, write: false}
# Remove Alex's permissions (once you have run once with this line, it can be removed)
- {name: Alex, user: auth0|<USER-HASH>, read: false, write: false}
```
#### Graph Management
The `geodesic build graph` command allows you to build an Entanglement graph based on yaml specification files. This is
great for keeping the contents of an Entanglement graph under git control, or just creating a large number of nodes with
relatively little effort. Once your yaml configurations are set up, building a graph is as easy as:
```bash
$ geodesic build graph --file=graph_nodes/ --project=<project-name-or-uid>
```
The `--project` argument is optional. The active project can also be set by setting the `PROJECT_ID` environmental
variable. But a project *must* be provided in one of these forms. The `--file` argument points to a yaml file, or
directory containing yaml files specifying graph nodes.
#### YAML Input Format
The input file format is fairly straightforward. Here is an example of a single entity node:
```yaml
---
- name: test-node-a
alias: Test Node A
tag: node-a
description: Test Node A Description
domain: test
category: test
type: test
object_class: entity
geometry: POINT (<lon> <lat>)
```
The body of an input yaml file is a single list of node specifications (note the dash at the beginning of each node
spec, indicating that it is a list item), most of which are passed directly to the
[`geodesic.Object`](https://docs.seerai.space/geodesic/latest/geodesic/docs/reference/generated/geodesic.entanglement.object.Object.html)
constructor, which means that translating between node definitions in made with the python API and with this script is
very simple. For example, the node specified above is equivalent to the following Python code:
```python
from shapely.geometry import Point
import geodesic
node = geodesic.Object(
name='test-node-a',
alias='Test Node A',
description='Test Node A Description',
domain='test',
category='test',
type='test',
object_class='entity',
geometry=Point(lon, lat),
).save()
```
As you can see, most of the keys in the node specs are equivalent to args passed directly to the constructor, but there
are a few important exceptions, which add additional functionality to this command:
- `tag`: (optional) each node can optionally be given a 'tag', which is a short name (alphanumeric, plus hyphens) which can be used inside your input yaml files to more conveniently refer to nodes. The utility of this will become more clear in a moment. A few additional considerations:
- Tags are expected to be unique for each set of input files; repeating tag names will throw a warning and might result in the wrong connections being made.
- Tags defined in one input file can be used in another input file, provided the script is run on all the files at the same time. A List of tags from all input files is compiled before the connection creation step. This allows input files to be more modular without sacrificing the convenience of tag referencing, but it also means that you must be mindful of potential name collisions with other input files in the same directory.
- Tags are not saved on the resulting Entanglement nodes in any way. They exist purely for use by this tool.
- `geometry`: (optional) accepts geometry in WKT format. Improper WKT input will throw a warning and that geometry will be left off of the created node. Keep in mind that geometry is only accepted for objects of object class `entity`. For other object classes, this key is ignored.
##### Making Connections
Of course, a single graph node doesn't do us much good if it's not connected to anything. Thankfully, creating
connections in this format is simple. Let's give our node a couple of connections:
```yaml
- name: test-node-a
alias: Test Node A
tag: node-a
description: Test Node A Description
domain: test
category: test
type: test
object_class: entity
geometry: POINT (0 0)
connections:
- subject: self
predicate: related-to
object: node-b
- subject: concept:test:test:test:test-node-c
predicate: related-to
object: self
- subject: self
predicate: related-to
object: 0x3b88c7
```
The `connections` key can carry a list of connections, which need to have a `subject`, `predicate` and `object`. `subject` and `object` can be referenced in a few different ways:
- **tag referencing** - allows you to use the tags defined in the `tag` key of a node in one of your input files. Additionally, a shortcut tag `self` is available to more easily refer to the node currently being specified. In most cases, either your `subject` or your `object` will be set to `self`, but this is not required. Any connection can be made from inside any node's specification. It is, however, recommended that you organize your connections in some way that allows you to easily trace back connections to their location in the input files.
- **full name referencing** - allows you to use a node's full name (`<object_class>:<domain>:<category>:<type>:<name>`, quickly accessible via the `Object.full_name` property of a node) to reference any node in the active project.
- **uid referencing** - allows you to use the uid of any node within the active project. This method is not preferred, because the result is less readable than the other two options. If you are using uid reference, it is recommended that you include a comment in the yaml to clarify what the uid is referencing.
##### `from_<format>` Datasets
The script also allows for creating dataset nodes through any of the `geodesic.Dataset.from_<format>()` methods
available through the Python API. This looks very similar to creating other types of nodes:
```yaml
- name: test-node-c
tag: node-c
domain: test
category: test
type: test
object_class: dataset
method: from_arcgis_layer
url: <arcgis_layer_url>
connections:
- subject: self
predicate: related-to
object: node-a
```
As with other nodes, most of these keys are passed directly to the chosen constructor. But, in this case, the constructor is
whatever `from_` method was specified in the `method` key. This means that the other keys required will differ depending
on your chosen method. See the [docs](https://docs.seerai.space/geodesic/latest/geodesic/docs/reference/generated/geodesic.entanglement.dataset.Dataset.html)
for more detail on how each of these methods works.
###### Adding Middleware
Middleware can be added to a dataset using the `middleware` key. Each list item under this key is parsed into a
middleware object. Simply specify the path of the middleware constructor method that you want to use, then provide the
necessary arguments. Here's an example:
```yaml
- name: test-node-f
alias: Test Node F
tag: node-f
description: Test Node F
domain: test
category: test
type: test
object_class: dataset
method: view
dataset_tag: node-e
bbox: [ -109.720459,36.438961,-101.535645,41.269550 ]
middleware:
- method: SearchTransform.buffer
distance: 0.01
segments: 32
- method: PixelsTransform.rasterize
value: 1
connections:
- subject: self
predicate: related-to
object: node-d
- subject: self
predicate: related-to
object: node-e
```
##### View Datasets
Other options for the `method` key are `'view'`, `'join'`, and `'union'`. Here is an example of a view dataset
definition:
```yaml
- name: test-node-f
alias: Test Node F
tag: node-f
description: Test Node F
domain: test
category: test
type: test
object_class: dataset
method: view
dataset: dataset:foundation:boundaries:boundaries:usa-counties
dataset_project: global
bbox: [-109.720459,36.438961,-101.535645,41.269550]
connections:
- subject: self
predicate: related-to
object: node-d
```
The target dataset of the view, join, or union can be specified using the same methods as that can be used in connection
definitions (full name, tag, or UID). You can select a target dataset
from another project using the `dataset_project` key. If this key is not included, the dataset is assumed to be in the
active project.
###### CQL Filtering
You can also use CQL filtering while creating views. Here is an example of what that looks like:
```yaml
- name: test-node-f
alias: Test Node F
tag: node-f
description: Test Node F
domain: test
category: test
type: test
object_class: dataset
# test bbox and CQL view dataset creation
method: view
dataset_tag: node-e
bbox: [ -109.720459,36.438961,-101.535645,41.269550 ]
filter:
op: and
args:
- op: ">"
args:
- property: POPULATION
- 10000
- op: "="
args:
- property: STNAME
- Colorado
connections:
- subject: self
predicate: related-to
object: node-d
- subject: self
predicate: related-to
object: node-e
```
##### Join Datasets
To create a join dataset, you will need to specify `method: join`, as well as both the left and right datasets, which
can be accessed through the full name, uid, or tag, as described above, as wells as `field` (left field) and `right_field`.
Here is an example of a join dataset definition:
```yaml
- name: test-node-h
alias: Test Node H
tag: node-h
description: Test Node H
domain: test
category: test
type: test
object_class: dataset
method: join
dataset_tag: node-g
field: COUNTY_FIPS
right_dataset: dataset:foundation:boundaries:boundaries:usa-counties
right_dataset_project: global
right_field: COUNTYFP
connections:
- subject: self
predicate: related-to
object: node-g
- subject: self
predicate: related-to
object: node-e
```
In addition to `dataset_project`, you can also specify a right dataset from a different project using the
`right_dataset_project` key.
###### Spatial Joins
Spatial joins are defined the same way, but with `spatial_join: true`. For example:
```yaml
- name: test-node-h
alias: Test Node H
tag: node-h
description: Test Node H
domain: test
category: test
type: test
object_class: dataset
method: join
dataset_tag: node-g
right_dataset_tag: node-e
spatial_join: true
connections:
- subject: self
predicate: related-to
object: node-g
- subject: self
predicate: related-to
object: node-e
```
##### Union Datasets
Unions work essentially the same way as joins, but the other datasets are specified in the `others` key. Here's an
example:
```yaml
- name: test-node-i
alias: Test Node I
tag: node-i
description: Test Node I
domain: test
category: test
type: test
object_class: dataset
method: union
dataset_tag: node-g
others:
- dataset_tag: node-e
- dataset: dataset:foundation:boundaries:boundaries:usa-counties
project: global
connections:
- subject: self
predicate: related-to
object: node-g
- subject: self
predicate: related-to
object: node-e
```
Note that you can specify a dataset from a different project by setting the `project` key on the dataset item. For this
to work, you will need the dataset's full name or uid.
##### Additional Options
There are a couple of additional options which can be added to modify the behavior of the `geodesic build graph`
command:
- `--dry_run`: when running with this option, the tool will not actually write changes to any Entanglement projects. This is useful for validating your node configuration before committing to any actual changes in your project. Note that some features might misbehave while using this option as, for example, connections cannot be made between nodes cannot be made when they are not actually created yet.
- `--reindex`: this option triggers a reindex operation on any dataset nodes created by the tool. This is necessary for most changes to datasets to actually take effect. If you are noticing that changes are not being reflected in the data you are receiving from a dataset, you may want to try this option.
- `--rebuild`: when running with this option, the tool will delete all nodes in the project before it begins the graph build. This is recommended if you want your full graph to be reflected in your yaml configurations, but should be avoided if you have modified the graph through any other method, such as in a notebook. *This option should be used carefully.*
##### Managing Graphs Using `geodesic build project`
Finally, it is also possible to integrate the functionality of `geodesic build graph` into the previously described
`geodesic build project` workflow. Doing so is as easy as adding one more key to your `project.yaml` file:
```yaml
- uid: <PROJECT-UID>
name: seerai-project
alias: SeerAI Example Project
description: A project for demonstrating the build project command
nodes_path: graph_nodes
```
Now, when you run `geodesic build project --project=seerai-project`, the project build will automatically look to the
`graph_nodes` directory and build the resulting graph in your project. All of the additional options listed above are
also available when running a graph build through `geodesic build project`.
Raw data
{
"_id": null,
"home_page": null,
"name": "geodesic-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "geodesic, analysis, seerai, data, science",
"author": null,
"author_email": "The SeerAI Team <contact@seer.ai>",
"download_url": null,
"platform": null,
"description": "# geodesic-python-api\n\n[![Build](https://github.com/seerai/geodesic-python-api/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/seerai/geodesic-python-api/actions/workflows/build_and_test.yml)\n[![codecov](https://codecov.io/gh/seerai/geodesic-python-api/branch/main/graph/badge.svg?token=8MU1ZGBDH3)](https://codecov.io/gh/seerai/geodesic-python-api)\n\n\nThe python API for interacting with SeerAI's Geodesic system.\nDocumentation can be found at [docs.seerai.space/geodesic](https://docs.seerai.space/geodesic)\n\n## Contributing\n\nTo setup a development environment for geodesic we recommend first creating a conda environment.\n```bash\nconda create -n geodesic-dev python=3.10\nconda activate geodesic-dev\n```\n\nYou will also need to install GDAL and arcgis for some applications. This is easiest \nto do through conda.\n```bash\nconda install gdal arcgis -c conda-forge -c esri -y \n```\n\nOnce this finishes you can proceed to installing geodesic.\n\nAfter cloning the repo you can install with pip. There are several install options depending on which packages you would like installed.\nFor development we recommend installing the dev packages with the `dev` extras identifier. This will install all packages\nneeded to use all parts of the geodesic api as well as some packages used for testing.\n```bash\npip install .[dev]\n```\n\nAfter installation finishes, install the pre-commit git hooks that will run the [Ruff](https://docs.astral.sh/ruff/) linter before every\ngit commit.\n```bash\npre-commit install\n```\nIf there are any linting or formatting issues, the pre-commit hook will prevent you from committing until\nthose issues are fixed. See the [Ruff](https://docs.astral.sh/ruff/) documentation for details, but many\nof the issues can be fixed automatically. It is also highly recommended that you install the Ruff extension\ninto VSCode as it will highlight code that doesnt meet the linter or formatter requirements. See [Code Formatting](#code-formatting)\nfor more info on running the formatter and linter locally.\n\n> [!NOTE]\n> This will not actually run any reformatting or linting fixes, it will simply tell you if there are any problems.\n> See [Code Formatting](#code-formatting) to have Ruff try to automatically fix the issues for you.\n\n> [!NOTE]\n> The pre-commit hooks will **only** run against files that you have changed in this git commit.\n\nWhen adding or modifying any code you should also add to the documentation if necessary \nand make sure that it builds and renders correctly. You can find instructions for modifying\nand building the docs sources in the README in the `docs/` folder. The CI/CD will also build\ndocs when a PR is created and provide a link to them. It is a good idea to check this after \nyour PR finishes building to make sure any of your added documentation is displayed correctly.\n\n### Code Formatting\nIn `geodesic`, we use the Ruff code formatter and linter. If you are developing in VSCode, the Ruff extension should \nbe installed and should be set to your default formattter in your python settings. Make sure that when you \nare developing on the python api that you installed with the 'dev' option `pip install .[dev]`. This will\nautomatically install the Ruff formatter for you.\n\nIf you would like to run the linter manually to check for or fix errors, this can be done with:\n```bash\nruff check\n```\nThis will print to the screen all linting errors the tool finds. Many of these can be fixed automatically if \nyou prefer and that can be done with:\n```bash\nruff check --fix\n```\nRuff also works as a code formatter and should be a drop in replacement for Black. To reformat your files run:\n```bash\nruff format\n```\nThis will run all reformatting and tell you which files it worked on. If instead of running the reformatter you \nwould just like to check which files it will touch you can run:\n```bash\nruff format --check\n```\n\n### Testing\nTo run unit tests and see coverage, in the root directory run:\n```bash\ncoverage run -m pytest\ncoverage report --omit=test/*\n```\n\n### CLI\nThis library installs with a command line tool `geodesic` that exposes a number of useful tools for working with the \ngeodesic platform:\n\n#### Authentication\n\nExample:\n\n```bash\n$ geodesic authenticate\nTo authorize access needed by Geodesic, open the following URL in a web browser and follow the instructions. If the web browser does not start automatically, please manually browse the URL below.\n\n https://seerai.us.auth0.com/authorize?client_id=RlCTevNLPn0oVzmwLu3R0jCF7tfakpq9&scope=email+openid+profile+picture+admin+offline_access+entanglement%3Aread+entanglement%3Awrite+spacetime%3Aread+spacetime%3Awrite+tesseract%3Aread+tesseract%3Awrite+boson%3Aread+boson%3Awrite+krampus%3Aread&redirect_uri=https%3A%2F%2Fseerai.space%2FauthPage&audience=https%3A%2F%2Fgeodesic.seerai.space&response_type=code&code_challenge=ABC&code_challenge_method=S256\n\nThe authorization workflow will generate a code, which you should paste in the box below.\nEnter verification code: XXXXXXXXX\n```\n\n#### Setting And Displaying The Active Cluster\n\nExamples:\n\n```bash\n$ geodesic get clusters\n[*] seerai\n$ geodesic get active-config\n{\n \"host\": \"https://geodesic.seerai.space\",\n \"name\": \"seerai\",\n \"oauth2\": {\n \"audience\": \"https://geodesic.seerai.space\",\n \"authorization_uri\": \"https://seerai.us.auth0.com/authorize\",\n \"client_id\": \"RlCTevNLPn0oVzmwLu3R0jCF7tfakpq9\",\n \"client_secret\": \"EY5_-6InmoqYSy1ZEKb7vGiUrCTE1JapTtBncaP_w_0_IhuSilZw1YS6pqoJ0n75\",\n \"redirect_uri\": \"https://seerai.space/authPage\",\n \"token_uri\": \"https://seerai.us.auth0.com/oauth/token\"\n }\n}\n$ geodesic set cluster seerai\n```\n\n#### Project Management\n\nThe `geodesic build project` command allows you to create and manage Entanglement projects using a yaml format \nconfiguration file. For example, to create a new project, create a yaml file with the following contents: \n\n```yaml\n- name: seerai-project\n alias: SeerAI Example Project\n description: A project for demonstrating the build project command\n```\n\nThis file can be named anything, and saved anywhere, but we suggest a file called `project.yaml` in your project root \ndirectory. Now, to actually create the project:\n\n```bash\n$ geodesic build project\nNo project name provided. Using project \"seerai-project\"\nCreating project: seerai-project\n```\n\nNow, if you check your `project.yaml` file, you will see that a project uid has been added, which will allow future runs \nof this tool to point to the same project. \n\n```yaml\n- uid: <PROJECT-UID>\n name: seerai-project\n alias: SeerAI Example Project\n description: A project for demonstrating the build project command\n```\n\n*Note:* injecting the uid into the project specification can sometimes result in unexpected changes to nonfunctional \naspects of the yaml file, e.g., whitespace and comments. To avoid these changes, simply create the project through the \nAPI and add the uid yourself. If all uids are provided, your yaml will not be touched.\n\nIf you have an existing project that you would like to use, just specify the uid when writing your initial configuration \nfile and the build tool will connect to it automatically.\n\nOnce your project has been created, you can also use the `geodesic build project` command to make changes to that \nproject. For example, if we wanted to change the description of the project, you can do so simply by modifying the yaml \nfile and rerunning the command. The changes will be pushed to your Entanglement project. *Note that the project uid and \nname cannot be modified after project creation.*\n\n##### Managing Multiple Projects\n\nYou might have noticed that the project specification in the yaml above is a list item. This is because you can use the \n`geodesic build project` command to manage multiple Entanglement projects within the same yaml file. For example, we \nfrequently create both sandbox and production versions of a project, so we can stage changes without modifying a live \nclient-facing graph. Here's what that looks like:\n\n```yaml\n- uid: <PROJECT-UID-1>\n name: seerai-project-1\n alias: SeerAI Example Project 1\n description: A project for demonstrating the build project command\n \n- uid: <PROJECT-UID-2>\n name: seerai-project-2\n alias: SeerAI Example Project 2\n description: A project for demonstrating the build project command\n```\n\nNow, you can build/rebuild either of these projects simply using the `--project` option. For example:\n\n```bash\ngeodesic build project --project=seerai-project-2\n```\n\nwill build the second project. As before, if a project specification is added without a uid, the project will be created \nand the uid will be added to your yaml.\n\n##### Managing Permissions\n\n`geodesic build project` also allows you to manage which users have permissions for a given project. To add a user to a \nproject, simply use the `permissions` key in your yaml file. For example:\n\n```yaml\n- uid: <PROJECT-UID>\n name: seerai-project\n alias: SeerAI Example Project\n description: A project for demonstrating the build project command\n permissions:\n # Add Allison to the project with read/write permissions\n - {name: Allison, user: auth0|<USER-HASH>, read: true, write: true}\n # Add Daniel as a read-only user\n - {name: Daniel, user: auth0|<USER-HASH>, read: true, write: false}\n # Remove Alex's permissions (once you have run once with this line, it can be removed)\n - {name: Alex, user: auth0|<USER-HASH>, read: false, write: false}\n```\n\n#### Graph Management\n\nThe `geodesic build graph` command allows you to build an Entanglement graph based on yaml specification files. This is \ngreat for keeping the contents of an Entanglement graph under git control, or just creating a large number of nodes with \nrelatively little effort. Once your yaml configurations are set up, building a graph is as easy as:\n\n```bash\n$ geodesic build graph --file=graph_nodes/ --project=<project-name-or-uid>\n```\n\nThe `--project` argument is optional. The active project can also be set by setting the `PROJECT_ID` environmental \nvariable. But a project *must* be provided in one of these forms. The `--file` argument points to a yaml file, or \ndirectory containing yaml files specifying graph nodes.\n\n\n#### YAML Input Format\n\nThe input file format is fairly straightforward. Here is an example of a single entity node:\n\n```yaml\n---\n- name: test-node-a\n alias: Test Node A\n tag: node-a\n description: Test Node A Description\n domain: test\n category: test\n type: test\n object_class: entity\n geometry: POINT (<lon> <lat>)\n```\n\nThe body of an input yaml file is a single list of node specifications (note the dash at the beginning of each node \nspec, indicating that it is a list item), most of which are passed directly to the \n[`geodesic.Object`](https://docs.seerai.space/geodesic/latest/geodesic/docs/reference/generated/geodesic.entanglement.object.Object.html) \nconstructor, which means that translating between node definitions in made with the python API and with this script is \nvery simple. For example, the node specified above is equivalent to the following Python code:\n\n```python\nfrom shapely.geometry import Point\nimport geodesic\n\nnode = geodesic.Object(\n name='test-node-a',\n alias='Test Node A',\n description='Test Node A Description',\n domain='test',\n category='test',\n type='test',\n object_class='entity',\n geometry=Point(lon, lat),\n).save()\n```\n\nAs you can see, most of the keys in the node specs are equivalent to args passed directly to the constructor, but there \nare a few important exceptions, which add additional functionality to this command:\n\n- `tag`: (optional) each node can optionally be given a 'tag', which is a short name (alphanumeric, plus hyphens) which can be used inside your input yaml files to more conveniently refer to nodes. The utility of this will become more clear in a moment. A few additional considerations:\n - Tags are expected to be unique for each set of input files; repeating tag names will throw a warning and might result in the wrong connections being made.\n - Tags defined in one input file can be used in another input file, provided the script is run on all the files at the same time. A List of tags from all input files is compiled before the connection creation step. This allows input files to be more modular without sacrificing the convenience of tag referencing, but it also means that you must be mindful of potential name collisions with other input files in the same directory.\n - Tags are not saved on the resulting Entanglement nodes in any way. They exist purely for use by this tool.\n\n- `geometry`: (optional) accepts geometry in WKT format. Improper WKT input will throw a warning and that geometry will be left off of the created node. Keep in mind that geometry is only accepted for objects of object class `entity`. For other object classes, this key is ignored.\n\n##### Making Connections\n\nOf course, a single graph node doesn't do us much good if it's not connected to anything. Thankfully, creating \nconnections in this format is simple. Let's give our node a couple of connections:\n\n```yaml\n- name: test-node-a\n alias: Test Node A\n tag: node-a\n description: Test Node A Description\n domain: test\n category: test\n type: test\n object_class: entity\n geometry: POINT (0 0)\n connections:\n - subject: self\n predicate: related-to\n object: node-b\n - subject: concept:test:test:test:test-node-c\n predicate: related-to\n object: self\n - subject: self\n predicate: related-to\n object: 0x3b88c7\n```\n\nThe `connections` key can carry a list of connections, which need to have a `subject`, `predicate` and `object`. `subject` and `object` can be referenced in a few different ways:\n\n - **tag referencing** - allows you to use the tags defined in the `tag` key of a node in one of your input files. Additionally, a shortcut tag `self` is available to more easily refer to the node currently being specified. In most cases, either your `subject` or your `object` will be set to `self`, but this is not required. Any connection can be made from inside any node's specification. It is, however, recommended that you organize your connections in some way that allows you to easily trace back connections to their location in the input files.\n\n - **full name referencing** - allows you to use a node's full name (`<object_class>:<domain>:<category>:<type>:<name>`, quickly accessible via the `Object.full_name` property of a node) to reference any node in the active project.\n\n - **uid referencing** - allows you to use the uid of any node within the active project. This method is not preferred, because the result is less readable than the other two options. If you are using uid reference, it is recommended that you include a comment in the yaml to clarify what the uid is referencing.\n\n\n##### `from_<format>` Datasets\n\nThe script also allows for creating dataset nodes through any of the `geodesic.Dataset.from_<format>()` methods \navailable through the Python API. This looks very similar to creating other types of nodes:\n\n```yaml\n- name: test-node-c\n tag: node-c\n domain: test\n category: test\n type: test\n object_class: dataset\n method: from_arcgis_layer\n url: <arcgis_layer_url>\n connections:\n - subject: self\n predicate: related-to\n object: node-a\n```\n\nAs with other nodes, most of these keys are passed directly to the chosen constructor. But, in this case, the constructor is \nwhatever `from_` method was specified in the `method` key. This means that the other keys required will differ depending \non your chosen method. See the [docs](https://docs.seerai.space/geodesic/latest/geodesic/docs/reference/generated/geodesic.entanglement.dataset.Dataset.html) \nfor more detail on how each of these methods works.\n\n###### Adding Middleware\n\nMiddleware can be added to a dataset using the `middleware` key. Each list item under this key is parsed into a \nmiddleware object. Simply specify the path of the middleware constructor method that you want to use, then provide the \nnecessary arguments. Here's an example:\n\n```yaml\n- name: test-node-f\n alias: Test Node F\n tag: node-f\n description: Test Node F\n domain: test\n category: test\n type: test\n object_class: dataset\n method: view\n dataset_tag: node-e\n bbox: [ -109.720459,36.438961,-101.535645,41.269550 ]\n middleware:\n - method: SearchTransform.buffer\n distance: 0.01\n segments: 32\n - method: PixelsTransform.rasterize\n value: 1\n connections:\n - subject: self\n predicate: related-to\n object: node-d\n - subject: self\n predicate: related-to\n object: node-e\n```\n\n##### View Datasets\n\nOther options for the `method` key are `'view'`, `'join'`, and `'union'`. Here is an example of a view dataset \ndefinition:\n\n```yaml\n- name: test-node-f\n alias: Test Node F\n tag: node-f\n description: Test Node F\n domain: test\n category: test\n type: test\n object_class: dataset\n method: view\n dataset: dataset:foundation:boundaries:boundaries:usa-counties\n dataset_project: global\n bbox: [-109.720459,36.438961,-101.535645,41.269550]\n connections:\n - subject: self\n predicate: related-to\n object: node-d\n```\n\nThe target dataset of the view, join, or union can be specified using the same methods as that can be used in connection \ndefinitions (full name, tag, or UID). You can select a target dataset \nfrom another project using the `dataset_project` key. If this key is not included, the dataset is assumed to be in the \nactive project.\n\n###### CQL Filtering\n\nYou can also use CQL filtering while creating views. Here is an example of what that looks like:\n\n```yaml\n- name: test-node-f\n alias: Test Node F\n tag: node-f\n description: Test Node F\n domain: test\n category: test\n type: test\n object_class: dataset\n # test bbox and CQL view dataset creation\n method: view\n dataset_tag: node-e\n bbox: [ -109.720459,36.438961,-101.535645,41.269550 ]\n filter:\n op: and\n args:\n - op: \">\"\n args:\n - property: POPULATION\n - 10000\n - op: \"=\"\n args:\n - property: STNAME\n - Colorado\n connections:\n - subject: self\n predicate: related-to\n object: node-d\n - subject: self\n predicate: related-to\n object: node-e\n```\n\n##### Join Datasets\n\nTo create a join dataset, you will need to specify `method: join`, as well as both the left and right datasets, which \ncan be accessed through the full name, uid, or tag, as described above, as wells as `field` (left field) and `right_field`. \nHere is an example of a join dataset definition:\n\n```yaml\n- name: test-node-h\n alias: Test Node H\n tag: node-h\n description: Test Node H\n domain: test\n category: test\n type: test\n object_class: dataset\n method: join\n dataset_tag: node-g\n field: COUNTY_FIPS\n right_dataset: dataset:foundation:boundaries:boundaries:usa-counties\n right_dataset_project: global\n right_field: COUNTYFP\n connections:\n - subject: self\n predicate: related-to\n object: node-g\n - subject: self\n predicate: related-to\n object: node-e\n```\n\nIn addition to `dataset_project`, you can also specify a right dataset from a different project using the \n`right_dataset_project` key.\n\n###### Spatial Joins\n\nSpatial joins are defined the same way, but with `spatial_join: true`. For example:\n\n```yaml\n- name: test-node-h\n alias: Test Node H\n tag: node-h\n description: Test Node H\n domain: test\n category: test\n type: test\n object_class: dataset\n method: join\n dataset_tag: node-g\n right_dataset_tag: node-e\n spatial_join: true\n connections:\n - subject: self\n predicate: related-to\n object: node-g\n - subject: self\n predicate: related-to\n object: node-e\n```\n\n\n##### Union Datasets\n\nUnions work essentially the same way as joins, but the other datasets are specified in the `others` key. Here's an \nexample:\n\n```yaml\n- name: test-node-i\n alias: Test Node I\n tag: node-i\n description: Test Node I\n domain: test\n category: test\n type: test\n object_class: dataset\n method: union\n dataset_tag: node-g\n others:\n - dataset_tag: node-e\n - dataset: dataset:foundation:boundaries:boundaries:usa-counties\n project: global\n connections:\n - subject: self\n predicate: related-to\n object: node-g\n - subject: self\n predicate: related-to\n object: node-e\n```\n\nNote that you can specify a dataset from a different project by setting the `project` key on the dataset item. For this \nto work, you will need the dataset's full name or uid.\n\n##### Additional Options\n\nThere are a couple of additional options which can be added to modify the behavior of the `geodesic build graph` \ncommand:\n\n- `--dry_run`: when running with this option, the tool will not actually write changes to any Entanglement projects. This is useful for validating your node configuration before committing to any actual changes in your project. Note that some features might misbehave while using this option as, for example, connections cannot be made between nodes cannot be made when they are not actually created yet.\n- `--reindex`: this option triggers a reindex operation on any dataset nodes created by the tool. This is necessary for most changes to datasets to actually take effect. If you are noticing that changes are not being reflected in the data you are receiving from a dataset, you may want to try this option.\n- `--rebuild`: when running with this option, the tool will delete all nodes in the project before it begins the graph build. This is recommended if you want your full graph to be reflected in your yaml configurations, but should be avoided if you have modified the graph through any other method, such as in a notebook. *This option should be used carefully.* \n\n##### Managing Graphs Using `geodesic build project`\n\nFinally, it is also possible to integrate the functionality of `geodesic build graph` into the previously described \n`geodesic build project` workflow. Doing so is as easy as adding one more key to your `project.yaml` file:\n\n```yaml\n- uid: <PROJECT-UID>\n name: seerai-project\n alias: SeerAI Example Project\n description: A project for demonstrating the build project command\n nodes_path: graph_nodes\n```\n\nNow, when you run `geodesic build project --project=seerai-project`, the project build will automatically look to the \n`graph_nodes` directory and build the resulting graph in your project. All of the additional options listed above are \nalso available when running a graph build through `geodesic build project`.\n",
"bugtrack_url": null,
"license": "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. \"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. \"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. \"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License. \"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. \"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. \"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). \"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. \"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\" \"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets \"[]\" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same \"printed page\" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
"summary": "Python API for the Geodesic Datascience Platform",
"version": "0.58.27",
"project_urls": {
"Homepage": "https://docs.seerai.space/geodesic"
},
"split_keywords": [
"geodesic",
" analysis",
" seerai",
" data",
" science"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ab3d0e0537cf8995b0c8df79c30df5b9b4b22cda126dafd557cca237a34a3cf7",
"md5": "7fb93444190b3a6215206147f08a7632",
"sha256": "5ff5faabdf4b6d66d5f15d3b3fcc9d86879378a4b1fc359fcb5579eca7894eec"
},
"downloads": -1,
"filename": "geodesic_api-0.58.27-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7fb93444190b3a6215206147f08a7632",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 163219,
"upload_time": "2024-10-08T23:05:08",
"upload_time_iso_8601": "2024-10-08T23:05:08.816335Z",
"url": "https://files.pythonhosted.org/packages/ab/3d/0e0537cf8995b0c8df79c30df5b9b4b22cda126dafd557cca237a34a3cf7/geodesic_api-0.58.27-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-08 23:05:08",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "geodesic-api"
}