Skip to main content

artefacts

A deserialization library for dbt artifacts.

pip install artefacts

The artefacts.api module aims to provide simple, easy to use python objects for interacting with your dbt project. Here's an example that identifies models in your project that are missing tests or descriptions.

>>> import artefacts.api
>>> for model in artefacts.api.models():
...     if model.description is None or len(model.tests) == 0:
...         print(f"Incomplete model: {model.name}")

Usage

After installing artefacts, you first need to compile your dbt project.

dbt compile

You can then start using the api.

>>> import artefacts.api

Docs

Documentation for all methods of the api is available on this project's Github Pages site.

https://tjwaterman99.github.io/artefacts/

References for the objects returned by the api is available in the References section.

https://tjwaterman99.github.io/artefacts/reference.html

Development Setup

Open this repository in a Github Codespace. (Click the green Code button in the repository's Github page and select New Codespace).

Testing

poetry run pytest

By default, pytest will test against the dbt project located at DBT_PROJECT_DIR. To test against a different dbt project, update that environment variable and build the project.

export DBT_PROJECT_DIR=$PWD/dbt_projects/dbt-starter-project
poetry run dbt build --project-dir $DBT_PROJECT_DIR
poetry run pytest

Documentation site

Use sphinx-livereload to run the docs site on port 8000.

poetry run sphinx-autobuild docs/ docs/_build

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

artefacts-1.0.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

artefacts-1.0.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file artefacts-1.0.0.tar.gz.

File metadata

  • Download URL: artefacts-1.0.0.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.10 Linux/5.4.0-1067-azure

File hashes

Hashes for artefacts-1.0.0.tar.gz
Algorithm Hash digest
SHA256 19dbd36edd993499bb1a96edb77ae391652f5f6ad0fd9b1d661622fe9c4084af
MD5 65b587ddcbbd49ace962c03df9eba85f
BLAKE2b-256 29cbbc6d9a6c4ee8babc5713fd72118966cf4402a5591c0c5806dc964563b5de

See more details on using hashes here.

File details

Details for the file artefacts-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: artefacts-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.10 Linux/5.4.0-1067-azure

File hashes

Hashes for artefacts-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff09528d27d3febdea8521419bf63a0053da3f2caac0e612c72acd94b96333e1
MD5 a47389353411b0c0c5dc64842d88e361
BLAKE2b-256 0d23e15737af2b47282ef61f44d5b8d60e731394588d76af30e61ae549b40cf4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page