API Reference: Release
Building a data package
create_data_package(registry, release_spec, fn_out, resolve_references=True)
Create a data package release specification from a dictionary or a YAML/JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
registry
|
CrossRegistry
|
The registry to use for validating contract references. |
required |
release_spec
|
Path | CrossDataPackageReleaseSpec | str
|
The release
specification as a |
required |
fn_out
|
Path | str
|
File path to write the data package containing the data as well as the data package descriptor (a YAML and JSON file) to. |
required |
resolve_references
|
bool
|
Whether to resolve and include
referenced resources (e.g., dimensions) in the package. When |
True
|
Source code in src/crosscontract/release/data_package/create_data_package.py
Release specification
Bases: PackageMetaData
Release specification for a data package.
Carries the package-level metadata (inherited from frictionless.PackageMetaData)
together with a CrossDataResourceReleaseSpec per resource, each bundling the
resource's metadata with the DataInstructions for fetching its data. This is
a build recipe, not a Frictionless descriptor: a later build step pairs it with
a resolver to fetch the data and materialize the package.
Source code in src/crosscontract/release/data_package/release_specification.py
Bases: ResourceMetaData
Release specification for a single data resource.
Carries the resource's descriptive metadata (inherited from
frictionless.ResourceMetaData) together with the DataInstructions describing
how to fetch its data from the platform. This is a build recipe, not a
Frictionless descriptor: a later build step pairs it with a resolver to fetch
the data and materialize the resource.
name is optional and defaults to the name of the contract used for
fetching; the remaining descriptive metadata must be supplied by the
specification.
Source code in src/crosscontract/release/data_package/release_specification.py
Bases: BaseModel
Instructions for obtaining a resource's data from the platform.
Bundles the fetch specification (fetch) describing how to retrieve the
data. It is the extension point for further data-shaping instructions (e.g.
transformations) that may be added alongside fetch in the future.