adhocracy_core.resources.asset module

Resources for managing assets.

interface IAssetDownload[source]

Extends: adhocracy_core.interfaces.IResource

Downloadable binary file for Assets.

class AssetDownload[source]

Bases: adhocracy_core.resources.base.Base

Allow downloading the first asset file in the term:lineage.

Initialize self.

get_response(registry: pyramid.registry.Registry=None) → pyramid.response.FileResponse[source]

Return response with binary content of the asset data.

interface IAsset[source]

Extends: adhocracy_core.interfaces.ISimple

A generic asset (binary file).

add_metadata(context: <InterfaceClass adhocracy_core.resources.asset.IAsset>, registry: pyramid.registry.Registry, **kwargs)[source]

Store asset file metadata and add raw download to context.

interface IAssetsService[source]

Extends: adhocracy_core.interfaces.IServicePool

The ‘assets’ ServicePool.

interface IPoolWithAssets[source]

Extends: adhocracy_core.interfaces.IPool

A pool with an auto-created asset service pool.

add_assets_service(context: <InterfaceClass adhocracy_core.interfaces.IPool>, registry: pyramid.registry.Registry, options: dict)[source]

Add assets service to context.

includeme(config)[source]

Add resource type to registry.