montecarlodata


Namemontecarlodata JSON
Version 0.115.0 PyPI version JSON
download
home_pagehttps://www.montecarlodata.com/
SummaryMonte Carlo's CLI
upload_time2025-02-03 20:58:19
maintainerNone
docs_urlNone
authorMonte Carlo Data, Inc
requires_python>=3.8
licenseApache Software License (Apache 2.0)
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Monte Carlo CLI

Monte Carlo's Alpha CLI!

## Installation

Requires Python 3.8 or greater. Normally you can install and update using `pip`. For instance:

```shell
pip install virtualenv
virtualenv venv
. venv/bin/activate

pip install -U montecarlodata
```

Developers of the CLI can use:

```shell
pip install virtualenv
make install
. venv/bin/activate
pre-commit install
```

Either way confirm the installation by running:

```shell
montecarlo --version
```

If the Python requirement does not work for you please reach out to `support@montecarlodata.com`. Docker is an option.

## Quick start

First time users can configure the tool by following the onscreen prompts:

```shell
montecarlo configure
```

MCD tokens can be generated from the [dashboard](https://getmontecarlo.com/get-token).

Use the `--help` flag for details on any advanced options (e.g. creating multiple montecarlo profiles) or
see docs [here][cli-docs].

That's it! You can always validate your connection with:

```shell
montecarlo validate
```

## User settings

Any configuration set by `montecarlo configure` can be found in `~/.mcd/` by default.

The MCD ID and Token can be overwritten, or even set, by the environment:

- `MCD_DEFAULT_API_ID`
- `MCD_DEFAULT_API_TOKEN`

These two are required either as part of `configure` or as environment variables.

The following values can also be set by the environment:

- `MCD_API_ENDPOINT` - Overwrite the default API endpoint
- `MCD_VERBOSE_ERRORS` - Enable verbose logging on errors (default=false)

## Help

Documentation for commands, options, and arguments can be found [here][cli-docs].

You can also use `montecarlo help` to echo all help text or use the `--help` flag on any command.

## Examples

### Using Docker from a local installation

```shell
docker build -t montecarlo .
docker run -e MCD_DEFAULT_API_ID='<ID>' -e MCD_DEFAULT_API_TOKEN='<TOKEN>' montecarlo --version
```

Replace `--version` with any sub-commands or options. If interacting with files those directories will probably need to be mounted too.

### Configure a named profile with custom config-path

```shell
$ montecarlo configure --profile-name zeus --config-path .
Key ID: 1234
Secret:

$ cat ./profiles.ini
[zeus]
mcd_id = 1234
mcd_token = 5678
```

### List active integrations

```shell
$ montecarlo integrations list
╒══════════════════╤══════════════════════════════════════╤══════════════════════════════════╕
│ Integration      │ ID                                   │ Created on (UTC)                 │
╞══════════════════╪══════════════════════════════════════╪══════════════════════════════════╡
│ Odin             │ 58005657-2914-4701-9a11-260ac425b14e │ 2021-01-02T01:30:52.806602+00:00 │
├──────────────────┼──────────────────────────────────────┼──────────────────────────────────┤
│ Thor             │ 926816bd-ab17-4f95-a953-fa14482c59de │ 2021-01-02T01:31:19.892205+00:00 │
├──────────────────┼──────────────────────────────────────┼──────────────────────────────────┤
│ Loki             │ 1cf1dc0d-d8ec-4c85-8e64-57ab2ad8e023 │ 2021-01-02T01:32:37.709747+00:00 │
╘══════════════════╧══════════════════════════════════════╧══════════════════════════════════╛
```

### Apply monitors configuration

```shell
$ montecarlo monitors apply --namespace my-monitors

Gathering monitor configuration files.
- models/customer_success/schema.yml - Embedded monitor configuration found.
- models/customer_success/schema.yml - Monitor configuration found.
- models/lineage/schema.yml - Embedded monitor configuration found.

Modifications:
- ResourceModificationType.UPDATE - Monitor: type=stats, table=analytics:prod.customer_360
- ResourceModificationType.UPDATE - Monitor: type=categories, table=analytics:prod.customer_360
- ResourceModificationType.UPDATE - Monitor: type=stats, table=analytics:prod_lineage.lineage_nodes
- ResourceModificationType.UPDATE - Freshness SLI: table=analytics:prod.customer_360, freshness_threshold=30
```

### Import DBT manifest

```shell
$ montecarlo import dbt-manifest --dbt-manifest-file target/manifest.json

Importing DBT objects into Monte Carlo catalog. please wait...

Imported a total of 51 DBT objects into Monte Carlo catalog.
```

## Tests and Releases

Locally `make test` will run all tests. CircleCI manages all testing for deployment.

To publish a new release, navigate to [Releases](https://github.com/monte-carlo-data/cli/releases) in the GitHub repo and then:
- Click "Draft a new release"
- In the "Choose a tag" dropdown, type the new version number, for example `v1.2.3` and click "Create a new tag"
- Follow the format from previous releases for the description
- Leave "Set as the latest release" checked
- Click "Publish release"
- CircleCI will take care of publishing a new package to [PyPI](https://pypi.org/project/montecarlodata/) and generating documentation.

## License

Apache 2.0 - See the [LICENSE](http://www.apache.org/licenses/LICENSE-2.0) for more information.

[cli-docs]: https://clidocs.getmontecarlo.com/

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.montecarlodata.com/",
    "name": "montecarlodata",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Monte Carlo Data, Inc",
    "author_email": "info@montecarlodata.com",
    "download_url": "https://files.pythonhosted.org/packages/33/1d/b52b1f4bd04c48dd91f6dfa70b2ef676052a11fe84f2bcb0fa4bbdc606be/montecarlodata-0.115.0.tar.gz",
    "platform": null,
    "description": "# Monte Carlo CLI\n\nMonte Carlo's Alpha CLI!\n\n## Installation\n\nRequires Python 3.8 or greater. Normally you can install and update using `pip`. For instance:\n\n```shell\npip install virtualenv\nvirtualenv venv\n. venv/bin/activate\n\npip install -U montecarlodata\n```\n\nDevelopers of the CLI can use:\n\n```shell\npip install virtualenv\nmake install\n. venv/bin/activate\npre-commit install\n```\n\nEither way confirm the installation by running:\n\n```shell\nmontecarlo --version\n```\n\nIf the Python requirement does not work for you please reach out to `support@montecarlodata.com`. Docker is an option.\n\n## Quick start\n\nFirst time users can configure the tool by following the onscreen prompts:\n\n```shell\nmontecarlo configure\n```\n\nMCD tokens can be generated from the [dashboard](https://getmontecarlo.com/get-token).\n\nUse the `--help` flag for details on any advanced options (e.g. creating multiple montecarlo profiles) or\nsee docs [here][cli-docs].\n\nThat's it! You can always validate your connection with:\n\n```shell\nmontecarlo validate\n```\n\n## User settings\n\nAny configuration set by `montecarlo configure` can be found in `~/.mcd/` by default.\n\nThe MCD ID and Token can be overwritten, or even set, by the environment:\n\n- `MCD_DEFAULT_API_ID`\n- `MCD_DEFAULT_API_TOKEN`\n\nThese two are required either as part of `configure` or as environment variables.\n\nThe following values can also be set by the environment:\n\n- `MCD_API_ENDPOINT` - Overwrite the default API endpoint\n- `MCD_VERBOSE_ERRORS` - Enable verbose logging on errors (default=false)\n\n## Help\n\nDocumentation for commands, options, and arguments can be found [here][cli-docs].\n\nYou can also use `montecarlo help` to echo all help text or use the `--help` flag on any command.\n\n## Examples\n\n### Using Docker from a local installation\n\n```shell\ndocker build -t montecarlo .\ndocker run -e MCD_DEFAULT_API_ID='<ID>' -e MCD_DEFAULT_API_TOKEN='<TOKEN>' montecarlo --version\n```\n\nReplace `--version` with any sub-commands or options. If interacting with files those directories will probably need to be mounted too.\n\n### Configure a named profile with custom config-path\n\n```shell\n$ montecarlo configure --profile-name zeus --config-path .\nKey ID: 1234\nSecret:\n\n$ cat ./profiles.ini\n[zeus]\nmcd_id = 1234\nmcd_token = 5678\n```\n\n### List active integrations\n\n```shell\n$ montecarlo integrations list\n\u2552\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2564\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2564\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2555\n\u2502 Integration      \u2502 ID                                   \u2502 Created on (UTC)                 \u2502\n\u255e\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u256a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2561\n\u2502 Odin             \u2502 58005657-2914-4701-9a11-260ac425b14e \u2502 2021-01-02T01:30:52.806602+00:00 \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Thor             \u2502 926816bd-ab17-4f95-a953-fa14482c59de \u2502 2021-01-02T01:31:19.892205+00:00 \u2502\n\u251c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u253c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n\u2502 Loki             \u2502 1cf1dc0d-d8ec-4c85-8e64-57ab2ad8e023 \u2502 2021-01-02T01:32:37.709747+00:00 \u2502\n\u2558\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2567\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2567\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255b\n```\n\n### Apply monitors configuration\n\n```shell\n$ montecarlo monitors apply --namespace my-monitors\n\nGathering monitor configuration files.\n- models/customer_success/schema.yml - Embedded monitor configuration found.\n- models/customer_success/schema.yml - Monitor configuration found.\n- models/lineage/schema.yml - Embedded monitor configuration found.\n\nModifications:\n- ResourceModificationType.UPDATE - Monitor: type=stats, table=analytics:prod.customer_360\n- ResourceModificationType.UPDATE - Monitor: type=categories, table=analytics:prod.customer_360\n- ResourceModificationType.UPDATE - Monitor: type=stats, table=analytics:prod_lineage.lineage_nodes\n- ResourceModificationType.UPDATE - Freshness SLI: table=analytics:prod.customer_360, freshness_threshold=30\n```\n\n### Import DBT manifest\n\n```shell\n$ montecarlo import dbt-manifest --dbt-manifest-file target/manifest.json\n\nImporting DBT objects into Monte Carlo catalog. please wait...\n\nImported a total of 51 DBT objects into Monte Carlo catalog.\n```\n\n## Tests and Releases\n\nLocally `make test` will run all tests. CircleCI manages all testing for deployment.\n\nTo publish a new release, navigate to [Releases](https://github.com/monte-carlo-data/cli/releases) in the GitHub repo and then:\n- Click \"Draft a new release\"\n- In the \"Choose a tag\" dropdown, type the new version number, for example `v1.2.3` and click \"Create a new tag\"\n- Follow the format from previous releases for the description\n- Leave \"Set as the latest release\" checked\n- Click \"Publish release\"\n- CircleCI will take care of publishing a new package to [PyPI](https://pypi.org/project/montecarlodata/) and generating documentation.\n\n## License\n\nApache 2.0 - See the [LICENSE](http://www.apache.org/licenses/LICENSE-2.0) for more information.\n\n[cli-docs]: https://clidocs.getmontecarlo.com/\n",
    "bugtrack_url": null,
    "license": "Apache Software License (Apache 2.0)",
    "summary": "Monte Carlo's CLI",
    "version": "0.115.0",
    "project_urls": {
        "Homepage": "https://www.montecarlodata.com/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e453e923803e4f1ade8da3840bc9ae6d188b65682c753ae753d988e6a4ede238",
                "md5": "f41df98bf5a4aa0947b1254c00e788a6",
                "sha256": "a2590fd7e0c908b6051a8db142eea43eaf0b765c5daff9bacf38367c3aca70ae"
            },
            "downloads": -1,
            "filename": "montecarlodata-0.115.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f41df98bf5a4aa0947b1254c00e788a6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 158050,
            "upload_time": "2025-02-03T20:58:17",
            "upload_time_iso_8601": "2025-02-03T20:58:17.534839Z",
            "url": "https://files.pythonhosted.org/packages/e4/53/e923803e4f1ade8da3840bc9ae6d188b65682c753ae753d988e6a4ede238/montecarlodata-0.115.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "331db52b1f4bd04c48dd91f6dfa70b2ef676052a11fe84f2bcb0fa4bbdc606be",
                "md5": "032dbde991725e19be1700bf0b9b2c68",
                "sha256": "09466653ca76d134ee6a1be68c8ecead12968a5d97fd0717ccb77f686a8d3a79"
            },
            "downloads": -1,
            "filename": "montecarlodata-0.115.0.tar.gz",
            "has_sig": false,
            "md5_digest": "032dbde991725e19be1700bf0b9b2c68",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 185448,
            "upload_time": "2025-02-03T20:58:19",
            "upload_time_iso_8601": "2025-02-03T20:58:19.109435Z",
            "url": "https://files.pythonhosted.org/packages/33/1d/b52b1f4bd04c48dd91f6dfa70b2ef676052a11fe84f2bcb0fa4bbdc606be/montecarlodata-0.115.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-03 20:58:19",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "montecarlodata"
}
        
Elapsed time: 0.43001s