dartfx.postman

MTNA Rich Data Services

class dartfx.postman.mtnards.MtnaRdsPostmanPublisher(*, postman_api: PostmanApi, server: MtnaRdsServer, config: MtnaRdsPostmanPublisherConfig = MtnaRdsPostmanPublisherConfig(name_prefix=None, name_suffix=None, include_rds_collection=False), temp_workspace_id: str | None = None)

Bases: BaseModel

config: MtnaRdsPostmanPublisherConfig
model_config = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

postman_api: PostmanApi
publish_catalog(_catalog_id, _workspace_id)
publish_data_product(catalog_id: str, data_product_id: str, workspace_id: str | None = None, collection_id: str | None = None, config: MtnaRdsPostmanPublisherConfig | None = None) → str

Publish a data product as a collection under an existing workspace.

If collection_id is specified, its content will be replaced (but the collection id remains the same). If both workspace_id and collection_id are provided, collection_id takes precedence, and the collection will be replaced. Otherwise, workspace_id must be specified and a new collection will be created.

publish_rds_collection_to_collection(catalog_id, data_product_id, collection_uid, folder_uid=None, temp_workspace_id=None, create_root=True)

Published a data product under an existing collection or folder

publish_rds_collection_to_workspace(catalog_id, data_product_id, workspace_id)

Publish a data product under an existing workspace

server: MtnaRdsServer
temp_workspace_id: str | None
class dartfx.postman.mtnards.MtnaRdsPostmanPublisherConfig(*, name_prefix: str | None = None, name_suffix: str | None = None, include_rds_collection: bool = False)

Bases: BaseModel

include_rds_collection: bool
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name_prefix: str | None
name_suffix: str | None

Socrata

Classes and helpers to publish Socrata data products to Postman collections.

class dartfx.postman.socrata.SocrataPostmanCollectionGenerator(*, dataset: SocrataDataset, config: SocrataPostmanPublisherConfig = SocrataPostmanPublisherConfig(name_prefix=None, name_suffix=None))

Bases: BaseModel

config: SocrataPostmanPublisherConfig
dataset: SocrataDataset
generate() → Collection
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class dartfx.postman.socrata.SocrataPostmanPublisher(*, postman_api: PostmanApi, server: SocrataServer, config: SocrataPostmanPublisherConfig = SocrataPostmanPublisherConfig(name_prefix=None, name_suffix=None))

Bases: BaseModel

Postman collection generator for Socrata datasets.

config: SocrataPostmanPublisherConfig
model_config = {'arbitrary_types_allowed': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

postman_api: PostmanApi
publish_dataset(dataset_id: str, workspace_id: str | None = None, collection_id: str | None = None, config: SocrataPostmanPublisherConfig | None = None) → str

Publish a dataset as a collection under an existing workspace.

If collection_id is specified, its content will be replaced (but the collection id remains the same). Otherwise, workspace_id must be specified and a new collection will be created.

server: SocrataServer
class dartfx.postman.socrata.SocrataPostmanPublisherConfig(*, name_prefix: str | None = None, name_suffix: str | None = None)

Bases: BaseModel

Configuration for SocrataPostmanPublisher.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name_prefix: str | None
name_suffix: str | None