Python wrapper for Cleveland Museum of Art Open Access API
Project description
CMA
Python wrapper for the Cleveland Museum of Art API.
Install
pip install ClevelandMuseumArt
CLI Examples
Get random artwork preview
cma artwork get --random --preview
Title: Nataraja, Shiva as the Lord of Dance
Type: Sculpture
Creator:
Culture: South India, Tamil Nadu, Chola period (900-1200s)
Link: https://openaccess-cdn.clevelandart.org/1930.331/1930.331_web.jpg
Preview:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@@@@
@@@@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@@@@
@@@@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@
@@@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@@@%%%%%%%%%%%%%%%%%%%%%%%%#%%%##%%%%###%%%#**%%###%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@%%%%%%%%%%%%%%%%%%%%%%#%%%**%##***************###*%%%%*#%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%####*+++*##%%########%%####******##%%%##%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%**#%#+++*#%%%%%%%*++*#%%%%%%%%%%%%###****##*##%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%##%%#++=+*%%%%%%%%%%+++++**%%%%%%%%%%######*****########%%%%%%%%%%%
%%%%%%%%%%%%%**#*=+*%%%%%%%%%%%%%#*+++*##%###################****##########%%%%%
%%%%%%%%%%#%%#+=+#%%%%%%%%%%%%%%%%#*+++**#######################**#############%
%%%%%%%%%#***=+#%%%%%%%%%%%%%%%%%##+*+++#%%####################**#***###########
%%%%%%%#%%#++*#%%%%%%%%%%%%%%#####*+**++#%%%####******************#####**#######
%%%%%%#***=+++*%%#*#%%%%%#########*+###*%%@%#***************************###**###
%%%%%%%%#++***++**#%%%#########*+++===*###*+*++++*****************##***#********
%%%%#**#++*#%%%#*#%#########*+===++++++++===++*#%#*+++++++++++**++####*#*+*#****
%%%%%%%*++##%%%##%%%%%%###***=-+*#%#++++++*#%%%%@@%++++++++++##*+++**%*##*******
%%%%##%++*##%######%%%%%#++**+#%#*****##%%%@@@#+**#%**++==+*%*+++++++*@@%#++++++
%%%###*++#############%%*#*%%***#%%%%#%#*+%@@@#+++==+*****##+========+@@%%%##+++
%%%%%%#++###########*****##*++#***+++++*##%@@@%#*+======+*+===========*%@@*+++++
%%%##**+*########*************+++++++==+*+***#**+**========-==========+*#%#*#+==
%%%####**######*********++##*++++====-+****########*------------------+**%***===
%######**###*********++++++++=======+*%%%%%%%%%%%%#=------------------++#%=+=--=
########*##*******++++++++========+*%%#+=+*%%#+----::::::::::::::::---+*%#**+---
#####*****#****++++++++========+*#%#**++*#%%=::::::::::::::::::::::::=+#%=------
#########*##**++++++=========+##*=-=++*#%%+-::::::::::::::::::::::::-+*%****=---
####*******#**++++===+++==+*#%*---=+*#%#=::::::::::...:::::::::::::-++##--------
##*****######**+======+*+++=-=-:-==+##=::::::..:::::::::::::-------++##***+=----
#*******+++*###*+===---------::::+**##-:::::::::---::::::::::::::-+*##==+=--::::
******+++*##*###*+=-=-----::::::::=**##+:::-----::::...........:=+*%#++*=--:::::
*****+++++++++#####*#---:::::::::::=####+--:::.............-.:==*%%+=+*+---:::::
****+++++===*#*+*#####=-::::::::::--=**##-:...............:+=**#%#++--------::::
***++++++======--+######+-::::---==--:+###:::::::::::::-==++*#%#=+*+-----=------
**++++++======-----+######*+==+++=::.:=*#%%=--------===++*###+=---------========
**+++++======---------+####**+*+*#**#%%@@@%#+*********##%#+-:-----=========---::
**+++++======-----------=*##**+*###%@%#%%##*#%%*+*###**+=--====--========--::...
*++++++=======------====+++++++++*####*##**++##*+*#*=------------=====--::....::
**++++++=======------====+++*+*************#*#######-----====----------:::------
******++++++++========---=+**++*****#*++++++*#**#####*=-------::::::::::::::::::
####*********+++++++++++==++++********+++++++*++++++=----:::::------------------
######****************+++++++++=================================================
List artwork with filters
cma artwork list --female_artists --created_after 1998 --limit 1
[
{
"id": 172524,
"accession_number": "2015.30",
"share_license_status": "Copyrighted",
"tombstone": "Wild Things, 2011. Haim Steinbach (American, 1944-). Plastic laminated wood shelf, plastic Massimo Giancon \"Mr. Cold\" soap dispenser, vinyl \"Mega Munny,\" vinyl bull \"Where the Wild Things Are\" figure, rubber dog chew; overall: 102.9 x 184.8 x 48.3 cm (40 1/2 x 72 3/4 x 19 in.). The Cleveland Museum of Art, Purchased with funds donated by Scott Mueller 2015.30",
"current_location": "ArtLens Exhibition A",
"title": "Wild Things",
"title_in_original_language": null,
"series": null,
"series_in_original_language": null,
"creation_date": "2011",
...snip...
}
]
Python Examples
from CMA.api import Handler
artwork_id = 1953.424
creator_id = 7978
exhibit_id = 206339
cma = Handler()
# get artwork, creator, or exhibition by ID
artwork = cma.get_artwork(rid=artwork_id, preview=True)
creator = cma.get_creator(rid=creator_id)
exhibit = cma.get_exhibition(rid=exhibit_id)
# list artwork, creator, or exhibition with filters
artworks = cma.list_artworks(limit=3, female_artists=True)
creators = cma.list_creators(limit=3, birth_year_after=1980)
exhibits = cma.list_exhibitions(limit=3, opened_before='2020-12-31')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ClevelandMuseumArt-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeff262e42101733464aa5133dcc22dc0e986745dd95c8ececa17073f5fcf311 |
|
MD5 | 7739d3facbcbd860241b057f7bfd0e28 |
|
BLAKE2b-256 | c053ffdd93f04b323645d83cb0d0dd19eccbbacf1acce21cca7ac1910085ad58 |