slicer_package_manager.models package — Slicer Package Manager 0.1.0 documentation

# slicer_package_manager.models package

## Submodules

## slicer_package_manager.models.extension module

class slicer_package_manager.models.extension.Extension(*args, **kwargs)

  Bases: `girder.models.item.Item`

  The `Extension` class derive from the `Item` model in Girder and it uses to embedded extension binary files.

  createExtension(name, creator, folder, params)

    Create and save in the DB a new extension.

    Parameters

      - name – Name of the new extension

      - creator – The creator user

      - folder – The release folder within the extension will be created.

      - params – All the metadata to set on the new extension

    Returns

      The new extension item

  get(release, limit=0, offset=0, sort=None, filters=None, **kwargs)

    Get all the extensions available for a release.

    Parameters

      release – The release folder

    Returns

      Generator containing all the child items of the release.

  initialize()

    Subclasses should override this and set the name of the collection as self.name. Also, they should set any indexed fields that they require.

  validate(doc)

    Validate the extension instance.

    Parameters

      doc – The extension instance

    Returns

      The extension instance once validated

## slicer_package_manager.models.package module

class slicer_package_manager.models.package.Package(*args, **kwargs)

  Bases: `girder.models.item.Item`

  The `Package` class derive from the `Item` model in Girder and it uses to embedded packages binary files.

  createPackage(name, creator, folder, params, description)

    Create and save in the DB a new application package.

    Parameters

      - name – Name of the new package

      - creator – The creator user

      - folder – The release folder within the package will be created.

      - params – All the metadata to set on the new application package

      - description – A description for the application package.

    Returns

      The new application package item

  get(release, limit=0, offset=0, sort=None, filters=None, **kwargs)

    Get all the application packages available for a release.

    Parameters

      release – The release folder

    Returns

      Generator containing all the child items of the release.

  initialize()

    Subclasses should override this and set the name of the collection as self.name. Also, they should set any indexed fields that they require.

  validate(doc)

    Validate the package instance.

    Parameters

      doc – The package instance

    Returns

      The package instance once validated