semvec/pypi-packages huggingface dataset:
transform 1.4.3
Transform MQL Client Library
Requires Python: >=3.8

# Transform MQL

## Auth setup:
```bash
# Follow the prompts to either enter api_key or perform MFA
mql setup
```

**NOTE:** All configs including pinned models, api_key, bearer tokens will be stored under the default directory at `~/.transform/config.yml`. If another location is desired, please set an ENV variable at `$TFD_CONFIG_DIR` with the desired path.

## CLI Usage:
Run `mql --help` for a list of all available commands
```
Usage: mql [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbose
  --debug-log-file
  --help            Show this message and exit.

Commands:
  commit-configs         Commit yaml configs found in specified config...
  contact                Instructions for how to contact Transform for help.
  drop-cache             Drop the MQL cache.
  drop-materialization   ***NEW*** Create a new MQL drop materialization...
  get-dimension-values   List all dimension values that are queryable...
  health-report          Completes a health check on MQL servers.
  identify               Identify the currently authenticated user.
  latest-mql-image       Outputs the latest MQL server image details
  list-dimensions        List all unique dimensions for the Organization.
  list-materializations  List the materializations for the Organization...
  list-metrics           List the metrics for the Organization with their...
  list-queries           Retrieve queries from mql server
  list-servers           Lists available MQL servers.
  materialize            ***NEW*** Create a new MQL materialization...
  pin-model              Pin a model id from configs that are already...
  ping                   Perform basic HTTP health check against...
  query                  Create a new MQL query, polls for completion and...
  setup                  Guides user through CLI setup.
  stream-query-logs      Retrieve queries from mql server
  unpin-model            Unpin a model id
  validate-configs       Validate yaml configs found in specified config...
  version                Print the current version of the MQL CLI.
```
#### Examples:
```
mql query --metrics messages --dimensions ds --limit 10
mql materialize --materialization-name name --start-time 2021-10-01 --end_time 2021-11-01
```

## Python Library
#### Examples:
```python
# Instantiating the object manually
from transform.mql import MQLClient

"""
Pass: 
  - api_key if you want to manually provide an api_key
  - mql_server_url if you want to override the mql server

DEFAULT: values in ~/.transform/config.yml
"""
mql = MQLClient(api_key: Optional[str], mql_server_url: Optional[str])

df = mql.query(metrics=["messages"], dimensions=["ds"], where="is_thread")
```
```python
# If authentication already exists in config
from transform import mql

df = mql.query(metrics=["messages"], dimensions=["ds"], where="is_thread")
```
## API References
See more details at https://docs.transform.co/
logfast 0.5.0
Quick and easy logging initialization
Requires Python: >=2.5

# Logfast

## Purpose
Just a simple python package which does logging initialization in a certain way.

```
17|12|19|00:18:58|+0100  14474:MainThread  INFO       |__init__.py.21  |   This is an example
17|12|19|00:18:58|+0100  14474:MainThread  WARNING    |__init__.py.22  |   Another one
```
As one can see it provides the filename where the log has been created, the Process ID, the Thread Name, and the full time (including timezone).
This is a package I created for my own benefit, as i found myself tired of always doing the same logging initalization.

Now i can just ```pip install logfast``` wherever i am. 

Most likely you will want to a have different logging format than me(so this package might be of no use to you).
But if you want the same format feel free to use it.

## Installation

```pip install logfast```

## Usage Guide
Make sure this is the first module you import in your application.
This makes sure no other call is made first to logging.
Otherwise other modules/libraries might overwrite the logging settings.
This allows you to have multiple application entrypoints but have the same logging configuration.

```
import logfast

logger = logfast.getLogger()


logger.info("This is an example")
logger.warning("Another one")
```