{"id":13738489,"url":"https://github.com/related-sciences/articat","last_synced_at":"2025-05-08T16:34:12.841Z","repository":{"id":39986219,"uuid":"378292068","full_name":"related-sciences/articat","owner":"related-sciences","description":"articat: data artifact catalog","archived":false,"fork":false,"pushed_at":"2025-02-17T18:19:55.000Z","size":127,"stargazers_count":17,"open_issues_count":19,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-22T19:18:12.322Z","etag":null,"topics":["data-catalog","data-discovery","data-management","data-platform"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/related-sciences.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-19T00:29:12.000Z","updated_at":"2025-02-17T18:16:10.000Z","dependencies_parsed_at":"2023-02-01T08:46:52.900Z","dependency_job_id":"ad139820-4c9e-483d-b615-bb0ad613e1d6","html_url":"https://github.com/related-sciences/articat","commit_stats":{"total_commits":92,"total_committers":2,"mean_commits":46.0,"dds":"0.010869565217391353","last_synced_commit":"1fd6a0e5cb028d338e821a012bff6ab2c06fa9e4"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/related-sciences%2Farticat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/related-sciences%2Farticat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/related-sciences%2Farticat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/related-sciences%2Farticat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/related-sciences","download_url":"https://codeload.github.com/related-sciences/articat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253105599,"owners_count":21855065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-catalog","data-discovery","data-management","data-platform"],"created_at":"2024-08-03T03:02:23.890Z","updated_at":"2025-05-08T16:34:12.468Z","avatar_url":"https://github.com/related-sciences.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# articat\n[![CI](https://github.com/related-sciences/articat/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/related-sciences/articat/actions/workflows/build.yml)\n[![PYPI](https://img.shields.io/pypi/v/articat.svg)](https://pypi.org/project/articat/)\n\nMinimal metadata catalog to store and retrieve metadata about data artifacts.\n\n## Getting started\n\nAt a high level, *articat* is simply a key-value store. Value being the Artifact metadata.\nKey a.k.a. \"Artifact Spec\" being:\n * globally unique `id`\n * optional timestamp: `partition`\n * optional arbitrary string: `version`\n\nTo publish a file system Artifact (`FSArtifact`):\n\n```python\nfrom articat import FSArtifact\nfrom pathlib import Path\nfrom datetime import date\n\n# Apart from being a metadata containers, Artifact classes have optional\n# convenience methods to help in data publishing flow:\n\nwith FSArtifact.partitioned(\"foo\", partition=date(1643, 1, 4)) as fsa:\n    # To create a new Artifact, always use `with` statement, and\n    # either `partitioned` or `versioned` methods. Use:\n    # * `partitioned(...)`, for Artifacts with explicit `datetime` partition\n    # * `versioned(...)`, for Artifacts with explicit `str` version\n\n    # Next we produce some local data, this could be a Spark job,\n    # ML model etc.\n    data_path = Path(\"/tmp/data\")\n    data_path.write_text(\"42\")\n\n    # Now let's stage that data, temporary and final data directories/buckets\n    # are configurable (see below)\n    fsa.stage(data_path)\n\n    # Additionally let's provide some description, here we could also\n    # save some extra arbitrary metadata like model metrics, hyperparameters etc.\n    fsa.metadata.description = \"Answer to the Ultimate Question of Life, the Universe, and Everything\"\n```\n\nTo retrieve the metadata about the Artifact above:\n\n```python\nfrom articat.fs_artifact import FSArtifact\nfrom datetime import date\nfrom pathlib import Path\n\n# To retrieve the metadata, use Artifact object, and `fetch` method:\nfsa = FSArtifact.partitioned(\"foo\", partition=date(1643, 1, 4)).fetch()\n\nfsa.id # \"foo\"\nfsa.created # \u003cCREATION-TIMESTAMP\u003e\nfsa.partition # \u003cCREATION-TIMESTAMP\u003e\nfsa.metadata.description # \"Answer to the Ultimate Question of Life, the Universe, and Everything\"\nfsa.main_dir # Data directory, this is where the data was stored after staging\nPath(fsa.joinpath(\"data\")).read_text() # 42\n```\n\n## Features\n\n * store and retrieve metadata about your data artifacts\n * no long running services (low maintenance)\n * data publishing utils builtin\n * IO/data format agnostic\n * immutable metadata\n * development mode\n\n## Artifact flavours\n\nCurrently available Artifact flavours:\n * `FSArtifact`: metadata/utils for files or objects (supports: local FS, GCS, S3 and more)\n * `BQArtifact`: metadata/utils for BigQuery tables\n * `NotebookArtifact`: metadata/utils for Jupyter Notebooks\n\n## Development mode\n\nTo ease development of Artifacts, *articat* supports development/dev mode.\nDevelopment Artifact can be indicated by `dev` parameter (preferred), or\n`_dev` prefix in the Artifact `id`. Dev mode supports:\n * overwriting Artifact metadata\n * configure separate locations (e.g. `dev_prefix` for `FSArtifact`), with\n   potentially different retention periods etc\n\n## Backend\n\n * `local`: mostly for testing/demo, metadata is stored locally (configurable, default: `~/.config/articat/local`)\n * `gcp_datastore`: metadata is stored in the Google Cloud Datastore\n\n## Configuration\n\n*articat* configuration can be provided in the API, or configuration files. By default configuration\nis loaded from `~/.config/articat/articat.cfg` and `articat.cfg` in current working directory. You\ncan also point at the configuration file via environment variable `ARTICAT_CONFIG`.\n\nYou use `local` mode without configuration file. Available options:\n\n ```toml\n[main]\n# local or gcp_datastore, default: local\n# mode =\n\n# local DB directory, default: ~/.config/articat/local\n# local_db_dir =\n\n[fs]\n# temporary directory/prefix\n# tmp_prefix =\n# development data directory/prefix\n# dev_prefix =\n# production data directory/prefix\n# prod_prefix =\n\n[gcp]\n# GCP project\n# project =\n\n[bq]\n# development data BigQuery dataset\n# dev_dataset =\n# production data BigQuery dataset\n# prod_dataset =\n```\n\n## Our/example setup\n\nBelow you can see a diagram of our setup, Articat is just one piece of our system, and solves a specific problem. This should give you an idea where it might fit into your environment:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://docs.google.com/drawings/d/1wll4Q_PlKGHVu-C2IN8jUIxzFTD8jwFWnvwgFrvq2ls/export/png\" alt=\"Our setup diagram\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelated-sciences%2Farticat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frelated-sciences%2Farticat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frelated-sciences%2Farticat/lists"}