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 the project is available on the Github Pages site.
All methods exposed by the api are documented with usage examples in the API section.
References for the objects returned by the api are available in the References section.
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 ARTEFACTS_DBT_PROJECT_DIR. To test against a different dbt project, update that environment variable and build the project.
export ARTEFACTS_DBT_PROJECT_DIR=$PWD/dbt_projects/dbt-starter-project
poetry run dbt build --project-dir $ARTEFACTS_DBT_PROJECT_DIR
poetry run pytest
To run the doctests use the --doctest-modules flag. Note that the doctests are intended to pass only when using the poffertjes_shop project.
poetry run pytest --doctest-modules
Documentation site
Use sphinx-livereload to run the docs site on port 8000.
poetry run sphinx-autobuild docs/ docs/_build --watch artefacts
Release files for artefacts 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| artefacts-1.2.0.tar.gz | 16.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| artefacts-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.8 kB
Release files / artefacts-1.2.0.tar.gz
| Download URL | artefacts-1.2.0.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21e1556b1ae9ebd82aa453976a129127123407cf04f47900e1f44d461add0462
|
|
BLAKE2b-256 checksum How to use checksums |
6f7917d59eb2444ba71ba1517c1ab1e7a6f05f19fc90c584f870035cd11d9025
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.10 Linux/5.4.0-1067-azure
|
Release files / artefacts-1.2.0-py3-none-any.whl
| Download URL | artefacts-1.2.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31dc30a101030c6ede19cae1b330500894986bef53c6e15e87b49142b95cbc3d
|
|
BLAKE2b-256 checksum How to use checksums |
4445d4505fd80fc613833ccd2949b3bdba55bbe5c56c91af2c1d833039fa8ed9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.10 Linux/5.4.0-1067-azure
|