Resource¶
Here is a list of available actions for Data Resource
check_package-- check the descriptor against JSON Schema(s)convert_package-- convert the descriptor from one notation to another
Reference¶
            dplib.actions.resource.check.check_resource(resource)
¶
    Check the validity of a Data Resource descriptor
This validates the descriptor against the JSON Schema profiles to ensure conformity with Data Package standard and Data Package extensions.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
resource | 
            
                  Union[str, IDict, Resource]
             | 
            
               The Data Resource descriptor  | 
            required | 
Returns:
| Type | Description | 
|---|---|
                  List[MetadataError]
             | 
            
               A list of errors  | 
          
Source code in dplib/actions/resource/check.py
              
            dplib.actions.resource.convert.convert_resource(path, *, format=None, source=None, target=None)
¶
    Convert a Data Resource descriptor from one notation to another
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
path | 
            
                  str
             | 
            
               Path to the descriptor  | 
            required | 
format | 
            
                  Optional[str]
             | 
            
               Format of the descriptor  | 
            
                  None
             | 
          
source | 
            
                  Optional[INotation]
             | 
            
               Source notation e.g. ckan (default dp)  | 
            
                  None
             | 
          
target | 
            
                  Optional[INotation]
             | 
            
               Target notation e.g. dcat (default dp)  | 
            
                  None
             | 
          
Returns:
| Type | Description | 
|---|---|
                  Model
             | 
            
               Resource model  |