{ "info": { "author": "Ashokkumar T.A", "author_email": "ashokkumar.ta@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "# dampy\t\t\t\t\t\t\t\nAn utility to easily work with Adobe Experience Manager (AEM) DAM. \n\n## Dependencies\n```\nPython 3\n```\n\n## Features\n* Find a list of all assets in DAM / under a folder\n* Create a new folder\n* Move folder to a different path\n* Modify the folder title \n* Create a complete folder tree structure\n* Get the folder tree structure of DAM / under specific path\n* Restructure the folder hierarchy in DAM\n* Upload a new asset\n* Upload a loacl folder with all its assets and subfolders to DAM\n* Download an asset from DAM\n* Download a complete folder from DAM\n* Get the metadata of assets\n* Extract specfied properties of the assets to a CSV file\n* Update properties of assets based on CSV file\n* Activate an asset or a folder\n* Activate a given list of assets and folders\n* Deactivate an asset or a folder\n* Deactivate a given list of assets and folders\n* Delete an asset or a folder\n* Delete a given list of assets and folders\n* Check if an asset already exists in DAM and the path(s) at which its present\n* Report all duplicate assets in DAM / under a path \n\n\n## About the tool\ndampy is a tool to work with AEM DAM. For a client I recently work with, as we went live the client team had frequent requests to\n* Get a list of all the assets under a path \n* Download all assets under a path\n* Upload assets organized in the local folder structure to DAM\n* Extract specific properties of all assets under a path\n* Update properties of assets based on spreadsheet\n* And so on\u00e2\u20ac\u00a6\n\nAfter dabbling with curls, AEM reports and WebDAV tools, I came to realize that writing Python scripts to make REST API calls to AEM and/or convert the result JSON into required output format to be the quickest and easiest option to handle these requests. \n\ndampy is a consolidation of many such scripts written into a comprehensive tool to work with AEM DAM \n\n\n## Getting Started\ndampy is available as pip install. To start working on this tool install it through pip command\n\n```\npip install dampy\n```\n\nAfter the tool is installed, you can straight away start using it. All that it takes is to import AEM class from dampy package and start working with it. The below code is all it takes to get a list of all assets in DAM\n\n\n```\n# Getting started\n\n# Import AEM from dampy.AEM\n>>> From dampy.AEM import AEM\n\n# Create a handle to an AEM Instance\n>>> author = AEM()\n\n# List all assets in DAM\n>>> author.dam.list()\n```\n\nAs you can see, three lines is all it takes to get a list of all assets in DAM\n1.\tImport AEM from dampy.AEM\n2.\tCreate an instance of AEM\n3.\tCall the list method \n\n__Note:__ By default, dampy connects to AEM Author instance running locally with admin/admin as credentials. Keep your local AEM instance running when trying the above snippet. \n\n## dampy in-depth\nThe following sections explains in-depth the functionalities and technical details of dampy tool\n\n### Creating an AEM handle\nThe first step in working with dampy is to create an AEM handle. To create an AEM handle, import AEM from dampy.AEM and create an instance of it. Below code snippet shows various options to create an AEM handle\n\n```\n>>> From dampy.AEM import AEM\n# Different options for creating AEM handle\n# Create AEM handle to default AEM instance\n>>> aem = AEM()\n\n# Create AEM handle to the given host and credentials\n>>> aem = AEM(\u00e2\u20ac\u02dchttp://my-aem-host:port\u00e2\u20ac\u2122, \u00e2\u20ac\u02dcuser\u00e2\u20ac\u2122,\u00e2\u20ac\u2122password\u00e2\u20ac\u2122)\n\n# Create AEM handle to default host, for admin user with password as \u00e2\u20ac\u02dcnew-password\u00e2\u20ac\u2122\n>>> aem = AEM(password = \u00e2\u20ac\u02dcnew-password\u00e2\u20ac\u2122)\n```\n\nAs you can see, AEM constructor takes in three optional parameters\n\n__host__ \u00e2\u20ac\u201c defaults to http://localhost:4502\n__user__ \u00e2\u20ac\u201c defaults to \u00e2\u20ac\u02dcadmin\u00e2\u20ac\u2122\n__password__ \u00e2\u20ac\u201c defaults to \u00e2\u20ac\u02dcadmin\u00e2\u20ac\u2122\n\nYou can pass in none, all three, or some of these parameters to create an AEM handle\n\n### The dam object in AEM handle\nThe AEM handle includes a dam object wrapped within it and all functionalities of dampy are exposed as methods on this dam object. The signature for invoking any method on dam looks like this\n\n```\n>>> aem.dam.()\n```\n\nWe will see all the methods exposed on dam object in the following sections\n\n\n### list()\n\nThis method takes an optional path parameter and returns a list of all assets under this path. The returned list includes assets under all the subfolders of this path, subfolders under it and so on covering the entire node tree under the given path\n\nIf path parameter is not provided, it returns all assets in DAM (all assets under /content/dam)\n\nIt also has two more optional parameters\n\n__csv_dump__ \u00e2\u20ac\u201c A Boolean flag indicating if the list needs to be written to a CSV file. Default value of this flag is False\n\n__csv_file__ \u00e2\u20ac\u201c The output csv file name to write the list output to. The list gets written to output if either the csv_dump is set to True of csv_file value is specified. \n\nIf csv_dump is set to True but no csv_file value is specified, output is written to the file 'output/asset_list.csv' under the current working directory\n \n```\n# List all assets under \u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122\n>>> my_assets = aem.dam.list(\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122)\n\n# List all assets under \u00e2\u20ac\u02dc/content/dam\u00e2\u20ac\u2122\n>>> all_assets = aem.dam.list()\n\n# List all assets under \u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122 and also write the output to a CSV file\n>>> my_assets = aem.dam.list(\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122, csv_dump=True)\n\n# List all assets under \u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122 and also write the output to the CSV file specified\n>>> my_assets = aem.dam.list(\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122, csv_file=\u00e2\u20ac\u2122output/list.csv\u00e2\u20ac\u2122, )\n```\n\n### createFolder()\nThis method creates a new folder in DAM. It takes in the path of the folder to create as a parameter and an optional title for the folder & returns a Boolean value indicating the success status of folder creation\nParameters \n__path__ \u00e2\u20ac\u201c DAM folder path to create\n__title__ \u00e2\u20ac\u201c Optional title for the folder. If not provided, name of the folder is set as title\n\n```\n# Create a new DAM folder /content/dam/new_folder and set its title to \u00e2\u20ac\u02dcnew_folder\u00e2\u20ac\u2122\n>>> status = aem.dam.createFolder(\u00e2\u20ac\u02dc/content/dam/new_folder\u00e2\u20ac\u2122)\n\n# Create a new DAM folder /content/dam/new_folder and set its title to \u00e2\u20ac\u02dcMy New Folder\u00e2\u20ac\u2122\n>>> status = aem.dam.createFolder(\u00e2\u20ac\u02dc/content/dam/new_folder\u00e2\u20ac\u2122, \u00e2\u20ac\u02dcMy New Folder\u00e2\u20ac\u2122)\n```\n\n### createFolderTree()\nThis method creates the folder tree structure in DAM, reflecting the folder structure in a local dir or in a given list. It takes in a path under which to create the folder structure, local directory path that contains the folder structure to reflect in DAM and/or an input list containing the list of folders to create \nParameters \n__path__ \u00e2\u20ac\u201c DAM folder under which to create the folder tree structre. Optional and defaults to /content/dam. Ignored if the folder structure or list provided starts with /content/dam/..\n__srcDir__ \u00e2\u20ac\u201c Local folder path. The folder structure under this path is reflected in DAM\n__srcList__ \u00e2\u20ac\u201c Input list of folder paths to create. Can be a list or a text file or CSV file containing the list of folder paths to create in DAM\n\nIf both the __srcDir__ and __srcList__ parameters are provided, folder structure under both gets created in DAM\n\n```\n# Create folder tree, based on local folder structure under the path /content/dam/dampy/test\n>>> status = aem.dam.createFolderTree(path='/content/dam/dampy/test', srcDir='upload/Folder Tree Dir')\n \n# Create folder tree, based on entries in input text file\n>>> status = aem.dam.createFolderTree( srcList='input/flist.txt')\n\n# Create folder tree, based on entries in input CSV file\n>>> status = aem.dam.createFolderTree(srcList='input/Folder_tree.csv')\n\n# Create folder tree, based on input provided as a list\n>>> status = aem.dam.createFolderTree(srcList=['/content/dam/dampy/test/Folder Tree LIST', '/content/dam/dampy/test/\n\n```\n\n### updateFolderTitle()\nThis method updates the folder title with the new value provided \nParameters \n__path__ \u00e2\u20ac\u201c Path of the DAM folder for which title change needs to be done\n__newTitle__ \u00e2\u20ac\u201c New value for the folder title\n\n```\n# Update the title of the folder to the new value provided\n>>> status = aem.dam.updateFolderTitle(path='dampy/test/folder-tree-txt', newTitle='Root Folder from Text tree')\n\n```\n\n### move()\nThis method moves the asset or folder from the srcPath to the destPath\nParameters \n__srcPath__ \u00e2\u20ac\u201c Path of the source asset or folder to move\n__destPath__ \u00e2\u20ac\u201c Destination path under which the asset or folder is moved to\n__newName__ \u00e2\u20ac\u201c New name for the moved asset or folder. This parameter is optional and if not provided, the name of the asset or folder moved remains the same as its current name\n\n```\n# Move the folder from the source path to the destination path\n>>> status = aem.dam.move(srcPath='/content/dam/dampy/test/folder-tree-txt', destPath='/content/dam/dampy/test/folder-tree-list')\n\n# Move the folder from the source path to the destination path with a new name\n>>> status = aem.dam.move(srcPath='/content/dam/dampy/test/folder-tree-list/folder-tree-txt', destPath='/content/dam/dampy/test/folder-tree-list', newName='text-tree')\n\n```\n\n### fetchFolderTree()\nThis method fetches the folder structure under the given path and writes it to an output csv file\nParameters \n__path__ \u00e2\u20ac\u201c Base path, the folder structure under which gets returned. Optional parameter and defaults to '/content/dam'\n__csv_file__ \u00e2\u20ac\u201c The name of the output CSV file to which the output is written to. Optional and by default writes to the file 'output/folder_tree.csv'\n__props__ \u00e2\u20ac\u201c List of properties of folders that are extracted for the folder tree. Optional and by default outputs the folder path and title\n\n```\n# Fetch the folder tree structure from DAM and write it to CSV file\n>>> status = aem.dam.fetchFolderTree(path='/content/dam/dampy/test')\n\n```\n\n### restructure()\nThis method restructures the DAM folder structure based on the input CSV file \nParameters \n__inputCSV__ \u00e2\u20ac\u201c Path of the CSV file which contains the details for restructuring the folders. This CSV file contains a list of entries for moving or deleting a folder\n\n```\n# Restructure the folders in DAM, moving and deleting folders and updating folder title based on input CSV file\n>>> status = aem.dam.restructure(inputCSV='input/restructure.csv')\n\n```\n\n### uploadAsset()\nThis method uploads an asset from the local path to DAM under the path specified. It takes in 2 parameters\n\n__file__ \u00e2\u20ac\u201c Path of the local file to upload. This is a mandatory parameter\n\n__path__ \u00e2\u20ac\u201c DAM path under which the file has to be uploaded, Defaults to \u00e2\u20ac\u02dc/content/dam\u00e2\u20ac\u2122 if not specified\n\nThis method returns a Boolean value indicating the success status\n\n```\n# Upload the given file to the specified DAM folder\n>>> status = aem.dam.uploadAsset(\u00e2\u20ac\u02dc./assets/sample1.png\u00e2\u20ac\u2122, \u00e2\u20ac\u02dc/content/dam/new_folder)\n\n# Upload the given file to DAM under \u00e2\u20ac\u02dc/content/dam\u00e2\u20ac\u2122\n>>> status = aem.dam.uploadAsset(\u00e2\u20ac\u02dc./assets/sample1.png\u00e2\u20ac\u2122)\n```\n\n### uploadFolder()\nThis method uploads all the assets from a local folder to DAM. It takes in 2 parameters\n\n__dir__ \u00e2\u20ac\u201c The local folder path, all assets under which gets uploaded to DAM. This is an optional parameter and uploads all assets under folder named \u00e2\u20ac\u02dcupload\u00e2\u20ac\u2122 under the current path if not specified\n\n__path__ \u00e2\u20ac\u201c DAM path under which to download. Its optional and defaults to /content/dam. For assets under the folder structure starting with /content/dam/\u00e2\u20ac\u00a6 in the local folder specified, this parameter is ignored\n\nThe folder structure under the given local folder dir gets reflected under the DAM path provided. \n\nThis method also returns a Boolean value indicating the success status\n\n```\n# Upload all the folders and assets under ./upload to DAM under /content/dam\n>>> status = aem.dam.uploadFolder()\n\n# Upload all the folders and assets under ./upload to DAM under /content/dam/my_uploads\n>>> status = aem.dam.uploadFolder(path=\u00e2\u20ac\u2122/content/dam/my_uploads)\n\n# Upload all the folders and assets under ./assets to DAM under /content/dam\n>>> status = aem.dam.uploadFolder(\u00e2\u20ac\u02dc./assets\u00e2\u20ac\u2122)\n\n# Upload all the folders and assets under ./assets to DAM under /content/dam/my_uploads\n>>> status = aem.dam.uploadFolder(dir=\u00e2\u20ac\u02dc./assets\u00e2\u20ac\u2122, path=\u00e2\u20ac\u2122/content/dam/my_uploads)\n```\n\n\n### downloadAsset()\nThis method downloads the given assets to a local folder. This method takes in three parameters \n\n__asset_path__ \u00e2\u20ac\u201c A mandatory parameter which is the full path to the asset to download\n\n__dir__ \u00e2\u20ac\u201c local folder path to download the asset. This is optional and the asset gets downloaded to a folder named \u00e2\u20ac\u02dcdownload\u00e2\u20ac\u2122 if not specified. The folder gets created is the given folder does not exist on the file system\n\n__retain_dam_path__ \u00e2\u20ac\u201c A Boolean flag to retain or ignore the DAM folder tree when downloading to local. Defaults to False\n\nThis method returns a Boolean value indicating the success or failure of the download\n\n```\n# Download the asset to ./download folder\n>>> status = aem.dam.downloadAsset(\u00e2\u20ac\u02dc/content/dam/my_folder/dampy_sample.png\u00e2\u20ac\u2122)\n\n# Download the asset to ./assets folder\n>>> status = aem.dam.downloadAsset(\u00e2\u20ac\u02dc/content/dam/my_folder/dampy_sample.png\u00e2\u20ac\u2122, \u00e2\u20ac\u02dc./assets\u00e2\u20ac\u2122)\n\n# Download the asset to ./assets folder under the subfolder /content/dam/my_folder\n>>> status = aem.dam.downloadAsset(\u00e2\u20ac\u02dc/content/dam/my_folder/dampy_sample.png\u00e2\u20ac\u2122, \u00e2\u20ac\u02dc./assets\u00e2\u20ac\u2122, True)\n```\n\n### downloadFolder()\nThis method downloads all the assets under a given DAM path to a local folder. This method takes in three parameters \n\n__path__ \u00e2\u20ac\u201c Optional. Path of the DAM folder from which all assets gets downloaded. If this parameter is not given all assets under \u00e2\u20ac\u02dc/content/dam\u00e2\u20ac\u2122 gets downloaded\n\n__dir__ \u00e2\u20ac\u201c local folder path to download all the asset to. This is optional and the assets get downloaded to a folder named \u00e2\u20ac\u02dcdownload\u00e2\u20ac\u2122 if not specified. The folder to download the assets to gets created if it does not already exist on the file system. \n\n__retain_dam_path__ \u00e2\u20ac\u201c A Boolean flag to retain or ignore the DAM folder tree when downloading to local. Defaults to True\n\nThe tree structure of DAM is retained when downloading assets under the given DAM path, with the downloaded folder structure reflecting the DAM folder hierarchy\n\nThis method also returns a Boolean value indicating the success or failure of the download\n\n```\n# Download all assets under the given DAM folder to ./download, retaining the DAM folder structure in local\n\n>>> status = aem.dam.downloadFolder(\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122)\n\n# Download all assets under the given DAM folder to ./assets folder, retaining the DAM folder structure in local\n>>> status = aem.dam.downloadFolder(\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122, \u00e2\u20ac\u02dc./assets\u00e2\u20ac\u2122)\n\n# Download all assets under the given DAM folder to ./assets folder. All assets are placed in ./assets folder, ignoring the DAM folder structure\n>>> status = aem.dam.downloadFolder(\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122, \u00e2\u20ac\u02dc./assets\u00e2\u20ac\u2122, False)\n```\n\n\n### metadata()\nThis method returns the metadata of the given asset as a json object. It takes in 2 parameters \nasset_path \u00e2\u20ac\u201c A mandatory parameter which is the full path to the asset\n\n__level__ \u00e2\u20ac\u201c optional, the nesting level in the node hierarchy includes in the response json. Defaults to 1 \n\n```\n# Get level 1 metadata of given asset\n>>> metadata_json = aem.dam.metadata(\u00e2\u20ac\u02dc/content/dam/my_folder/dampy_sample.png\u00e2\u20ac\u2122)\n\n# Get up to level 4 metadata of the given asset \n>>> metadata_json = aem.dam.metadata(\u00e2\u20ac\u02dc/content/dam/my_folder/dampy_sample.png\u00e2\u20ac\u2122, 4)\n```\n\n### xprops()\nThis method extracts the metadata properties of all the assets under a given path and writes it to a CSV file. It takes 3 parameters, all optional\n\n__path__ \u00e2\u20ac\u201c DAM path. Extracts properties of all assets under this path. Defaults to \u00e2\u20ac\u02dc/content/dam\u00e2\u20ac\u2122\n\n__props__ \u00e2\u20ac\u201c List of properties to extract. By default extract the asset path & title\n\n__csv_file__ \u00e2\u20ac\u201c The output file to write the extracted properties to. By default, its written to the file \u00e2\u20ac\u02dcoutput/asset_props.csv\u00e2\u20ac\u2122\n\n\n```\n# Extract path and title of all dam assets and write it to output/asset_props.csv\n>>> status = aem.dam.xprops()\n\n# Extract path and title of all dam assets under my_folder and write it to output/asset_props.csv\n>>> status = aem.dam.xprops(\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122)\n\n# Extract path, title and tags of all dam assets under my_folder and write it to output/asset_title_n_tags_.csv\n>>> status = aem.dam.xprops(\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122, [\u00e2\u20ac\u02dcjcr:path\u00e2\u20ac\u2122, \u00e2\u20ac\u02dcjcr:content/metadata/dc:title\u00e2\u20ac\u2122, \u00e2\u20ac\u02dcjcr:content/metadata/cq:tags\u00e2\u20ac\u2122], \u00e2\u20ac\u02dcoutput/asset_title_n_tags_.csv\u00e2\u20ac\u2122)\n```\n\n\n### uprops()\nThis method takes a csv file as input and updates asset properties with the data provided in this CSV file. It takes 1parameter, the path to the CSV file. \n\n__csv_file__ \u00e2\u20ac\u201c Path to the csv file with data for asset properties update. By default, tries the read the input csv file at in \u00e2\u20ac\u02dcinput/asset_props.csv\u00e2\u20ac\u2122\n\nThis input CSV file should adhere to the below conditions\n\n* The first row is the header and should have the property name to update for the respective columns. Property name is the fully qualified name of the property under the asset. E.g. Title property name is \u00e2\u20ac\u02dcjcr:content/metadata/dc:title\u00e2\u20ac\u2122\n* The second row is the type of the property. Can be String, Date, Boolean, \u00e2\u20ac\u00a6 and can be a single value or array value. E.g. for String array mention the type as \u00e2\u20ac\u02dcString[]\u00e2\u20ac\u2122\n* From row 3 onwards, each row contains the properties for one asset \n* The first column must be \u00e2\u20ac\u02dcjcr:path\u00e2\u20ac\u2122 property with its type as String and values as full path of the asset in DAM \n\nAfter creating the csv and placing it in a path, invoke the uprops method as given in the below code snippet\n\n\n```\n# Update properties based on the input csv file input/asset_props.csv\n>>> status = aem.dam.uprops()\n\n# Update properties based on the input csv file input/asset_cust_props.csv\n>>> status = aem.dam.uprops(\u00e2\u20ac\u02dcinput/asset_cust_props.csv\u00e2\u20ac\u2122)\n```\n\n\n### activate()\nThis method activates the given asset or a folder in DAM. It takes in one mandatory path parameter \n\n__path__ \u00e2\u20ac\u201c Mandatory parameter specifying the path to the asset or DAM folder that needs to be activated\n\nThis method returns a Boolean value indicating the success status\n\n```\n# Activates the given asset in DAM\n>>> status = aem.dam.activate((\u00e2\u20ac\u02dc/content/dam/my_folder/dampy_sample.png\u00e2\u20ac\u2122)\n\n# Activates the given folder (folder tree) in DAM\n>>> status = aem.dam.activate((\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122)\n```\n\n### activateList()\nThis method activates all the assets provided by its parameter listSrc\n\n__listSrc__ \u00e2\u20ac\u201c Mandatory parameter containing the list of assets to activate. This parameter can be a list of all assets to activate or name of a text or CSV file containing the list of assets to activate\n\nThis method returns a Boolean value indicating the success status if all the assets in the list are activated successfully\n\n```\n# Activate a list of assets in text file\n>>> status = aem.dam.activateList(listSrc='input/alist.txt')\n\n# Activate a list of assets in a CSV file\n>>> status = aem.dam.activateList(listSrc='input/alist.csv')\n\n# Activate a list of assets passed in as parameter\n>>> status = aem.dam.activateList(listSrc=['/content/dam/dampy/test/new_samples/activities/hiking-camping/alpinists-himalayas.jpg', '/content/dam/dampy/test/new_samples/activities/running/fitness-woman.jpg'])\n```\n\n### deactivate()\nThis method deactivates a given asset or a folder in DAM. It takes in one mandatory path parameter \n\n__path__ \u00e2\u20ac\u201c Mandatory parameter specifying the path to the asset or a DAM folder that needs to be deactivated\n\nThis method returns a Boolean value indicating the success status\n\n```\n# Deactivates the given asset in DAM\n>>> status = aem.dam.deactivate((\u00e2\u20ac\u02dc/content/dam/my_folder/dampy_sample.png\u00e2\u20ac\u2122)\n\n# Deactivates the given folder in DAM\n>>> status = aem.dam.deactivate((\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122)\n```\n\n### deactivateList()\nThis method deactivates all the assets provided by its parameter listSrc\n\n__listSrc__ \u00e2\u20ac\u201c Mandatory parameter containing the list of assets to deactivate. This parameter can be a list of all assets to deactivate or name of a text or CSV file containing the list of assets to deactivate\n\nThis method returns a Boolean value indicating the success status if all the assets in the list are deactivated successfully\n\n```\n# Deactivate a list of assets in text file\n>>> status = aem.dam.deactivateList(listSrc='input/alist.txt')\n\n# Deactivate a list of assets in a CSV file\n>>> status = aem.dam.deactivateList(listSrc='input/alist.csv')\n\n# Deactivate a list of assets passed in as parameter\n>>> status = aem.dam.deactivateList(listSrc=['/content/dam/dampy/test/new_samples/activities/hiking-camping/alpinists-himalayas.jpg', '/content/dam/dampy/test/new_samples/activities/running/fitness-woman.jpg'])\n```\n\n### delete()\nThis method deletes a given asset or a folder. It takes in one mandatory path parameter \n\n__path__ \u00e2\u20ac\u201c Mandatory parameter specifying the path to the asset or the DAM folder that needs to be deleted\n\nThis method returns a Boolean value indicating the success status\n\n```\n# Deletes the given asset from DAM\n>>> status = aem.dam.delete((\u00e2\u20ac\u02dc/content/dam/my_folder/dampy_sample.png\u00e2\u20ac\u2122)\n\n# Deletes the given folder from DAM\n>>> status = aem.dam.delete((\u00e2\u20ac\u02dc/content/dam/my_folder\u00e2\u20ac\u2122)\n```\n\n### deleteList()\nThis method deletes all the assets provided by its parameter listSrc\n\n__listSrc__ \u00e2\u20ac\u201c Mandatory parameter containing the list of assets to delete. This parameter can be a list of all assets to delete or name of a text or CSV file containing the list of assets to delete\n\nThis method returns a Boolean value indicating the success status if all the assets in the list are deleted successfully\n\n```\n# Delete a list of assets in text file\n>>> status = aem.dam.deleteList(listSrc='input/alist.txt')\n\n# Delete a list of assets in a CSV file\n>>> status = aem.dam.deleteList(listSrc='input/alist.csv')\n\n# Delete a list of assets passed in as parameter\n>>> status = aem.dam.deleteList(listSrc=['/content/dam/dampy/test/new_samples/activities/hiking-camping/alpinists-himalayas.jpg', '/content/dam/dampy/test/new_samples/activities/running/fitness-woman.jpg'])\n```\n\n### exists()\nThis method checks if a given asset file is available in DAM and returns the list of paths under which it is available\n\n__asset__ \u00e2\u20ac\u201c Path of the asset in the local system. \n\n```\n# Check if an asset exits in DAM and return the paths under which its present\n>>> status = aem.dam.exists('upload/Shorts_men.jpg')\n\n```\n\n### duplicates()\nThis method finds all the duplicate assets under the given path and returns it. Returns an empty object if no duplicates are identified \n\n__path__ \u00e2\u20ac\u201c Path under which the check is done to identify duplicates\n\n```\n# List all duplicate assets in DAM under the given path\n>>> status = aem.dam.duplicates('/content/dam/dampy')\n\n# List all duplicate assets in DAM\n>>> status = aem.dam.duplicates()\n\n```\n\n\n\n## Reservation\n> Though this is a generic utility, they have been tested for limited set of use cases. Make sure its tested for your scenarios before applying it for production purpose\n\n---\n> Environments Tested on: AEM 6.1, 6.2 & 6.4 | Windows, RHEL5 | Python 3.7.2", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/ashokkumarta/dampy/archive/0.6.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ashokkumarta/dampy", "keywords": "AEM,DAM,Python tool,list,create,upload,download,activate,deactivate,delete", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dampy", "package_url": "https://pypi.org/project/dampy/", "platform": "", "project_url": "https://pypi.org/project/dampy/", "project_urls": { "Download": "https://github.com/ashokkumarta/dampy/archive/0.6.tar.gz", "Homepage": "https://github.com/ashokkumarta/dampy" }, "release_url": "https://pypi.org/project/dampy/0.8/", "requires_dist": null, "requires_python": "", "summary": "A python tool to easily work with Adobe Experience Manager (AEM) DAM.", "version": "0.8" }, "last_serial": 5475143, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e2403ad445baf6d31f63c04b46efbcdd", "sha256": "3e14eb7ddf1e30f4bc41b410aff911d6071211fd42366dbc202e42b86795dd35" }, "downloads": -1, "filename": "dampy-0.1.tar.gz", "has_sig": false, "md5_digest": "e2403ad445baf6d31f63c04b46efbcdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3979, "upload_time": "2019-05-24T09:51:16", "url": "https://files.pythonhosted.org/packages/aa/ba/6605118ec4ee86db65c2e7bf7a5eb40b90a91da88bcd02d066e66bd175fd/dampy-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a189d14d1dc200afa58bc419fa3a5e54", "sha256": "f8c9991253ece779f95e7a5982012b2b0bd47150b79ecb4dd0d785b73ffb23f8" }, "downloads": -1, "filename": "dampy-0.2.tar.gz", "has_sig": false, "md5_digest": "a189d14d1dc200afa58bc419fa3a5e54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3994, "upload_time": "2019-05-24T10:17:45", "url": "https://files.pythonhosted.org/packages/b2/6b/6fc2b6e05ac5ed717d62e358cc555b595ee9c3d4805028959d0ecc3e54b0/dampy-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "91ebdfae6b03ed9f0a3c238fdc86d150", "sha256": "cdbe86a77f5964d8dfaad0a74c5e811c2614b979bd6423c30030cc38cd166165" }, "downloads": -1, "filename": "dampy-0.3.tar.gz", "has_sig": false, "md5_digest": "91ebdfae6b03ed9f0a3c238fdc86d150", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4767, "upload_time": "2019-05-24T11:33:49", "url": "https://files.pythonhosted.org/packages/80/0c/d0c8f9dec14fcd105aa721771471e92bc8d6057b137f12b6f89bd07535ed/dampy-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "3dc26e64db49211da8ea52bc57e17d6d", "sha256": "93304aa7425e1cbf281c23b4e353f9f30916b7eb1d161386a45dbd8625f69eb2" }, "downloads": -1, "filename": "dampy-0.4.tar.gz", "has_sig": false, "md5_digest": "3dc26e64db49211da8ea52bc57e17d6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6035, "upload_time": "2019-05-31T10:50:47", "url": "https://files.pythonhosted.org/packages/4d/9e/ab9b31588fdff706033744f3a5c07798b0fb6a7c09e69c971779505a0a32/dampy-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "c303c6a38d508a3f7fae6f62344722d4", "sha256": "6b1d55324547ab9e500ace5ddc7e5f8c634fddf7061ffd3330f9aa07e8ec1189" }, "downloads": -1, "filename": "dampy-0.5.tar.gz", "has_sig": false, "md5_digest": "c303c6a38d508a3f7fae6f62344722d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6034, "upload_time": "2019-05-31T11:31:07", "url": "https://files.pythonhosted.org/packages/f4/1b/f4ac1f57220bc32b6f6b56db86decd6667459c3cc0413cfc90d36ad20e8e/dampy-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "c21451381530deb4310547b623ba5a21", "sha256": "d0e839030a64112a78a9942c726ac1557f16e8ed6e5ca2e9198958698f24c3a2" }, "downloads": -1, "filename": "dampy-0.6.tar.gz", "has_sig": false, "md5_digest": "c21451381530deb4310547b623ba5a21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6114, "upload_time": "2019-06-01T08:27:11", "url": "https://files.pythonhosted.org/packages/39/10/12e3cf0b698540d14ecbe9b13baae712e50a765c3635f63cf3629c644893/dampy-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "aac7799ddcc6b4a7de0ba1c1c8f82074", "sha256": "94071c5c3f5670efd0faa014aad65ae84273fdbbf6379899d367a7a80893d800" }, "downloads": -1, "filename": "dampy-0.7.tar.gz", "has_sig": false, "md5_digest": "aac7799ddcc6b4a7de0ba1c1c8f82074", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7926, "upload_time": "2019-06-28T17:17:27", "url": "https://files.pythonhosted.org/packages/c9/40/213c8bde83cf5caecc2ecbc5a3ab10afa4499fcda8785a47b859853ff693/dampy-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "addd8b4f43b161058fbaad3a0a54c970", "sha256": "15243cac60cd1bc29818bfc7e061fc3e178f0e8affe689d26738d0587f0e52a0" }, "downloads": -1, "filename": "dampy-0.8.tar.gz", "has_sig": false, "md5_digest": "addd8b4f43b161058fbaad3a0a54c970", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20843, "upload_time": "2019-07-02T05:44:24", "url": "https://files.pythonhosted.org/packages/db/36/97cd8b3f11b6cc048f82dbbfff70e5a926296d52aa914b738ad9e4173d4e/dampy-0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "addd8b4f43b161058fbaad3a0a54c970", "sha256": "15243cac60cd1bc29818bfc7e061fc3e178f0e8affe689d26738d0587f0e52a0" }, "downloads": -1, "filename": "dampy-0.8.tar.gz", "has_sig": false, "md5_digest": "addd8b4f43b161058fbaad3a0a54c970", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20843, "upload_time": "2019-07-02T05:44:24", "url": "https://files.pythonhosted.org/packages/db/36/97cd8b3f11b6cc048f82dbbfff70e5a926296d52aa914b738ad9e4173d4e/dampy-0.8.tar.gz" } ] }