API Documentation¶
Data Types¶
Data classes for packages & related models
-
class
metastore.types.
Author
(name=None, email=None)¶ Revision / tag author information
-
email
: Optional[str] = None¶
-
name
: Optional[str] = None¶
-
-
class
metastore.types.
PackageRevisionInfo
(package_id, revision, created, author=None, description=None, package=None)¶ Revision information
-
created
: datetime = None¶
-
description
: Optional[str] = None¶
-
package
: Optional[DataPackageType] = None¶
-
package_id
: str = None¶
-
revision
: str = None¶
-
-
class
metastore.types.
TagInfo
(package_id, name, created, revision_ref, author=None, revision=None, description=None)¶ Tag information
-
created
: datetime = None¶
-
description
: Optional[str] = None¶
-
name
: str = None¶
-
package_id
: str = None¶
-
revision
: Optional[PackageRevisionInfo] = None¶
-
revision_ref
: str = None¶
-
Storage Backend Interface¶
-
class
metastore.backend.
StorageBackend
¶ Abstract interface for storage backend classes
-
create
(package_id, metadata, author=None, message=None)¶ Create a new data package
- Return type
-
delete
(package_id)¶ Delete a data package
- Raises
metastore.backend.exc.NotFound – Raised if the package does not exist
- Return type
None
-
fetch
(package_id, revision_ref=None)¶ Fetch a data package, potentially at a given revision / tag
- Raises
metastore.backend.exc.NotFound – Raised if the package or referenced revision do not exist
- Return type
-
classmethod
is_valid_revision_id
(revision_id)¶ Tell if a given string is a valid revision ID for this backend
- Return type
bool
-
revision_fetch
(package_id, revision_ref)¶ Get info about a specific revision of a data package
NOTE: this does not fetch the data package metadata itself, just info about a revision of it
- Raises
metastore.backend.exc.NotFound – Raised if the package or revision do not exist
- Return type
-
revision_list
(package_id)¶ Get list of revisions for a data package
Note that when listing,
metastore.types.PackageRevisionInfo.package
will not be set in the return value. If you need to access the actual package metadata and not just revision information, fetch the package data by callingfetch()
.- Raises
metastore.backend.exc.NotFound – Raised if the package does not exist
- Return type
List
[PackageRevisionInfo
]
-
tag_create
(package_id, revision_ref, name, author=None, description=None)¶ Create a tag (named reference to a revision of a data package)
- Raises
metastore.backend.exc.NotFound – Raised if the package or referenced revision do not exist
- Return type
-
tag_delete
(package_id, tag)¶ Delete an existing
- Raises
metastore.backend.exc.NotFound – Raised if the package or tag do not exist
- Return type
None
-
tag_fetch
(package_id, tag)¶ Get info about a specific tag of a data package
NOTE: this does not fetch the data package metadata itself, just info about a revision of it
- Raises
metastore.backend.exc.NotFound – Raised if the package or tag do not exist
- Return type
-
tag_list
(package_id)¶ Get list of tags for a package
- Raises
metastore.backend.exc.NotFound – Raised if the package does not exist
- Return type
List
[TagInfo
]
-
tag_update
(package_id, tag, author=None, new_name=None, new_description=None)¶ Modify existing tag name or description
- Raises
metastore.backend.exc.NotFound – Raised if the package or tag do not exist
metastore.backend.exc.Conflict – Raised if the tag name is already in use by another tag
- Return type
-
update
(package_id, metadata, author=None, partial=False, message=None, base_revision_ref=None)¶ Update or partial update (patch) a data package
- Return type
-