Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ministryofjustice-data-platform-catalogue
Library to integrate the MoJ data platform with the catalogue component.
Readme
This library is part of the Ministry of Justice data platform.
It publishes object metadata to a data catalogue, so that the metadata can be made discoverable by consumers.
Broadly speaking, a catalogue stores a metadata graph, consisting of data assets. Data assets could be tables, schemas or databases.
To install the package using pip
, run:
pip install ministryofjustice-data-platform-catalogue
from data_platform_catalogue import (
DataHubCatalogueClient,
BaseCatalogueClient, DataLocation, CatalogueMetadata,
DataProductMetadata, TableMetadata,
CatalogueError
)
client: BaseCatalogueClient = DataHubCatalogueClient(jwt_token=jwt_token, api_url=api_url)
data_product = DataProductMetadata(
name = "my_data_product",
description = "bla bla",
version = "v1.0.0",
owner = "7804c127-d677-4900-82f9-83517e51bb94",
email = "justice@justice.gov.uk",
retention_period_in_days = 365,
domain = "LAA",
subdomain = "Legal Aid",
dpia_required = False
)
table = TableMetadata(
name = "my_table",
description = "bla bla",
column_details=[
{"name": "foo", "type": "string", "description": "a"},
{"name": "bar", "type": "int", "description": "b"},
],
retention_period_in_days = 365,
major_version = 1
)
try:
table_fqn = client.upsert_table(
metadata=table,
data_product_metadata=data_product,
location=DataLocation("test_data_product_v1"),
)
except CatalogueError:
print("oh no")
response = client.search()
# Total results across all pages
print(response.total_results)
# Iterate over search results
for item in response.page_results:
print(item)
# Iterate over facet options
for option in response.facets.options('domains'):
print(option.label)
print(option.value)
print(option.count)
# Include a filter and sort
client.search(
filters=[MultiSelectFilter("domains", [response.facets['domains'][0].value])],
sort=SortOption(field="name", ascending=False)
)
Basic filters:
Timestamps:
URNs:
Tables
FAQs
Library to integrate the MoJ data platform with the catalogue component.
We found that ministryofjustice-data-platform-catalogue demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.