semvec/pypi-packages huggingface dataset:
gsdb-cli 1.0.1
GeoSpock DB CLI
License: MIT
Requires Python: >=3.5

# GeoSpock DB CLI

## Installing the CLI from pip
```
    $ python -m pip install gsdb-cli
```

### Logging in with your enterprise Identity Provider
The `configure` command creates a configuration file with the endpoint for your deployment and saves your username 
and password to your computer's secure keychain.

Alternatively, if you do not want to save your details: 
 - all commands can be run with `gsdb --user <value> --password <value> --endpoint <value> COMMAND`.
 - the CLI will also check for the environment variables `GEOSPOCK_USER` and `GEOSPOCK_PASSWORD` and use these to 
 authenticate. An environment variable `GEOSPOCK_ENDPOINT` can also be used to provide the request address.

An optional `--profile <value>` argument can be used to set up configurations for multiple GeoSpock DB deployments.
All subsequent `gsdb` commands can then use this profile flag to specify that deployment, e.g. 
`gsdb --profile dev COMMAND`.

## Running the CLI
The CLI can be activated at the command line using `gsdb [--profile <value>] COMMAND ... `

A list of commands can be shown by using `gsdb --help`. Further information on the input types of each command can be 
obtained by running `gsdb COMMAND --help`.
pymetrics-assessment-api-client 1.0.1
A client library for accessing pymetrics Assessment API
License: MIT
Requires Python: >=3.6,<4.0

# pymetrics-assessment-api-client
A client library for accessing pymetrics Assessment API

## Installation

```bash
pip install pymetrics-assessment-api-client
```

## Base URLs
US Production: https://api.pymetrics.com

US Staging: https://staging.api.pymetrics.com

## Usage

A full set of examples can be found in the [pymetrics-assessments-api-client examples directory](https://github.com/pymetrics/pymetrics_assessment_api_client/tree/main/pymetrics_assessment_api_client/examples).

To get started, please request Client ID, Client Secret and API Key from pymetrics.

First, create a client for staging environment:

```python
from pymetrics_assessment_api_client import Client

client = Client(base_url="https://staging.pymetrics.com")
```

To get an authenticated token, you can hit the get oauth endpoint by doing the following:
```python
from pymetrics_assessment_api_client.models import OAuthTokenRequest
from pymetrics_assessment_api_client.api.default import mercury_o_auth
from pymetrics_assessment_api_client.models import OAuthTokenResponse
from pymetrics_assessment_api_client.types import Response

request = OAuthTokenRequest(client_id=client_id,
                            client_secret=client_secret,
                            grant_type="client_credentials")
auth_response: Response = mercury_o_auth.sync_detailed(client=client,
                                                       json_body=request)
auth_token_response: OAuthTokenResponse = auth_response.parsed
print(f"Access Token: {auth_token_response.access_token}")
```
To retrieve an order, you can use the token generated above and hit the get order endpoint:
```python
from pymetrics_assessment_api_client.api.default import mercury_retrieve_order
from pymetrics_assessment_api_client.models import MercuryAssessmentOrder
from pymetrics_assessment_api_client.types import Response

auth = f"Bearer {access_token}"

get_order_response: Response = mercury_retrieve_order.sync_detailed(
    client=client,
    uuid=order_uuid,
    authorization=auth,
    x_api_key=API_KEY,
    report=False
)
parsed_get_order_response: MercuryAssessmentOrder = get_order_response.parsed
print(f"Successfully retrieved order: {parsed_get_order_response.to_dict()}")
```